I found today that none of the ld -z options are available on ELF targets that lack shared lib support (unless the target happens to provide some target specific options, which is weird). This patch rearranges the option support code in elf32.em to make a few useful options generally available, and moves a couple of x86/x86_64 options out of the general set. I'll commit this after running tests overnight. * 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.. * emultempl/plt_unwind.em: ..to here. New file. Add help. * emulparams/elf_i386.sh (EXTRA_EM_FILE): Define. * emulparams/elf_x86_64.sh (EXTRA_EM_FILE): Define. Index: ld/emultempl/elf32.em =================================================================== RCS file: /cvs/src/src/ld/emultempl/elf32.em,v retrieving revision 1.220 diff -u -p -r1.220 elf32.em --- ld/emultempl/elf32.em 20 Jun 2011 13:18:48 -0000 1.220 +++ ld/emultempl/elf32.em 13 Jul 2011 13:40:40 -0000 @@ -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 <