* emultempl/ppc64elf.em (emit_stub_syms, toc_section): New vars.
(build_toc_list): New function. (gld${EMULATION_NAME}_finish): Call build_toc_list and ppc64_elf_reinit_toc. Adjust ppc64_elf_build_stubs call. (OPTION_STUBSYMS): Define. (PARSE_AND_LIST_LONGOPTS): Add emit-stub-syms. (PARSE_AND_LIST_OPTIONS): Document. (PARSE_AND_LIST_ARGS_CASES): Handle.
This commit is contained in:
parent
ad8e1ba599
commit
0b9a4d73a8
11
ld/ChangeLog
11
ld/ChangeLog
|
@ -1,3 +1,14 @@
|
||||||
|
2003-06-08 Alan Modra <amodra@bigpond.net.au>
|
||||||
|
|
||||||
|
* emultempl/ppc64elf.em (emit_stub_syms, toc_section): New vars.
|
||||||
|
(build_toc_list): New function.
|
||||||
|
(gld${EMULATION_NAME}_finish): Call build_toc_list and
|
||||||
|
ppc64_elf_reinit_toc. Adjust ppc64_elf_build_stubs call.
|
||||||
|
(OPTION_STUBSYMS): Define.
|
||||||
|
(PARSE_AND_LIST_LONGOPTS): Add emit-stub-syms.
|
||||||
|
(PARSE_AND_LIST_OPTIONS): Document.
|
||||||
|
(PARSE_AND_LIST_ARGS_CASES): Handle.
|
||||||
|
|
||||||
2003-06-05 Roland McGrath <roland@redhat.com>
|
2003-06-05 Roland McGrath <roland@redhat.com>
|
||||||
|
|
||||||
* emultempl/elf32.em (gld${EMULATION_NAME}_list_options): Remove
|
* emultempl/elf32.em (gld${EMULATION_NAME}_list_options): Remove
|
||||||
|
|
|
@ -44,6 +44,11 @@ static int dotsyms = 1;
|
||||||
/* Whether to run tls optimization. */
|
/* Whether to run tls optimization. */
|
||||||
static int notlsopt = 0;
|
static int notlsopt = 0;
|
||||||
|
|
||||||
|
/* Whether to emit symbols for stubs. */
|
||||||
|
static int emit_stub_syms = 0;
|
||||||
|
|
||||||
|
static asection *toc_section = 0;
|
||||||
|
|
||||||
static void ppc_create_output_section_statements
|
static void ppc_create_output_section_statements
|
||||||
PARAMS ((void));
|
PARAMS ((void));
|
||||||
static void ppc_after_open
|
static void ppc_after_open
|
||||||
|
@ -56,6 +61,8 @@ static void ppc_layout_sections_again
|
||||||
PARAMS ((void));
|
PARAMS ((void));
|
||||||
static void gld${EMULATION_NAME}_after_allocation
|
static void gld${EMULATION_NAME}_after_allocation
|
||||||
PARAMS ((void));
|
PARAMS ((void));
|
||||||
|
static void build_toc_list
|
||||||
|
PARAMS ((lang_statement_union_type *));
|
||||||
static void build_section_lists
|
static void build_section_lists
|
||||||
PARAMS ((lang_statement_union_type *));
|
PARAMS ((lang_statement_union_type *));
|
||||||
static struct bfd_elf_version_expr *gld${EMULATION_NAME}_new_vers_pattern
|
static struct bfd_elf_version_expr *gld${EMULATION_NAME}_new_vers_pattern
|
||||||
|
@ -294,6 +301,19 @@ gld${EMULATION_NAME}_after_allocation ()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void
|
||||||
|
build_toc_list (statement)
|
||||||
|
lang_statement_union_type *statement;
|
||||||
|
{
|
||||||
|
if (statement->header.type == lang_input_section_enum
|
||||||
|
&& !statement->input_section.ifile->just_syms_flag
|
||||||
|
&& statement->input_section.section->output_section == toc_section)
|
||||||
|
{
|
||||||
|
ppc64_elf_next_toc_section (&link_info, statement->input_section.section);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
build_section_lists (statement)
|
build_section_lists (statement)
|
||||||
lang_statement_union_type *statement;
|
lang_statement_union_type *statement;
|
||||||
|
@ -339,6 +359,12 @@ gld${EMULATION_NAME}_finish ()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
toc_section = bfd_get_section_by_name (output_bfd, ".toc");
|
||||||
|
if (toc_section != NULL)
|
||||||
|
lang_for_each_statement (build_toc_list);
|
||||||
|
|
||||||
|
ppc64_elf_reinit_toc (output_bfd, &link_info);
|
||||||
|
|
||||||
lang_for_each_statement (build_section_lists);
|
lang_for_each_statement (build_section_lists);
|
||||||
|
|
||||||
/* Call into the BFD backend to do the real work. */
|
/* Call into the BFD backend to do the real work. */
|
||||||
|
@ -360,7 +386,7 @@ gld${EMULATION_NAME}_finish ()
|
||||||
|
|
||||||
if (stub_file != NULL && stub_file->the_bfd->sections != NULL)
|
if (stub_file != NULL && stub_file->the_bfd->sections != NULL)
|
||||||
{
|
{
|
||||||
if (!ppc64_elf_build_stubs (&link_info))
|
if (!ppc64_elf_build_stubs (emit_stub_syms, &link_info))
|
||||||
einfo ("%X%P: can not build stubs: %E\n");
|
einfo ("%X%P: can not build stubs: %E\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -471,13 +497,15 @@ EOF
|
||||||
#
|
#
|
||||||
PARSE_AND_LIST_PROLOGUE='
|
PARSE_AND_LIST_PROLOGUE='
|
||||||
#define OPTION_STUBGROUP_SIZE 301
|
#define OPTION_STUBGROUP_SIZE 301
|
||||||
#define OPTION_DOTSYMS (OPTION_STUBGROUP_SIZE + 1)
|
#define OPTION_STUBSYMS (OPTION_STUBGROUP_SIZE + 1)
|
||||||
|
#define OPTION_DOTSYMS (OPTION_STUBSYMS + 1)
|
||||||
#define OPTION_NO_DOTSYMS (OPTION_DOTSYMS + 1)
|
#define OPTION_NO_DOTSYMS (OPTION_DOTSYMS + 1)
|
||||||
#define OPTION_NO_TLS_OPT (OPTION_NO_DOTSYMS + 1)
|
#define OPTION_NO_TLS_OPT (OPTION_NO_DOTSYMS + 1)
|
||||||
'
|
'
|
||||||
|
|
||||||
PARSE_AND_LIST_LONGOPTS='
|
PARSE_AND_LIST_LONGOPTS='
|
||||||
{ "stub-group-size", required_argument, NULL, OPTION_STUBGROUP_SIZE },
|
{ "stub-group-size", required_argument, NULL, OPTION_STUBGROUP_SIZE },
|
||||||
|
{ "emit-stub-syms", no_argument, NULL, OPTION_STUBSYMS },
|
||||||
{ "dotsyms", no_argument, NULL, OPTION_DOTSYMS },
|
{ "dotsyms", no_argument, NULL, OPTION_DOTSYMS },
|
||||||
{ "no-dotsyms", no_argument, NULL, OPTION_NO_DOTSYMS },
|
{ "no-dotsyms", no_argument, NULL, OPTION_NO_DOTSYMS },
|
||||||
{ "no-tls-optimize", no_argument, NULL, OPTION_NO_TLS_OPT },
|
{ "no-tls-optimize", no_argument, NULL, OPTION_NO_TLS_OPT },
|
||||||
|
@ -494,6 +522,9 @@ PARSE_AND_LIST_OPTIONS='
|
||||||
the linker should choose suitable defaults.\n"
|
the linker should choose suitable defaults.\n"
|
||||||
));
|
));
|
||||||
fprintf (file, _("\
|
fprintf (file, _("\
|
||||||
|
--emit-stub-syms Label linker stubs with a symbol.\n"
|
||||||
|
));
|
||||||
|
fprintf (file, _("\
|
||||||
--dotsyms For every version pattern \"foo\" in a version script,\n\
|
--dotsyms For every version pattern \"foo\" in a version script,\n\
|
||||||
add \".foo\" so that function code symbols are\n\
|
add \".foo\" so that function code symbols are\n\
|
||||||
treated the same as function descriptor symbols.\n\
|
treated the same as function descriptor symbols.\n\
|
||||||
|
@ -517,6 +548,10 @@ PARSE_AND_LIST_ARGS_CASES='
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case OPTION_STUBSYMS:
|
||||||
|
emit_stub_syms = 1;
|
||||||
|
break;
|
||||||
|
|
||||||
case OPTION_DOTSYMS:
|
case OPTION_DOTSYMS:
|
||||||
dotsyms = 1;
|
dotsyms = 1;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue