From: Alan Modra Date: Thu, 14 Jul 2011 02:38:43 +0000 (+0000) Subject: * emultempl/elf32.em (gld${EMULATION_NAME}_add_options, X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fb42df5ed908e2bb9ce52a389981ea8b1c97cdf8;p=binutils-gdb.git * emultempl/elf32.em (gld${EMULATION_NAME}_add_options, gld${EMULATION_NAME}_handle_option, gld${EMULATION_NAME}_list_options): Provide --build-id, -z defs, -z muldefs, -z max-page-size, -z common-page-size, -z execstack, -z noexecstack for all targets. Add help for --exclude-libs. (OPTION_LD_GENERATED_UNWIND_INFO, OPTION_NO_LD_GENERATED_UNWIND_INFO): Move this.. (gld${EMULATION_NAME}_handle_option): ..and code handling --ld-generated-unwind-info and --no-ld-generated-unwind-info.. * emulparams/plt_unwind.sh: ..to here. New file. Add help. * emulparams/elf32_x86_64.sh: Include plt_unwind.sh. * emulparams/elf_i386.sh: Likewise. * emulparams/elf_i386_chaos.sh: Likewise. * emulparams/elf_i386_ldso.sh: Likewise. * emulparams/elf_l1om.sh: Likewise. * emulparams/elf_x86_64.sh: Likewise. --- diff --git a/ld/ChangeLog b/ld/ChangeLog index fbbb5bdc23d..a14588d27df 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,22 @@ +2011-07-14 Alan Modra + + * emultempl/elf32.em (gld${EMULATION_NAME}_add_options, + gld${EMULATION_NAME}_handle_option, gld${EMULATION_NAME}_list_options): + Provide --build-id, -z defs, -z muldefs, -z max-page-size, + -z common-page-size, -z execstack, -z noexecstack for all targets. + Add help for --exclude-libs. + (OPTION_LD_GENERATED_UNWIND_INFO, + OPTION_NO_LD_GENERATED_UNWIND_INFO): Move this.. + (gld${EMULATION_NAME}_handle_option): ..and code handling + --ld-generated-unwind-info and --no-ld-generated-unwind-info.. + * emulparams/plt_unwind.sh: ..to here. New file. Add help. + * emulparams/elf32_x86_64.sh: Include plt_unwind.sh. + * emulparams/elf_i386.sh: Likewise. + * emulparams/elf_i386_chaos.sh: Likewise. + * emulparams/elf_i386_ldso.sh: Likewise. + * emulparams/elf_l1om.sh: Likewise. + * emulparams/elf_x86_64.sh: Likewise. + 2011-07-11 Catherine Moore * ld.h (section_flag_list): Add field to struct wildcard_spec. @@ -12,7 +31,7 @@ * ldlang.c (walk_wild_consider_section): Initialize section_flag_info field of the section struct. (lang_add_section): Check input section flags. - (lang_add_wild): Initialize section_flag_list field of + (lang_add_wild): Initialize section_flag_list field of the statement struct. * ldlang.h (lang_input_statement_struct): Add section_flag_list field. (lang_wild_statement_struct): Likewise. @@ -404,7 +423,7 @@ 2011-03-31 H.J. Lu * configure.tgt: Add elf_l1om to targ_extra_libpath for - x86_64-*-linux-*. + x86_64-*-linux-*. * emulparams/elf_l1om.sh: Remove duplicates. diff --git a/ld/emulparams/elf32_x86_64.sh b/ld/emulparams/elf32_x86_64.sh index 8895e29344e..d26a67fbe83 100644 --- a/ld/emulparams/elf32_x86_64.sh +++ b/ld/emulparams/elf32_x86_64.sh @@ -1,3 +1,4 @@ +. ${srcdir}/emulparams/plt_unwind.sh SCRIPT_NAME=elf ELFSIZE=32 OUTPUT_FORMAT="elf32-x86-64" diff --git a/ld/emulparams/elf_i386.sh b/ld/emulparams/elf_i386.sh index d48081194bf..1d1e4b42c93 100644 --- a/ld/emulparams/elf_i386.sh +++ b/ld/emulparams/elf_i386.sh @@ -1,3 +1,4 @@ +. ${srcdir}/emulparams/plt_unwind.sh SCRIPT_NAME=elf OUTPUT_FORMAT="elf32-i386" NO_RELA_RELOCS=yes diff --git a/ld/emulparams/elf_i386_chaos.sh b/ld/emulparams/elf_i386_chaos.sh index 1322174a165..b3005e194bd 100644 --- a/ld/emulparams/elf_i386_chaos.sh +++ b/ld/emulparams/elf_i386_chaos.sh @@ -1,3 +1,4 @@ +. ${srcdir}/emulparams/plt_unwind.sh SCRIPT_NAME=elf_chaos OUTPUT_FORMAT="elf32-i386" TEXT_START_ADDR=0x40000000 diff --git a/ld/emulparams/elf_i386_ldso.sh b/ld/emulparams/elf_i386_ldso.sh index 4b0d3fb6930..183731d718e 100644 --- a/ld/emulparams/elf_i386_ldso.sh +++ b/ld/emulparams/elf_i386_ldso.sh @@ -1,3 +1,4 @@ +. ${srcdir}/emulparams/plt_unwind.sh SCRIPT_NAME=elf OUTPUT_FORMAT="elf32-i386" NO_RELA_RELOCS=yes diff --git a/ld/emulparams/elf_l1om.sh b/ld/emulparams/elf_l1om.sh index 1af236046b7..1d22d696ca0 100644 --- a/ld/emulparams/elf_l1om.sh +++ b/ld/emulparams/elf_l1om.sh @@ -1,3 +1,4 @@ +. ${srcdir}/emulparams/plt_unwind.sh SCRIPT_NAME=elf ELFSIZE=64 OUTPUT_FORMAT="elf64-l1om" diff --git a/ld/emulparams/elf_x86_64.sh b/ld/emulparams/elf_x86_64.sh index 0e93ad8d5dc..a9218783644 100644 --- a/ld/emulparams/elf_x86_64.sh +++ b/ld/emulparams/elf_x86_64.sh @@ -1,3 +1,4 @@ +. ${srcdir}/emulparams/plt_unwind.sh SCRIPT_NAME=elf ELFSIZE=64 OUTPUT_FORMAT="elf64-x86-64" diff --git a/ld/emulparams/plt_unwind.sh b/ld/emulparams/plt_unwind.sh new file mode 100644 index 00000000000..c832570b215 --- /dev/null +++ b/ld/emulparams/plt_unwind.sh @@ -0,0 +1,28 @@ +PARSE_AND_LIST_PROLOGUE=' +#define OPTION_LD_GENERATED_UNWIND_INFO 301 +#define OPTION_NO_LD_GENERATED_UNWIND_INFO 302 +' + +PARSE_AND_LIST_LONGOPTS=' + {"ld-generated-unwind-info", no_argument, NULL, + OPTION_LD_GENERATED_UNWIND_INFO}, + {"no-ld-generated-unwind-info", no_argument, NULL, + OPTION_NO_LD_GENERATED_UNWIND_INFO}, +' + +PARSE_AND_LIST_OPTIONS=' + fprintf (file, _("\ + --ld-generated-unwind-info Generate exception handling info for PLT.\n\ + --no-ld-generated-unwind-info Don'\''t do so.\n" + )); +' + +PARSE_AND_LIST_ARGS_CASES=' + case OPTION_LD_GENERATED_UNWIND_INFO: + link_info.no_ld_generated_unwind_info = FALSE; + break; + + case OPTION_NO_LD_GENERATED_UNWIND_INFO: + link_info.no_ld_generated_unwind_info = TRUE; + break; +' diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em index 2453e58a59e..16cbaa4ac88 100644 --- a/ld/emultempl/elf32.em +++ b/ld/emultempl/elf32.em @@ -2106,8 +2106,6 @@ EOF fi fi -if test -n "$PARSE_AND_LIST_ARGS_CASES" -o x"$GENERATE_SHLIB_SCRIPT" = xyes; then - if test -n "$PARSE_AND_LIST_PROLOGUE" ; then fragment <