* emultempl/elf32.em: Remove "misnamed" comment. Rename to..
* emultempl/elf.em: ..this.
* configure.ac (elf_list_options): Adjust TEMPLATE_NAME grep.
* emulparams/aarch64cloudabi.sh (TEMPLATE_NAME): Set to elf.
* emulparams/aarch64elf.sh: Likewise.
* emulparams/aarch64elf32.sh: Likewise.
* emulparams/aarch64fbsd.sh: Likewise.
* emulparams/aarch64linux.sh: Likewise.
* emulparams/aarch64linux32.sh: Likewise.
* emulparams/arcelf.sh: Likewise.
* emulparams/arcelf_prof.sh: Likewise.
* emulparams/arclinux.sh: Likewise.
* emulparams/arclinux_prof.sh: Likewise.
* emulparams/arcv2elf.sh: Likewise.
* emulparams/arcv2elfx.sh: Likewise.
* emulparams/armelf.sh: Likewise.
* emulparams/armelf_fuchsia.sh: Likewise.
* emulparams/armelf_linux.sh: Likewise.
* emulparams/armelf_phoenix.sh: Likewise.
* emulparams/armnto.sh: Likewise.
* emulparams/avr1.sh: Likewise.
* emulparams/avr2.sh: Likewise.
* emulparams/avr25.sh: Likewise.
* emulparams/avr3.sh: Likewise.
* emulparams/avr31.sh: Likewise.
* emulparams/avr35.sh: Likewise.
* emulparams/avr4.sh: Likewise.
* emulparams/avr5.sh: Likewise.
* emulparams/avr51.sh: Likewise.
* emulparams/avr6.sh: Likewise.
* emulparams/avrtiny.sh: Likewise.
* emulparams/avrxmega1.sh: Likewise.
* emulparams/avrxmega2.sh: Likewise.
* emulparams/avrxmega3.sh: Likewise.
* emulparams/avrxmega4.sh: Likewise.
* emulparams/avrxmega5.sh: Likewise.
* emulparams/avrxmega6.sh: Likewise.
* emulparams/avrxmega7.sh: Likewise.
* emulparams/criself.sh: Likewise.
* emulparams/crislinux.sh: Likewise.
* emulparams/cskyelf.sh: Likewise.
* emulparams/d10velf.sh: Likewise.
* emulparams/elf32_sparc.sh: Likewise.
* emulparams/elf32_spu.sh: Likewise.
* emulparams/elf32_tic6x_le.sh: Likewise.
* emulparams/elf32_x86_64.sh: Likewise.
* emulparams/elf32am33lin.sh: Likewise.
* emulparams/elf32bfin.sh: Likewise.
* emulparams/elf32bfinfd.sh: Likewise.
* emulparams/elf32bmip.sh: Likewise.
* emulparams/elf32bmipn32-defs.sh: Likewise.
* emulparams/elf32cr16.sh: Likewise.
* emulparams/elf32cr16c.sh: Likewise.
* emulparams/elf32crx.sh: Likewise.
* emulparams/elf32epiphany.sh: Likewise.
* emulparams/elf32epiphany_4x4.sh: Likewise.
* emulparams/elf32frvfd.sh: Likewise.
* emulparams/elf32ip2k.sh: Likewise.
* emulparams/elf32lm32.sh: Likewise.
* emulparams/elf32lm32fd.sh: Likewise.
* emulparams/elf32lriscv-defs.sh: Likewise.
* emulparams/elf32m32c.sh: Likewise.
* emulparams/elf32mb_linux.sh: Likewise.
* emulparams/elf32mbel_linux.sh: Likewise.
* emulparams/elf32mcore.sh: Likewise.
* emulparams/elf32mep.sh: Likewise.
* emulparams/elf32metag.sh: Likewise.
* emulparams/elf32microblaze.sh: Likewise.
* emulparams/elf32mipswindiss.sh: Likewise.
* emulparams/elf32or1k.sh: Likewise.
* emulparams/elf32ppccommon.sh: Likewise.
* emulparams/elf32rl78.sh: Likewise.
* emulparams/elf32rx.sh: Likewise.
* emulparams/elf32tilegx.sh: Likewise.
* emulparams/elf32tilepro.sh: Likewise.
* emulparams/elf32vax.sh: Likewise.
* emulparams/elf32visium.sh: Likewise.
* emulparams/elf32xc16x.sh: Likewise.
* emulparams/elf32xc16xl.sh: Likewise.
* emulparams/elf32xc16xs.sh: Likewise.
* emulparams/elf32xstormy16.sh: Likewise.
* emulparams/elf32xtensa.sh: Likewise.
* emulparams/elf64_aix.sh: Likewise.
* emulparams/elf64_ia64.sh: Likewise.
* emulparams/elf64_s390.sh: Likewise.
* emulparams/elf64_sparc.sh: Likewise.
* emulparams/elf64alpha.sh: Likewise.
* emulparams/elf64bpf.sh: Likewise.
* emulparams/elf64hppa.sh: Likewise.
* emulparams/elf64mmix.sh: Likewise.
* emulparams/elf64rdos.sh: Likewise.
* emulparams/elf64tilegx.sh: Likewise.
* emulparams/elf_i386.sh: Likewise.
* emulparams/elf_i386_be.sh: Likewise.
* emulparams/elf_i386_ldso.sh: Likewise.
* emulparams/elf_i386_vxworks.sh: Likewise.
* emulparams/elf_iamcu.sh: Likewise.
* emulparams/elf_k1om.sh: Likewise.
* emulparams/elf_l1om.sh: Likewise.
* emulparams/elf_s390.sh: Likewise.
* emulparams/elf_x86_64.sh: Likewise.
* emulparams/h8300elf.sh: Likewise.
* emulparams/h8300elf_linux.sh: Likewise.
* emulparams/hppa64linux.sh: Likewise.
* emulparams/hppaelf.sh: Likewise.
* emulparams/hppalinux.sh: Likewise.
* emulparams/i386lynx.sh: Likewise.
* emulparams/i386moss.sh: Likewise.
* emulparams/i386nto.sh: Likewise.
* emulparams/m32relf.sh: Likewise.
* emulparams/m32relf_linux.sh: Likewise.
* emulparams/m68hc11elf.sh: Likewise.
* emulparams/m68hc11elfb.sh: Likewise.
* emulparams/m68hc12elf.sh: Likewise.
* emulparams/m68hc12elfb.sh: Likewise.
* emulparams/m68kelf.sh: Likewise.
* emulparams/mn10300.sh: Likewise.
* emulparams/nds32elf.sh: Likewise.
* emulparams/nds32elf16m.sh: Likewise.
* emulparams/nds32elf_linux.sh: Likewise.
* emulparams/nios2elf.sh: Likewise.
* emulparams/nios2linux.sh: Likewise.
* emulparams/pruelf.sh: Likewise.
* emulparams/score3_elf.sh: Likewise.
* emulparams/shelf.sh: Likewise.
* emulparams/shelf_nto.sh: Likewise.
* emulparams/shelf_vxworks.sh: Likewise.
* emulparams/shlelf_linux.sh: Likewise.
* emulparams/shlelf_nto.sh: Likewise.
* emulparams/v850.sh: Likewise.
* emulparams/v850_rh850.sh: Likewise.
* ldelf.c: Update comment.
* ldelf.h: Likewise.
* emultempl/aarch64elf.em: Likewise.
* emultempl/alphaelf.em: Likewise.
* emultempl/arclinux.em: Likewise.
* emultempl/armelf.em: Likewise.
* emultempl/avrelf.em: Likewise.
* emultempl/bfin.em: Likewise.
* emultempl/cr16elf.em: Likewise.
* emultempl/crxelf.em: Likewise.
* emultempl/cskyelf.em: Likewise.
* emultempl/elf-generic.em: Likewise.
* emultempl/elf-x86.em: Likewise.
* emultempl/epiphanyelf_4x4.em: Likewise.
* emultempl/hppaelf.em: Likewise.
* emultempl/ia64elf.em: Likewise.
* emultempl/m68hc1xelf.em: Likewise.
* emultempl/m68kelf.em: Likewise.
* emultempl/metagelf.em: Likewise.
* emultempl/mmix-elfnmmo.em: Likewise.
* emultempl/mmixelf.em: Likewise.
* emultempl/mmo.em: Likewise.
* emultempl/needrelax.em: Likewise.
* emultempl/nios2elf.em: Likewise.
* emultempl/ppc32elf.em: Likewise.
* emultempl/ppc64elf.em: Likewise.
* emultempl/pruelf.em: Likewise.
* emultempl/rxelf.em: Likewise.
* emultempl/scoreelf.em: Likewise.
* emultempl/spuelf.em: Likewise.
* emultempl/tic6xdsbt.em: Likewise.
* emultempl/v850elf.em: Likewise.
* emultempl/vms.em: Likewise.
* emultempl/vxworks.em: Likewise.
* emultempl/xtensaelf.em: Likewise.
* scripttempl/arclinux.sc: Likewise.
* scripttempl/armbpabi.sc: Likewise.
* scripttempl/elf.sc: Likewise.
* scripttempl/elf64bpf.sc: Likewise.
* scripttempl/elf64hppa.sc: Likewise.
* scripttempl/elf_chaos.sc: Likewise.
* scripttempl/elfarc.sc: Likewise.
* scripttempl/elfarcv2.sc: Likewise.
* scripttempl/elfd10v.sc: Likewise.
* scripttempl/elfm68hc11.sc: Likewise.
* scripttempl/elfm68hc12.sc: Likewise.
* scripttempl/elfm9s12z.sc: Likewise.
* scripttempl/elfxgate.sc: Likewise.
* scripttempl/elfxtensa.sc: Likewise.
* scripttempl/epiphany_4x4.sc: Likewise.
* scripttempl/iq2000.sc: Likewise.
* scripttempl/mep.sc: Likewise.
* scripttempl/nds32elf.sc: Likewise.
* scripttempl/v850.sc: Likewise.
* scripttempl/v850_rh850.sc: Likewise.
* scripttempl/xstormy16.sc: Likewise.
* testsuite/ld-arm/arm-dyn.ld: Likewise.
* testsuite/ld-arm/arm-lib.ld: Likewise.
* testsuite/ld-arm/arm-no-rel-plt.ld: Likewise.
* testsuite/ld-arm/fdpic-main.ld: Likewise.
* testsuite/ld-arm/fdpic-shared.ld: Likewise.
* testsuite/ld-elf/elf.exp: Likewise.
* testsuite/ld-elf/orphan-region.d: Likewise.
* testsuite/ld-elf/orphan.d: Likewise.
* testsuite/ld-elf/pr349.d: Likewise.
* testsuite/ld-elf/warn2.d: Likewise.
* testsuite/ld-elfvsb/elf-offset.ld: Likewise.
* testsuite/ld-mips-elf/mips-dyn.ld: Likewise.
* testsuite/ld-mips-elf/mips-lib.ld: Likewise.
* testsuite/ld-scripts/dynamic-sections.t: Likewise.
* testsuite/ld-shared/elf-offset.ld: Likewise.
* configure: Regenerate.
+2019-09-11 Alan Modra <amodra@gmail.com>
+
+ * emultempl/elf32.em: Remove "misnamed" comment. Rename to..
+ * emultempl/elf.em: ..this.
+ * configure.ac (elf_list_options): Adjust TEMPLATE_NAME grep.
+ * emulparams/aarch64cloudabi.sh (TEMPLATE_NAME): Set to elf.
+ * emulparams/aarch64elf.sh: Likewise.
+ * emulparams/aarch64elf32.sh: Likewise.
+ * emulparams/aarch64fbsd.sh: Likewise.
+ * emulparams/aarch64linux.sh: Likewise.
+ * emulparams/aarch64linux32.sh: Likewise.
+ * emulparams/arcelf.sh: Likewise.
+ * emulparams/arcelf_prof.sh: Likewise.
+ * emulparams/arclinux.sh: Likewise.
+ * emulparams/arclinux_prof.sh: Likewise.
+ * emulparams/arcv2elf.sh: Likewise.
+ * emulparams/arcv2elfx.sh: Likewise.
+ * emulparams/armelf.sh: Likewise.
+ * emulparams/armelf_fuchsia.sh: Likewise.
+ * emulparams/armelf_linux.sh: Likewise.
+ * emulparams/armelf_phoenix.sh: Likewise.
+ * emulparams/armnto.sh: Likewise.
+ * emulparams/avr1.sh: Likewise.
+ * emulparams/avr2.sh: Likewise.
+ * emulparams/avr25.sh: Likewise.
+ * emulparams/avr3.sh: Likewise.
+ * emulparams/avr31.sh: Likewise.
+ * emulparams/avr35.sh: Likewise.
+ * emulparams/avr4.sh: Likewise.
+ * emulparams/avr5.sh: Likewise.
+ * emulparams/avr51.sh: Likewise.
+ * emulparams/avr6.sh: Likewise.
+ * emulparams/avrtiny.sh: Likewise.
+ * emulparams/avrxmega1.sh: Likewise.
+ * emulparams/avrxmega2.sh: Likewise.
+ * emulparams/avrxmega3.sh: Likewise.
+ * emulparams/avrxmega4.sh: Likewise.
+ * emulparams/avrxmega5.sh: Likewise.
+ * emulparams/avrxmega6.sh: Likewise.
+ * emulparams/avrxmega7.sh: Likewise.
+ * emulparams/criself.sh: Likewise.
+ * emulparams/crislinux.sh: Likewise.
+ * emulparams/cskyelf.sh: Likewise.
+ * emulparams/d10velf.sh: Likewise.
+ * emulparams/elf32_sparc.sh: Likewise.
+ * emulparams/elf32_spu.sh: Likewise.
+ * emulparams/elf32_tic6x_le.sh: Likewise.
+ * emulparams/elf32_x86_64.sh: Likewise.
+ * emulparams/elf32am33lin.sh: Likewise.
+ * emulparams/elf32bfin.sh: Likewise.
+ * emulparams/elf32bfinfd.sh: Likewise.
+ * emulparams/elf32bmip.sh: Likewise.
+ * emulparams/elf32bmipn32-defs.sh: Likewise.
+ * emulparams/elf32cr16.sh: Likewise.
+ * emulparams/elf32cr16c.sh: Likewise.
+ * emulparams/elf32crx.sh: Likewise.
+ * emulparams/elf32epiphany.sh: Likewise.
+ * emulparams/elf32epiphany_4x4.sh: Likewise.
+ * emulparams/elf32frvfd.sh: Likewise.
+ * emulparams/elf32ip2k.sh: Likewise.
+ * emulparams/elf32lm32.sh: Likewise.
+ * emulparams/elf32lm32fd.sh: Likewise.
+ * emulparams/elf32lriscv-defs.sh: Likewise.
+ * emulparams/elf32m32c.sh: Likewise.
+ * emulparams/elf32mb_linux.sh: Likewise.
+ * emulparams/elf32mbel_linux.sh: Likewise.
+ * emulparams/elf32mcore.sh: Likewise.
+ * emulparams/elf32mep.sh: Likewise.
+ * emulparams/elf32metag.sh: Likewise.
+ * emulparams/elf32microblaze.sh: Likewise.
+ * emulparams/elf32mipswindiss.sh: Likewise.
+ * emulparams/elf32or1k.sh: Likewise.
+ * emulparams/elf32ppccommon.sh: Likewise.
+ * emulparams/elf32rl78.sh: Likewise.
+ * emulparams/elf32rx.sh: Likewise.
+ * emulparams/elf32tilegx.sh: Likewise.
+ * emulparams/elf32tilepro.sh: Likewise.
+ * emulparams/elf32vax.sh: Likewise.
+ * emulparams/elf32visium.sh: Likewise.
+ * emulparams/elf32xc16x.sh: Likewise.
+ * emulparams/elf32xc16xl.sh: Likewise.
+ * emulparams/elf32xc16xs.sh: Likewise.
+ * emulparams/elf32xstormy16.sh: Likewise.
+ * emulparams/elf32xtensa.sh: Likewise.
+ * emulparams/elf64_aix.sh: Likewise.
+ * emulparams/elf64_ia64.sh: Likewise.
+ * emulparams/elf64_s390.sh: Likewise.
+ * emulparams/elf64_sparc.sh: Likewise.
+ * emulparams/elf64alpha.sh: Likewise.
+ * emulparams/elf64bpf.sh: Likewise.
+ * emulparams/elf64hppa.sh: Likewise.
+ * emulparams/elf64mmix.sh: Likewise.
+ * emulparams/elf64rdos.sh: Likewise.
+ * emulparams/elf64tilegx.sh: Likewise.
+ * emulparams/elf_i386.sh: Likewise.
+ * emulparams/elf_i386_be.sh: Likewise.
+ * emulparams/elf_i386_ldso.sh: Likewise.
+ * emulparams/elf_i386_vxworks.sh: Likewise.
+ * emulparams/elf_iamcu.sh: Likewise.
+ * emulparams/elf_k1om.sh: Likewise.
+ * emulparams/elf_l1om.sh: Likewise.
+ * emulparams/elf_s390.sh: Likewise.
+ * emulparams/elf_x86_64.sh: Likewise.
+ * emulparams/h8300elf.sh: Likewise.
+ * emulparams/h8300elf_linux.sh: Likewise.
+ * emulparams/hppa64linux.sh: Likewise.
+ * emulparams/hppaelf.sh: Likewise.
+ * emulparams/hppalinux.sh: Likewise.
+ * emulparams/i386lynx.sh: Likewise.
+ * emulparams/i386moss.sh: Likewise.
+ * emulparams/i386nto.sh: Likewise.
+ * emulparams/m32relf.sh: Likewise.
+ * emulparams/m32relf_linux.sh: Likewise.
+ * emulparams/m68hc11elf.sh: Likewise.
+ * emulparams/m68hc11elfb.sh: Likewise.
+ * emulparams/m68hc12elf.sh: Likewise.
+ * emulparams/m68hc12elfb.sh: Likewise.
+ * emulparams/m68kelf.sh: Likewise.
+ * emulparams/mn10300.sh: Likewise.
+ * emulparams/nds32elf.sh: Likewise.
+ * emulparams/nds32elf16m.sh: Likewise.
+ * emulparams/nds32elf_linux.sh: Likewise.
+ * emulparams/nios2elf.sh: Likewise.
+ * emulparams/nios2linux.sh: Likewise.
+ * emulparams/pruelf.sh: Likewise.
+ * emulparams/score3_elf.sh: Likewise.
+ * emulparams/shelf.sh: Likewise.
+ * emulparams/shelf_nto.sh: Likewise.
+ * emulparams/shelf_vxworks.sh: Likewise.
+ * emulparams/shlelf_linux.sh: Likewise.
+ * emulparams/shlelf_nto.sh: Likewise.
+ * emulparams/v850.sh: Likewise.
+ * emulparams/v850_rh850.sh: Likewise.
+ * ldelf.c: Update comment.
+ * ldelf.h: Likewise.
+ * emultempl/aarch64elf.em: Likewise.
+ * emultempl/alphaelf.em: Likewise.
+ * emultempl/arclinux.em: Likewise.
+ * emultempl/armelf.em: Likewise.
+ * emultempl/avrelf.em: Likewise.
+ * emultempl/bfin.em: Likewise.
+ * emultempl/cr16elf.em: Likewise.
+ * emultempl/crxelf.em: Likewise.
+ * emultempl/cskyelf.em: Likewise.
+ * emultempl/elf-generic.em: Likewise.
+ * emultempl/elf-x86.em: Likewise.
+ * emultempl/epiphanyelf_4x4.em: Likewise.
+ * emultempl/hppaelf.em: Likewise.
+ * emultempl/ia64elf.em: Likewise.
+ * emultempl/m68hc1xelf.em: Likewise.
+ * emultempl/m68kelf.em: Likewise.
+ * emultempl/metagelf.em: Likewise.
+ * emultempl/mmix-elfnmmo.em: Likewise.
+ * emultempl/mmixelf.em: Likewise.
+ * emultempl/mmo.em: Likewise.
+ * emultempl/needrelax.em: Likewise.
+ * emultempl/nios2elf.em: Likewise.
+ * emultempl/ppc32elf.em: Likewise.
+ * emultempl/ppc64elf.em: Likewise.
+ * emultempl/pruelf.em: Likewise.
+ * emultempl/rxelf.em: Likewise.
+ * emultempl/scoreelf.em: Likewise.
+ * emultempl/spuelf.em: Likewise.
+ * emultempl/tic6xdsbt.em: Likewise.
+ * emultempl/v850elf.em: Likewise.
+ * emultempl/vms.em: Likewise.
+ * emultempl/vxworks.em: Likewise.
+ * emultempl/xtensaelf.em: Likewise.
+ * scripttempl/arclinux.sc: Likewise.
+ * scripttempl/armbpabi.sc: Likewise.
+ * scripttempl/elf.sc: Likewise.
+ * scripttempl/elf64bpf.sc: Likewise.
+ * scripttempl/elf64hppa.sc: Likewise.
+ * scripttempl/elf_chaos.sc: Likewise.
+ * scripttempl/elfarc.sc: Likewise.
+ * scripttempl/elfarcv2.sc: Likewise.
+ * scripttempl/elfd10v.sc: Likewise.
+ * scripttempl/elfm68hc11.sc: Likewise.
+ * scripttempl/elfm68hc12.sc: Likewise.
+ * scripttempl/elfm9s12z.sc: Likewise.
+ * scripttempl/elfxgate.sc: Likewise.
+ * scripttempl/elfxtensa.sc: Likewise.
+ * scripttempl/epiphany_4x4.sc: Likewise.
+ * scripttempl/iq2000.sc: Likewise.
+ * scripttempl/mep.sc: Likewise.
+ * scripttempl/nds32elf.sc: Likewise.
+ * scripttempl/v850.sc: Likewise.
+ * scripttempl/v850_rh850.sc: Likewise.
+ * scripttempl/xstormy16.sc: Likewise.
+ * testsuite/ld-arm/arm-dyn.ld: Likewise.
+ * testsuite/ld-arm/arm-lib.ld: Likewise.
+ * testsuite/ld-arm/arm-no-rel-plt.ld: Likewise.
+ * testsuite/ld-arm/fdpic-main.ld: Likewise.
+ * testsuite/ld-arm/fdpic-shared.ld: Likewise.
+ * testsuite/ld-elf/elf.exp: Likewise.
+ * testsuite/ld-elf/orphan-region.d: Likewise.
+ * testsuite/ld-elf/orphan.d: Likewise.
+ * testsuite/ld-elf/pr349.d: Likewise.
+ * testsuite/ld-elf/warn2.d: Likewise.
+ * testsuite/ld-elfvsb/elf-offset.ld: Likewise.
+ * testsuite/ld-mips-elf/mips-dyn.ld: Likewise.
+ * testsuite/ld-mips-elf/mips-lib.ld: Likewise.
+ * testsuite/ld-scripts/dynamic-sections.t: Likewise.
+ * testsuite/ld-shared/elf-offset.ld: Likewise.
+ * configure: Regenerate.
+
2019-09-11 Alan Modra <amodra@gmail.com>
* Makefile.am (ALL_EMUL_EXTRA_OFILES): Add ldelf and ldelfgen.
elf_list_options=TRUE
;;
*)
- if $GREP "TEMPLATE_NAME=elf32" ${srcdir}/emulparams/${i}.sh >/dev/null 2>/dev/null; then
+ if $GREP "TEMPLATE_NAME=elf" ${srcdir}/emulparams/${i}.sh >/dev/null 2>/dev/null; then
elf_list_options=TRUE
fi
;;
elf_list_options=TRUE
;;
*)
- if $GREP "TEMPLATE_NAME=elf32" ${srcdir}/emulparams/${i}.sh >/dev/null 2>/dev/null; then
+ if $GREP "TEMPLATE_NAME=elf" ${srcdir}/emulparams/${i}.sh >/dev/null 2>/dev/null; then
elf_list_options=TRUE
fi
;;
LITTLE_OUTPUT_FORMAT="elf64-littleaarch64-cloudabi"
NO_REL_RELOCS=yes
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
EXTRA_EM_FILE=aarch64elf
GENERATE_SHLIB_SCRIPT=yes
LITTLE_OUTPUT_FORMAT="elf64-littleaarch64"
NO_REL_RELOCS=yes
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
EXTRA_EM_FILE=aarch64elf
GENERATE_SHLIB_SCRIPT=yes
LITTLE_OUTPUT_FORMAT="elf32-littleaarch64"
NO_REL_RELOCS=yes
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
EXTRA_EM_FILE=aarch64elf
GENERATE_SHLIB_SCRIPT=yes
LITTLE_OUTPUT_FORMAT="elf64-littleaarch64"
NO_REL_RELOCS=yes
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
EXTRA_EM_FILE=aarch64elf
GENERATE_SHLIB_SCRIPT=yes
LITTLE_OUTPUT_FORMAT="elf64-littleaarch64"
NO_REL_RELOCS=yes
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
EXTRA_EM_FILE=aarch64elf
GENERATE_SHLIB_SCRIPT=yes
LITTLE_OUTPUT_FORMAT="elf32-littleaarch64"
NO_REL_RELOCS=yes
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
EXTRA_EM_FILE=aarch64elf
GENERATE_SHLIB_SCRIPT=yes
source_sh ${srcdir}/emulparams/arc-endianness.sh
SCRIPT_NAME=elfarc
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
if [ "x${ARC_ENDIAN}" = "xbig" ]; then
OUTPUT_FORMAT="elf32-bigarc"
else
source_sh ${srcdir}/emulparams/arc-endianness.sh
SCRIPT_NAME=elfarc
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
if [ "x${ARC_ENDIAN}" = "xbig" ]; then
OUTPUT_FORMAT="elf32-bigarc"
else
MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
ENTRY=__start
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
EXTRA_EM_FILE=arclinux
GENERATE_SHLIB_SCRIPT=yes
GENERATE_PIE_SCRIPT=yes
ARCH=arc
MACHINE=
ENTRY=__start
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
EXTRA_EM_FILE=arclinux
GENERATE_SHLIB_SCRIPT=yes
SDATA_START_SYMBOLS='__SDATA_BEGIN__ = .;'
MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
EMBEDDED=yes
GENERIC_BOARD=no
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
LITTLE_OUTPUT_FORMAT="elf32-littlearc"
BIG_OUTPUT_FORMAT="elf32-bigarc"
TEXT_START_ADDR=0x100
ARCH=arc
MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
GENERIC_BOARD=yes
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
LITTLE_OUTPUT_FORMAT="elf32-littlearc"
BIG_OUTPUT_FORMAT="elf32-bigarc"
TEXT_START_ADDR=0x100
BIG_OUTPUT_FORMAT="elf32-bigarm"
LITTLE_OUTPUT_FORMAT="elf32-littlearm"
TEXT_START_ADDR=0x8000
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
EXTRA_EM_FILE=armelf
OTHER_TEXT_SECTIONS='*(.glue_7t) *(.glue_7) *(.vfp11_veneer) *(.v4_bx)'
OTHER_BSS_SYMBOLS="${CREATE_SHLIB+PROVIDE (}__bss_start__ = .${CREATE_SHLIB+)};"
LITTLE_OUTPUT_FORMAT="elf32-littlearm"
MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
EXTRA_EM_FILE=armelf
GENERATE_SHLIB_SCRIPT=yes
GENERATE_PIE_SCRIPT=yes
LITTLE_OUTPUT_FORMAT="elf32-littlearm"
MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
EXTRA_EM_FILE=armelf
GENERATE_SHLIB_SCRIPT=yes
GENERATE_PIE_SCRIPT=yes
LITTLE_OUTPUT_FORMAT="elf32-littlearm"
MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
EXTRA_EM_FILE=armelf
GENERATE_SHLIB_SCRIPT=yes
GENERATE_PIE_SCRIPT=yes
BIG_OUTPUT_FORMAT="elf32-bigarm"
LITTLE_OUTPUT_FORMAT="elf32-littlearm"
TEXT_START_ADDR=0x00100000
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
EXTRA_EM_FILE=armelf
OTHER_TEXT_SECTIONS='*(.glue_7t) *(.glue_7) *(.vfp11_veneer) *(.v4_bx)'
OTHER_BSS_SYMBOLS="${CREATE_SHLIB+PROVIDE (}__bss_start__ = .${CREATE_SHLIB+)};"
OUTPUT_FORMAT="elf32-avr"
MAXPAGESIZE=1
EMBEDDED=yes
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
TEXT_LENGTH=8K
DATA_ORIGIN=0x800060
OUTPUT_FORMAT="elf32-avr"
MAXPAGESIZE=1
EMBEDDED=yes
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
TEXT_LENGTH=8K
DATA_ORIGIN=0x800060
OUTPUT_FORMAT="elf32-avr"
MAXPAGESIZE=1
EMBEDDED=yes
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
TEXT_LENGTH=8K
DATA_ORIGIN=0x800060
OUTPUT_FORMAT="elf32-avr"
MAXPAGESIZE=1
EMBEDDED=yes
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
TEXT_LENGTH=128K
DATA_ORIGIN=0x800060
OUTPUT_FORMAT="elf32-avr"
MAXPAGESIZE=1
EMBEDDED=yes
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
TEXT_LENGTH=128K
DATA_ORIGIN=0x800060
OUTPUT_FORMAT="elf32-avr"
MAXPAGESIZE=1
EMBEDDED=yes
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
TEXT_LENGTH=64K
DATA_ORIGIN=0x800060
OUTPUT_FORMAT="elf32-avr"
MAXPAGESIZE=1
EMBEDDED=yes
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
TEXT_LENGTH=8K
DATA_ORIGIN=0x800060
OUTPUT_FORMAT="elf32-avr"
MAXPAGESIZE=1
EMBEDDED=yes
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
TEXT_LENGTH=128K
DATA_ORIGIN=0x800060
OUTPUT_FORMAT="elf32-avr"
MAXPAGESIZE=1
EMBEDDED=yes
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
TEXT_LENGTH=128K
DATA_ORIGIN=0x800100
OUTPUT_FORMAT="elf32-avr"
MAXPAGESIZE=1
EMBEDDED=yes
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
TEXT_LENGTH=1024K
DATA_ORIGIN=0x800200
OUTPUT_FORMAT="elf32-avr"
MAXPAGESIZE=1
EMBEDDED=yes
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
TEXT_LENGTH=4K
DATA_ORIGIN=0x0800040
OUTPUT_FORMAT="elf32-avr"
MAXPAGESIZE=1
EMBEDDED=yes
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
TEXT_LENGTH=1024K
DATA_ORIGIN=0x802000
OUTPUT_FORMAT="elf32-avr"
MAXPAGESIZE=1
EMBEDDED=yes
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
TEXT_LENGTH=1024K
DATA_ORIGIN=0x802000
OUTPUT_FORMAT="elf32-avr"
MAXPAGESIZE=1
EMBEDDED=yes
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
TEXT_LENGTH=1024K
DATA_ORIGIN=0x802000
OUTPUT_FORMAT="elf32-avr"
MAXPAGESIZE=1
EMBEDDED=yes
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
TEXT_LENGTH=1024K
DATA_ORIGIN=0x802000
OUTPUT_FORMAT="elf32-avr"
MAXPAGESIZE=1
EMBEDDED=yes
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
TEXT_LENGTH=1024K
DATA_ORIGIN=0x802000
OUTPUT_FORMAT="elf32-avr"
MAXPAGESIZE=1
EMBEDDED=yes
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
TEXT_LENGTH=1024K
DATA_ORIGIN=0x802000
OUTPUT_FORMAT="elf32-avr"
MAXPAGESIZE=1
EMBEDDED=yes
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
TEXT_LENGTH=1024K
DATA_ORIGIN=0x802000
# This is for embedded products (no MMU) with ELF.
MACHINE=
SCRIPT_NAME=elf
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
# Symbols have underscore prepended.
OUTPUT_FORMAT="elf32-us-cris"
OUTPUT_FORMAT="elf32-cris"
NO_REL_RELOCS=yes
ARCH=cris
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
ENTRY=_start
# This sets the stack to the top of the simulator memory (2^19 bytes).
# STACK_ADDR=0x80000
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
ARCH=d10v
MAXPAGESIZE=32
EMBEDDED=t
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
ALIGNMENT=8
ARCH=sparc
MACHINE=
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
DATA_PLT=
GENERATE_SHLIB_SCRIPT=yes
GENERATE_PIE_SCRIPT=yes
SCRIPT_NAME=elf
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
EXTRA_EM_FILE=spuelf
OUTPUT_FORMAT="elf32-spu"
NO_REL_RELOCS=yes
SCRIPT_NAME=elf
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
OUTPUT_FORMAT="elf32-tic6x-le"
BIG_OUTPUT_FORMAT="elf32-tic6x-be"
EXTRA_EM_FILE=tic6xdsbt
COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
ARCH="i386:x64-32"
MACHINE=
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
EXTRA_EM_FILE="elf-x86"
GENERATE_SHLIB_SCRIPT=yes
GENERATE_PIE_SCRIPT=yes
ARCH=mn10300
MACHINE=
NOP=0xcbcb
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
GENERATE_SHLIB_SCRIPT=yes
TARGET_PAGE_SIZE=0x1000
ARCH=bfin
MACHINE=
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
GENERATE_SHLIB_SCRIPT=yes
EMBEDDED=yes
USER_LABEL_PREFIX=_
unset STACK_ADDR
OUTPUT_FORMAT="elf32-bfinfdpic"
MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
GENERATE_SHLIB_SCRIPT=yes
GENERATE_PIE_SCRIPT=yes
EMBEDDED= # This gets us program headers mapped as part of the text segment.
"
ARCH=mips
MACHINE=
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
EXTRA_EM_FILE=mipself
GENERATE_SHLIB_SCRIPT=yes
GENERATE_PIE_SCRIPT=yes
BIG_OUTPUT_FORMAT="elf32-bigmips"
LITTLE_OUTPUT_FORMAT="elf32-littlemips"
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
EXTRA_EM_FILE=mipself
# Note: use "x$var" not x"$var" in case directive in order to work around bug in bash 4.2
SCRIPT_NAME=elf32cr16
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
OUTPUT_FORMAT="elf32-cr16"
ARCH=cr16
ENTRY=_start
SCRIPT_NAME=elf32cr16c
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
OUTPUT_FORMAT="elf32-cr16c"
ARCH=cr16c
ENTRY=_start
SCRIPT_NAME=elf32crx
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
OUTPUT_FORMAT="elf32-crx"
ARCH=crx
ENTRY=_start
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
MACHINE=
SCRIPT_NAME=elf
OUTPUT_FORMAT="elf32-epiphany"
SCRIPT_NAME=epiphany_4x4
OUTPUT_FORMAT="elf32-epiphany"
TEXT_START_ADDR=0x40
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
EXTRA_EM_FILE=epiphanyelf_4x4
OTHER_TEXT_SECTIONS=
OTHER_BSS_SYMBOLS=
unset STACK_ADDR
OUTPUT_FORMAT="elf32-frvfdpic"
MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
unset EXTRA_EM_FILE
GENERATE_SHLIB_SCRIPT=yes
GENERATE_PIE_SCRIPT=yes
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
MACHINE=
SCRIPT_NAME=elf
OUTPUT_FORMAT="elf32-ip2k"
OUTPUT_FORMAT="elf32-lm32"
MAXPAGESIZE=0x1000
EMBEDDED=yes
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
TEXT_START_ADDR=0x0000
DYNAMIC_LINK=FALSE
ALIGNMENT=4
unset DYNAMIC_LINK
OUTPUT_FORMAT="elf32-lm32fdpic"
MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
GENERATE_SHLIB_SCRIPT=yes
GENERATE_PIE_SCRIPT=yes
EMBEDDED= # This gets us program headers mapped as part of the text segment.
ARCH=riscv
NO_REL_RELOCS=yes
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
EXTRA_EM_FILE=riscvelf
ELFSIZE=32
ARCH=m32c
ENTRY=_start
EMBEDDED=yes
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
EXTRA_EM_FILE=needrelax
ELFSIZE=32
MAXPAGESIZE=256
NOP=0x80000000
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
GENERATE_SHLIB_SCRIPT=yes
GENERATE_PIE_SCRIPT=yes
NO_SMALL_DATA=yes
NOP=0x80000000
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
GENERATE_SHLIB_SCRIPT=yes
GENERATE_PIE_SCRIPT=yes
NO_SMALL_DATA=yes
# This sets the stack to the top of the simulator memory (2^19 bytes).
STACK_ADDR=0x80000
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
# This code gets inserted into the generic elf32.sc linker script
# and allows us to define our own command line switches.
MAXPAGESIZE=256
ENTRY=_start
EMBEDDED=yes
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
if test -n "${RELOCATING}"; then
DATA_START_SYMBOLS='__data_start = . ;'
MACHINE=
SCRIPT_NAME=elf
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
GENERATE_SHLIB_SCRIPT=yes
GENERATE_PIE_SCRIPT=yes
OUTPUT_FORMAT="elf32-metag"
#$@{RELOCATING+ PROVIDE (__stack = 0x7000);@}
#OTHER_RELOCATING_SECTIONS='PROVIDE (_stack = _end + 0x1000);'
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
#GENERATE_SHLIB_SCRIPT=yes
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
EXTRA_EM_FILE=mipself
SCRIPT_NAME=elf
OUTPUT_FORMAT="elf32-bigmips"
SCRIPT_NAME=elf
MACHINE=
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
OUTPUT_FORMAT="elf32-or1k"
NOP=0x15000000
TEXT_START_ADDR=0x0000
# elf32ppc.sh elf32ppcvxworks.sh elf64ppc.sh
source_sh ${srcdir}/emulparams/dynamic_undefined_weak.sh
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
GENERATE_SHLIB_SCRIPT=yes
GENERATE_PIE_SCRIPT=yes
SCRIPT_NAME=elf
ARCH=rl78
ENTRY=_start
EMBEDDED=yes
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
ELFSIZE=32
# EXTRA_EM_FILE=needrelax
MAXPAGESIZE=256
ARCH=rx
ENTRY=_start
EMBEDDED=yes
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
EXTRA_EM_FILE=rxelf
# EXTRA_EM_FILE=needrelax
ELFSIZE=32
ALIGNMENT=64
MACHINE=
NOP=0
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
GENERATE_SHLIB_SCRIPT=yes
GENERATE_COMBRELOC_SCRIPT=yes
GENERATE_PIE_SCRIPT=yes
ALIGNMENT=64
MACHINE=
NOP=0
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
GENERATE_SHLIB_SCRIPT=yes
GENERATE_COMBRELOC_SCRIPT=yes
GENERATE_PIE_SCRIPT=yes
ARCH=vax
MACHINE=
NOP=0x0101
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
GENERATE_SHLIB_SCRIPT=yes
NO_SMALL_DATA=yes
NONPAGED_TEXT_START_ADDR=0x10000
ARCH=visium
MACHINE=
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
DYNAMIC_LINK=FALSE
SCRIPT_NAME=elf32xc16x
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
OUTPUT_FORMAT="elf32-xc16x"
TEXT_START_ADDR=0x00400
ARCH=xc16x
SCRIPT_NAME=elf32xc16xl
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
OUTPUT_FORMAT="elf32-xc16x"
TEXT_START_ADDR=0xc00300
ARCH=xc16x:xc16xl
SCRIPT_NAME=elf32xc16xs
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
OUTPUT_FORMAT="elf32-xc16x"
TEXT_START_ADDR=0xc00300
ARCH=xc16x:xc16xs
MACHINE=
SCRIPT_NAME=xstormy16
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
EXTRA_EM_FILE=needrelax
OUTPUT_FORMAT="elf32-xstormy16"
# See also `include/elf/xstormy16.h'
SCRIPT_NAME=elfxtensa
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
EXTRA_EM_FILE=xtensaelf
OUTPUT_FORMAT=undefined
BIG_OUTPUT_FORMAT="elf32-xtensa-be"
# See genscripts.sh and ../scripttempl/elf.sc for the meaning of these.
SCRIPT_NAME=elf
ELFSIZE=64
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
OUTPUT_FORMAT="elf64-ia64-aix-little"
ARCH=ia64
MACHINE=
# See genscripts.sh and ../scripttempl/elf.sc for the meaning of these.
SCRIPT_NAME=elf
ELFSIZE=64
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
EXTRA_EM_FILE=ia64elf
OUTPUT_FORMAT="elf64-ia64-little"
ARCH=ia64
ARCH="s390:64-bit"
MACHINE=
NOP=0x07070707
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
GENERATE_SHLIB_SCRIPT=yes
GENERATE_PIE_SCRIPT=yes
GENERATE_RELRO_SCRIPT=yes
SCRIPT_NAME=elf
ELFSIZE=64
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
OUTPUT_FORMAT="elf64-sparc"
NO_REL_RELOCS=yes
MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
ENTRY=_start
SCRIPT_NAME=elf
ELFSIZE=64
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
EXTRA_EM_FILE=alphaelf
OUTPUT_FORMAT="elf64-alpha"
NO_REL_RELOCS=yes
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
SCRIPT_NAME=elf64bpf
BIG_OUTPUT_FORMAT="elf64-bpfbe"
LITTLE_OUTPUT_FORMAT="elf64-bpfle"
ARCH=hppa
MACHINE=hppa2.0w
ENTRY="main"
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
GENERATE_SHLIB_SCRIPT=yes
# We really want multiple .stub sections, one for each input .text section,
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
GENERATE_SHLIB_SCRIPT=yes
ELFSIZE=64
SCRIPT_NAME=elf
LARGE_DATA_ADDR=0x80020000000
ARCH="i386:x86-64"
MACHINE=
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
EXTRA_EM_FILE="elf-x86"
GENERATE_SHLIB_SCRIPT=yes
GENERATE_PIE_SCRIPT=yes
ALIGNMENT=64
MACHINE=
NOP=0
-# Note that "elf32.em" actually handles elf64 also.
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
GENERATE_SHLIB_SCRIPT=yes
GENERATE_COMBRELOC_SCRIPT=yes
GENERATE_PIE_SCRIPT=yes
COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
ARCH=i386
MACHINE=
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
EXTRA_EM_FILE="elf-x86"
GENERATE_SHLIB_SCRIPT=yes
GENERATE_PIE_SCRIPT=yes
MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
ARCH=i386
MACHINE=
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
EXTRA_EM_FILE="elf-x86"
GENERATE_SHLIB_SCRIPT=yes
NO_SMALL_DATA=yes
MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
ARCH=i386
MACHINE=
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
GENERATE_SHLIB_SCRIPT=yes
ELF_INTERPRETER_NAME=\"/usr/lib/ld.so.1\"
NO_SMALL_DATA=yes
COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
ARCH=i386
MACHINE=
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
EXTRA_EM_FILE="elf-x86"
GENERATE_SHLIB_SCRIPT=yes
GENERATE_PIE_SCRIPT=yes
ARCH=iamcu
MACHINE=
COMPILE_IN=yes
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
EXTRA_EM_FILE="elf-x86"
GENERATE_SHLIB_SCRIPT=yes
GENERATE_PIE_SCRIPT=yes
ARCH="k1om"
MACHINE=
COMPILE_IN=yes
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
EXTRA_EM_FILE="elf-x86"
GENERATE_SHLIB_SCRIPT=yes
GENERATE_PIE_SCRIPT=yes
ARCH="l1om"
MACHINE=
COMPILE_IN=yes
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
EXTRA_EM_FILE="elf-x86"
GENERATE_SHLIB_SCRIPT=yes
GENERATE_PIE_SCRIPT=yes
ARCH="s390:31-bit"
MACHINE=
NOP=0x07070707
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
GENERATE_SHLIB_SCRIPT=yes
GENERATE_PIE_SCRIPT=yes
NO_SMALL_DATA=yes
COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
ARCH="i386:x86-64"
MACHINE=
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
EXTRA_EM_FILE="elf-x86"
GENERATE_SHLIB_SCRIPT=yes
GENERATE_PIE_SCRIPT=yes
MAXPAGESIZE=2
TARGET_PAGE_SIZE=128
ARCH=h8300
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
EMBEDDED=yes
STACK_ADDR=0xfefc
TINY_READONLY_SECTION=".tinyrodata :
MAXPAGESIZE=2
TARGET_PAGE_SIZE=128
ARCH=h8300
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
EMBEDDED=yes
STACK_ADDR=0xfefc
TINY_READONLY_SECTION=".tinyrodata :
ARCH=hppa
MACHINE=hppa2.0w
ENTRY="main"
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
GENERATE_SHLIB_SCRIPT=yes
# We really want multiple .stub sections, one for each input .text section,
ARCH=hppa
NOP=0x08000240
START="$START$"
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
EXTRA_EM_FILE=hppaelf
PLT_BEFORE_GOT=
GENERATE_SHLIB_SCRIPT=yes
GENERATE_PIE_SCRIPT=yes
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
EXTRA_EM_FILE=hppaelf
ARCH=i386
MACHINE=
NOP=0x9090
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
EXTRA_EM_FILE="elf-x86"
GENERATE_SHLIB_SCRIPT=yes
ELF_INTERPRETER_NAME=\"/usr/lib/ld.so.1\"
ARCH=i386
MACHINE=
NOP=0x90909090
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
EXTRA_EM_FILE="elf-x86"
GENERATE_SHLIB_SCRIPT=yes
ARCH=i386
MACHINE=
NOP=0x9090
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
EXTRA_EM_FILE="elf-x86"
GENERATE_SHLIB_SCRIPT=yes
MACHINE=
SCRIPT_NAME=elf
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
OUTPUT_FORMAT="elf32-m32r"
TEXT_START_ADDR=0x100
ARCH=m32r
MACHINE=
SCRIPT_NAME=elf
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
OUTPUT_FORMAT="elf32-m32r-linux"
TEXT_START_ADDR=0x1000
ARCH=m32r
MAXPAGESIZE=32
EMBEDDED=yes
GENERIC_BOARD=no
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
EXTRA_EM_FILE=m68hc1xelf
ARCH=m68hc11
MAXPAGESIZE=32
GENERIC_BOARD=yes
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
EXTRA_EM_FILE=m68hc1xelf
MAXPAGESIZE=32
EMBEDDED=yes
GENERIC_BOARD=no
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
EXTRA_EM_FILE=m68hc1xelf
ARCH=m68hc12
MAXPAGESIZE=32
GENERIC_BOARD=yes
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
EXTRA_EM_FILE=m68hc1xelf
ARCH=m68k
MACHINE=
NOP=0x4e714e71
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
EXTRA_EM_FILE=m68kelf
GENERATE_SHLIB_SCRIPT=yes
GENERATE_PIE_SCRIPT=yes
source_sh ${srcdir}/emulparams/mn10200.sh
OUTPUT_FORMAT="elf32-mn10300"
ARCH=mn10300
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
unset EXTRA_EM_FILE
GENERATE_SHLIB_SCRIPT=yes
OTHER_END_SYMBOLS='PROVIDE (_stack = 0x3000000);'
SCRIPT_NAME=nds32elf
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
EXTRA_EM_FILE=nds32elf
BIG_OUTPUT_FORMAT="elf32-nds32be"
LITTLE_OUTPUT_FORMAT="elf32-nds32le"
OTHER_END_SYMBOLS='PROVIDE (_stack = 0x780000);'
SCRIPT_NAME=nds32elf
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
EXTRA_EM_FILE=nds32elf
BIG_OUTPUT_FORMAT="elf32-nds32be"
LITTLE_OUTPUT_FORMAT="elf32-nds32le"
DEFAULT_STACK_START_ADDR=0
MACHINE=
SCRIPT_NAME=nds32elf
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
EXTRA_EM_FILE=nds32elf
BIG_OUTPUT_FORMAT="elf32-nds32be-linux"
LITTLE_OUTPUT_FORMAT="elf32-nds32le-linux"
SCRIPT_NAME=elf
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
EXTRA_EM_FILE=nios2elf
OUTPUT_FORMAT="elf32-littlenios2"
LITTLE_OUTPUT_FORMAT="elf32-littlenios2"
SCRIPT_NAME=elf
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
EXTRA_EM_FILE="nios2elf"
OUTPUT_FORMAT="elf32-littlenios2"
LITTLE_OUTPUT_FORMAT="elf32-littlenios2"
SCRIPT_NAME=elf
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
OUTPUT_FORMAT="elf32-pru"
LITTLE_OUTPUT_FORMAT="elf32-pru"
SCRIPT_NAME=pru
MACHINE=
SCRIPT_NAME=elf
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
EXTRA_EM_FILE=scoreelf
OUTPUT_FORMAT="elf32-bigscore"
BIG_OUTPUT_FORMAT="elf32-bigscore"
MAXPAGESIZE=128
ARCH=sh
MACHINE=
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
GENERATE_SHLIB_SCRIPT=yes
EMBEDDED=yes
# These are for compatibility with the COFF toolchain.
MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
ARCH=sh
MACHINE=
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
GENERATE_SHLIB_SCRIPT=yes
TEXT_START_SYMBOLS="${CREATE_SHLIB+PROVIDE (}_btext = .${CREATE_SHLIB+)};"
ENTRY=_start
MAXPAGESIZE='CONSTANT (MAXPAGESIZE)'
ARCH=sh
MACHINE=
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
GENERATE_SHLIB_SCRIPT=yes
ENTRY=__start
SYMPREFIX=_
COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
ARCH=sh
MACHINE=
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
GENERATE_SHLIB_SCRIPT=yes
GENERATE_PIE_SCRIPT=yes
MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
ARCH=sh
MACHINE=
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
GENERATE_SHLIB_SCRIPT=yes
TEXT_START_SYMBOLS="${CREATE_SHLIB+PROVIDE (}_btext = .${CREATE_SHLIB+)};"
ENTRY=_start
MAXPAGESIZE=256
ENTRY=_start
EMBEDDED=yes
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
MAXPAGESIZE=256
ENTRY=_start
EMBEDDED=yes
-TEMPLATE_NAME=elf32
+TEMPLATE_NAME=elf
# see <http://www.gnu.org/licenses/>.
#
-# This file is sourced from elf32.em, and defines extra aarch64-elf
+# This file is sourced from elf.em, and defines extra aarch64-elf
# specific routines.
#
fragment <<EOF
# MA 02110-1301, USA.
#
-# This file is sourced from elf32.em, and defines extra alpha
+# This file is sourced from elf.em, and defines extra alpha
# specific routines.
#
fragment <<EOF
# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
# MA 02110-1301, USA.
-# This file is sourced from elf32.em, and defines extra arc-linux
+# This file is sourced from elf.em, and defines extra arc-linux
# specific routines.
#
# MA 02110-1301, USA.
#
-# This file is sourced from elf32.em, and defines extra arm-elf
+# This file is sourced from elf.em, and defines extra arm-elf
# specific routines.
#
test -z "$TARGET2_TYPE" && TARGET2_TYPE="rel"
# MA 02110-1301, USA.
-# This file is sourced from elf32.em, and defines extra avr-elf specific
+# This file is sourced from elf.em, and defines extra avr-elf specific
# routines. It is used to generate the trampolines for the avr6 family
# of devices where one needs to address the issue that it is not possible
# to reach the whole program memory by using 16 bit pointers.
# MA 02110-1301, USA.
#
-# This file is sourced from elf32.em, and defines extra bfin-elf
+# This file is sourced from elf.em, and defines extra bfin-elf
# specific routines.
#
fragment <<EOF
# MA 02110-1301, USA.
#
-# This file is sourced from elf32.em, and defines extra cr16-elf
+# This file is sourced from elf.em, and defines extra cr16-elf
# specific routines.
#
fragment <<EOF
# MA 02110-1301, USA.
#
-# This file is sourced from elf32.em, and defines extra crx-elf
+# This file is sourced from elf.em, and defines extra crx-elf
# specific routines.
#
fragment <<EOF
# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
# MA 02110-1301, USA.
-# This file is sourced from elf32.em, and defines extra C-SKY ELF
+# This file is sourced from elf.em, and defines extra C-SKY ELF
# specific routines.
#
fragment <<EOF
# MA 02110-1301, USA.
#
-# This file is sourced from elf32.em and from ELF targets that use
+# This file is sourced from elf.em and from ELF targets that use
# generic.em.
#
fragment <<EOF
# see <http://www.gnu.org/licenses/>.
#
-# This file is sourced from elf32.em, and defines x86 specific routines.
+# This file is sourced from elf.em, and defines x86 specific routines.
#
fragment <<EOF
--- /dev/null
+# This shell script emits a C file. -*- C -*-
+# It does some substitutions.
+test -z "${ELFSIZE}" && ELFSIZE=32
+if [ -z "$MACHINE" ]; then
+ OUTPUT_ARCH=${ARCH}
+else
+ OUTPUT_ARCH=${ARCH}:${MACHINE}
+fi
+fragment <<EOF
+/* This file is is generated by a shell script. DO NOT EDIT! */
+
+/* ${ELFSIZE} bit ELF emulation code for ${EMULATION_NAME}
+ Copyright (C) 1991-2019 Free Software Foundation, Inc.
+ Written by Steve Chamberlain <sac@cygnus.com>
+ ELF support by Ian Lance Taylor <ian@cygnus.com>
+
+ This file is part of the GNU Binutils.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
+ MA 02110-1301, USA. */
+
+#define TARGET_IS_${EMULATION_NAME}
+
+#include "sysdep.h"
+#include "bfd.h"
+#include "libiberty.h"
+#include "getopt.h"
+#include "bfdlink.h"
+#include "ld.h"
+#include "ldmain.h"
+#include "ldmisc.h"
+#include "ldexp.h"
+#include "ldlang.h"
+#include "ldfile.h"
+#include "ldemul.h"
+#include <ldgram.h>
+#include "elf-bfd.h"
+#include "ldelf.h"
+#include "ldelfgen.h"
+
+/* Declare functions used by various EXTRA_EM_FILEs. */
+static void gld${EMULATION_NAME}_before_parse (void);
+static void gld${EMULATION_NAME}_after_open (void);
+static void gld${EMULATION_NAME}_before_allocation (void);
+static void gld${EMULATION_NAME}_after_allocation (void);
+EOF
+
+# Import any needed special functions and/or overrides.
+#
+source_em ${srcdir}/emultempl/elf-generic.em
+if test -n "$EXTRA_EM_FILE" ; then
+ source_em ${srcdir}/emultempl/${EXTRA_EM_FILE}.em
+fi
+
+# Functions in this file can be overridden by setting the LDEMUL_* shell
+# variables. If the name of the overriding function is the same as is
+# defined in this file, then don't output this file's version.
+# If a different overriding name is given then output the standard function
+# as presumably it is called from the overriding function.
+#
+if test x"$LDEMUL_BEFORE_PARSE" != xgld"$EMULATION_NAME"_before_parse; then
+fragment <<EOF
+
+static void
+gld${EMULATION_NAME}_before_parse (void)
+{
+ ldfile_set_output_arch ("${OUTPUT_ARCH}", bfd_arch_`echo ${ARCH} | sed -e 's/:.*//'`);
+ input_flags.dynamic = ${DYNAMIC_LINK-TRUE};
+ config.has_shared = `if test -n "$GENERATE_SHLIB_SCRIPT" ; then echo TRUE ; else echo FALSE ; fi`;
+ config.separate_code = `if test "x${SEPARATE_CODE}" = xyes ; then echo TRUE ; else echo FALSE ; fi`;
+ link_info.check_relocs_after_open_input = TRUE;
+ link_info.relro = DEFAULT_LD_Z_RELRO;
+ link_info.separate_code = DEFAULT_LD_Z_SEPARATE_CODE;
+}
+
+EOF
+fi
+
+fragment <<EOF
+
+/* These variables are used to implement target options */
+
+static char *audit; /* colon (typically) separated list of libs */
+static char *depaudit; /* colon (typically) separated list of libs */
+
+EOF
+
+if test x"$LDEMUL_AFTER_OPEN" != xgld"$EMULATION_NAME"_after_open; then
+
+ IS_LINUX_TARGET=FALSE
+ IS_FREEBSD_TARGET=FALSE
+ case ${target} in
+ *-*-linux-* | *-*-k*bsd*-* | *-*-gnu*)
+ IS_LINUX_TARGET=TRUE ;;
+ *-*-freebsd* | *-*-dragonfly*)
+ IS_FREEBSD_TARGET=TRUE ;;
+ esac
+ IS_LIBPATH=FALSE
+ if test "x${USE_LIBPATH}" = xyes; then
+ IS_LIBPATH=TRUE
+ fi
+ IS_NATIVE=FALSE
+ if test "x${NATIVE}" = xyes; then
+ IS_NATIVE=TRUE
+ fi
+
+fragment <<EOF
+
+/* This is called after all the input files have been opened. */
+
+static void
+gld${EMULATION_NAME}_after_open (void)
+{
+ ldelf_after_open ($IS_LIBPATH, $IS_NATIVE,
+ $IS_LINUX_TARGET, $IS_FREEBSD_TARGET, $ELFSIZE);
+}
+
+EOF
+fi
+
+if test x"$LDEMUL_BEFORE_ALLOCATION" != xgld"$EMULATION_NAME"_before_allocation; then
+ if test x"${ELF_INTERPRETER_NAME}" = x; then
+ ELF_INTERPRETER_NAME=NULL
+ fi
+fragment <<EOF
+
+/* This is called after the sections have been attached to output
+ sections, but before any sizes or addresses have been set. */
+
+static void
+gld${EMULATION_NAME}_before_allocation (void)
+{
+ ldelf_before_allocation (audit, depaudit, ${ELF_INTERPRETER_NAME});
+}
+
+EOF
+fi
+
+if test x"$LDEMUL_AFTER_ALLOCATION" != xgld"$EMULATION_NAME"_after_allocation; then
+fragment <<EOF
+
+static void
+gld${EMULATION_NAME}_after_allocation (void)
+{
+ int need_layout = bfd_elf_discard_info (link_info.output_bfd, &link_info);
+
+ if (need_layout < 0)
+ einfo (_("%X%P: .eh_frame/.stab edit: %E\n"));
+ else
+ ldelf_map_segments (need_layout);
+}
+EOF
+fi
+
+if test x"$LDEMUL_GET_SCRIPT" != xgld"$EMULATION_NAME"_get_script; then
+fragment <<EOF
+
+static char *
+gld${EMULATION_NAME}_get_script (int *isfile)
+EOF
+
+if test x"$COMPILE_IN" = xyes
+then
+# Scripts compiled in.
+
+# sed commands to quote an ld script as a C string.
+sc="-f stringify.sed"
+
+fragment <<EOF
+{
+ *isfile = 0;
+
+ if (bfd_link_relocatable (&link_info) && config.build_constructors)
+ return
+EOF
+sed $sc ldscripts/${EMULATION_NAME}.xu >> e${EMULATION_NAME}.c
+echo ' ; else if (bfd_link_relocatable (&link_info)) return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.xr >> e${EMULATION_NAME}.c
+echo ' ; else if (!config.text_read_only) return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.xbn >> e${EMULATION_NAME}.c
+if cmp -s ldscripts/${EMULATION_NAME}.x ldscripts/${EMULATION_NAME}.xn; then : ; else
+echo ' ; else if (!config.magic_demand_paged) return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.xn >> e${EMULATION_NAME}.c
+fi
+if test -n "$GENERATE_PIE_SCRIPT" ; then
+if test -n "$GENERATE_COMBRELOC_SCRIPT" ; then
+echo ' ; else if (bfd_link_pie (&link_info)' >> e${EMULATION_NAME}.c
+echo ' && link_info.combreloc' >> e${EMULATION_NAME}.c
+echo ' && link_info.separate_code' >> e${EMULATION_NAME}.c
+echo ' && (link_info.flags & DF_BIND_NOW)) return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.xdwe >> e${EMULATION_NAME}.c
+echo ' ; else if (bfd_link_pie (&link_info)' >> e${EMULATION_NAME}.c
+echo ' && link_info.combreloc' >> e${EMULATION_NAME}.c
+echo ' && link_info.relro' >> e${EMULATION_NAME}.c
+echo ' && (link_info.flags & DF_BIND_NOW)) return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.xdw >> e${EMULATION_NAME}.c
+if test -n "$GENERATE_RELRO_SCRIPT" ; then
+echo ' ; else if (bfd_link_pie (&link_info)' >> e${EMULATION_NAME}.c
+echo ' && link_info.combreloc' >> e${EMULATION_NAME}.c
+echo ' && link_info.separate_code' >> e${EMULATION_NAME}.c
+echo ' && link_info.relro) return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.xdceo >> e${EMULATION_NAME}.c
+fi
+echo ' ; else if (bfd_link_pie (&link_info)' >> e${EMULATION_NAME}.c
+echo ' && link_info.separate_code' >> e${EMULATION_NAME}.c
+echo ' && link_info.combreloc) return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.xdce >> e${EMULATION_NAME}.c
+if test -n "$GENERATE_RELRO_SCRIPT" ; then
+echo ' ; else if (bfd_link_pie (&link_info)' >> e${EMULATION_NAME}.c
+echo ' && link_info.combreloc' >> e${EMULATION_NAME}.c
+echo ' && link_info.relro) return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.xdco >> e${EMULATION_NAME}.c
+fi
+echo ' ; else if (bfd_link_pie (&link_info)' >> e${EMULATION_NAME}.c
+echo ' && link_info.combreloc) return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.xdc >> e${EMULATION_NAME}.c
+if test -n "$GENERATE_RELRO_SCRIPT" ; then
+echo ' ; else if (bfd_link_pie (&link_info)' >> e${EMULATION_NAME}.c
+echo ' && link_info.separate_code' >> e${EMULATION_NAME}.c
+echo ' && link_info.relro) return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.xdeo >> e${EMULATION_NAME}.c
+fi
+fi
+echo ' ; else if (bfd_link_pie (&link_info)' >> e${EMULATION_NAME}.c
+echo ' && link_info.separate_code) return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.xde >> e${EMULATION_NAME}.c
+if test -n "$GENERATE_RELRO_SCRIPT" ; then
+echo ' ; else if (bfd_link_pie (&link_info)' >> e${EMULATION_NAME}.c
+echo ' && link_info.relro) return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.xdo >> e${EMULATION_NAME}.c
+fi
+echo ' ; else if (bfd_link_pie (&link_info)) return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.xd >> e${EMULATION_NAME}.c
+fi
+if test -n "$GENERATE_SHLIB_SCRIPT" ; then
+if test -n "$GENERATE_COMBRELOC_SCRIPT" ; then
+echo ' ; else if (bfd_link_dll (&link_info)' >> e${EMULATION_NAME}.c
+echo ' && link_info.combreloc' >> e${EMULATION_NAME}.c
+echo ' && link_info.separate_code' >> e${EMULATION_NAME}.c
+echo ' && (link_info.flags & DF_BIND_NOW)) return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.xswe >> e${EMULATION_NAME}.c
+echo ' ; else if (bfd_link_dll (&link_info)' >> e${EMULATION_NAME}.c
+echo ' && link_info.combreloc' >> e${EMULATION_NAME}.c
+echo ' && link_info.relro' >> e${EMULATION_NAME}.c
+echo ' && (link_info.flags & DF_BIND_NOW)) return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.xsw >> e${EMULATION_NAME}.c
+if test -n "$GENERATE_RELRO_SCRIPT" ; then
+echo ' ; else if (bfd_link_dll (&link_info)' >> e${EMULATION_NAME}.c
+echo ' && link_info.combreloc' >> e${EMULATION_NAME}.c
+echo ' && link_info.separate_code' >> e${EMULATION_NAME}.c
+echo ' && link_info.relro) return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.xsceo >> e${EMULATION_NAME}.c
+fi
+echo ' ; else if (bfd_link_dll (&link_info)' >> e${EMULATION_NAME}.c
+echo ' && link_info.combreloc' >> e${EMULATION_NAME}.c
+echo ' && link_info.separate_code) return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.xsce >> e${EMULATION_NAME}.c
+if test -n "$GENERATE_RELRO_SCRIPT" ; then
+echo ' ; else if (bfd_link_dll (&link_info)' >> e${EMULATION_NAME}.c
+echo ' && link_info.combreloc' >> e${EMULATION_NAME}.c
+echo ' && link_info.relro) return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.xsco >> e${EMULATION_NAME}.c
+fi
+echo ' ; else if (bfd_link_dll (&link_info)' >> e${EMULATION_NAME}.c
+echo ' && link_info.combreloc) return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.xsc >> e${EMULATION_NAME}.c
+if test -n "$GENERATE_RELRO_SCRIPT" ; then
+echo ' ; else if (bfd_link_dll (&link_info)' >> e${EMULATION_NAME}.c
+echo ' && link_info.separate_code' >> e${EMULATION_NAME}.c
+echo ' && link_info.relro) return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.xseo >> e${EMULATION_NAME}.c
+fi
+fi
+echo ' ; else if (bfd_link_dll (&link_info)' >> e${EMULATION_NAME}.c
+echo ' && link_info.separate_code) return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.xse >> e${EMULATION_NAME}.c
+if test -n "$GENERATE_RELRO_SCRIPT" ; then
+echo ' ; else if (bfd_link_dll (&link_info)' >> e${EMULATION_NAME}.c
+echo ' && link_info.relro) return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.xso >> e${EMULATION_NAME}.c
+fi
+echo ' ; else if (bfd_link_dll (&link_info)) return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.xs >> e${EMULATION_NAME}.c
+fi
+if test -n "$GENERATE_COMBRELOC_SCRIPT" ; then
+echo ' ; else if (link_info.combreloc' >> e${EMULATION_NAME}.c
+echo ' && link_info.separate_code' >> e${EMULATION_NAME}.c
+echo ' && (link_info.flags & DF_BIND_NOW)) return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.xwe >> e${EMULATION_NAME}.c
+echo ' ; else if (link_info.combreloc' >> e${EMULATION_NAME}.c
+echo ' && link_info.relro' >> e${EMULATION_NAME}.c
+echo ' && (link_info.flags & DF_BIND_NOW)) return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.xw >> e${EMULATION_NAME}.c
+if test -n "$GENERATE_RELRO_SCRIPT" ; then
+echo ' ; else if (link_info.combreloc' >> e${EMULATION_NAME}.c
+echo ' && link_info.separate_code' >> e${EMULATION_NAME}.c
+echo ' && link_info.relro) return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.xceo >> e${EMULATION_NAME}.c
+fi
+echo ' ; else if (link_info.combreloc' >> e${EMULATION_NAME}.c
+echo ' && link_info.separate_code) return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.xce >> e${EMULATION_NAME}.c
+if test -n "$GENERATE_RELRO_SCRIPT" ; then
+echo ' ; else if (link_info.combreloc' >> e${EMULATION_NAME}.c
+echo ' && link_info.relro) return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.xco >> e${EMULATION_NAME}.c
+fi
+echo ' ; else if (link_info.combreloc) return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.xc >> e${EMULATION_NAME}.c
+fi
+if test -n "$GENERATE_RELRO_SCRIPT" ; then
+echo ' ; else if (link_info.separate_code' >> e${EMULATION_NAME}.c
+echo ' && link_info.relro) return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.xeo >> e${EMULATION_NAME}.c
+fi
+echo ' ; else if (link_info.separate_code) return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.xe >> e${EMULATION_NAME}.c
+if test -n "$GENERATE_RELRO_SCRIPT" ; then
+echo ' ; else if (link_info.relro) return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.xo >> e${EMULATION_NAME}.c
+fi
+echo ' ; else return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.x >> e${EMULATION_NAME}.c
+echo '; }' >> e${EMULATION_NAME}.c
+
+else
+# Scripts read from the filesystem.
+
+fragment <<EOF
+{
+ *isfile = 1;
+
+ if (bfd_link_relocatable (&link_info) && config.build_constructors)
+ return "ldscripts/${EMULATION_NAME}.xu";
+ else if (bfd_link_relocatable (&link_info))
+ return "ldscripts/${EMULATION_NAME}.xr";
+ else if (!config.text_read_only)
+ return "ldscripts/${EMULATION_NAME}.xbn";
+EOF
+if cmp -s ldscripts/${EMULATION_NAME}.x ldscripts/${EMULATION_NAME}.xn; then :
+else
+fragment <<EOF
+ else if (!config.magic_demand_paged)
+ return "ldscripts/${EMULATION_NAME}.xn";
+EOF
+fi
+if test -n "$GENERATE_PIE_SCRIPT" ; then
+if test -n "$GENERATE_COMBRELOC_SCRIPT" ; then
+fragment <<EOF
+ else if (bfd_link_pie (&link_info)
+ && link_info.combreloc
+ && link_info.relro
+ && (link_info.flags & DF_BIND_NOW))
+ {
+ if (link_info.separate_code)
+ return "ldscripts/${EMULATION_NAME}.xdwe";
+ else
+ return "ldscripts/${EMULATION_NAME}.xdw";
+ }
+EOF
+if test -n "$GENERATE_RELRO_SCRIPT" ; then
+fragment <<EOF
+ else if (bfd_link_pie (&link_info)
+ && link_info.combreloc
+ && link_info.relro)
+ {
+ if (link_info.separate_code)
+ return "ldscripts/${EMULATION_NAME}.xdceo";
+ else
+ return "ldscripts/${EMULATION_NAME}.xdco";
+ }
+EOF
+fi
+fragment <<EOF
+ else if (bfd_link_pie (&link_info)
+ && link_info.combreloc)
+ {
+ if (link_info.separate_code)
+ return "ldscripts/${EMULATION_NAME}.xdce";
+ else
+ return "ldscripts/${EMULATION_NAME}.xdc";
+ }
+EOF
+fi
+if test -n "$GENERATE_RELRO_SCRIPT" ; then
+fragment <<EOF
+ else if (bfd_link_pie (&link_info)
+ && link_info.relro)
+ {
+ if (link_info.separate_code)
+ return "ldscripts/${EMULATION_NAME}.xdeo";
+ else
+ return "ldscripts/${EMULATION_NAME}.xdo";
+ }
+EOF
+fi
+fragment <<EOF
+ else if (bfd_link_pie (&link_info))
+ {
+ if (link_info.separate_code)
+ return "ldscripts/${EMULATION_NAME}.xde";
+ else
+ return "ldscripts/${EMULATION_NAME}.xd";
+ }
+EOF
+fi
+if test -n "$GENERATE_SHLIB_SCRIPT" ; then
+if test -n "$GENERATE_COMBRELOC_SCRIPT" ; then
+fragment <<EOF
+ else if (bfd_link_dll (&link_info) && link_info.combreloc
+ && link_info.relro && (link_info.flags & DF_BIND_NOW))
+ {
+ if (link_info.separate_code)
+ return "ldscripts/${EMULATION_NAME}.xswe";
+ else
+ return "ldscripts/${EMULATION_NAME}.xsw";
+ }
+EOF
+if test -n "$GENERATE_RELRO_SCRIPT" ; then
+fragment <<EOF
+ else if (bfd_link_dll (&link_info)
+ && link_info.combreloc
+ && link_info.relro)
+ {
+ if (link_info.separate_code)
+ return "ldscripts/${EMULATION_NAME}.xsceo";
+ else
+ return "ldscripts/${EMULATION_NAME}.xsco";
+ }
+EOF
+fi
+fragment <<EOF
+ else if (bfd_link_dll (&link_info) && link_info.combreloc)
+ {
+ if (link_info.separate_code)
+ return "ldscripts/${EMULATION_NAME}.xsce";
+ else
+ return "ldscripts/${EMULATION_NAME}.xsc";
+ }
+EOF
+fi
+if test -n "$GENERATE_RELRO_SCRIPT" ; then
+fragment <<EOF
+ else if (bfd_link_dll (&link_info)
+ && link_info.relro)
+ {
+ if (link_info.separate_code)
+ return "ldscripts/${EMULATION_NAME}.xseo";
+ else
+ return "ldscripts/${EMULATION_NAME}.xso";
+ }
+EOF
+fi
+fragment <<EOF
+ else if (bfd_link_dll (&link_info))
+ {
+ if (link_info.separate_code)
+ return "ldscripts/${EMULATION_NAME}.xse";
+ else
+ return "ldscripts/${EMULATION_NAME}.xs";
+ }
+EOF
+fi
+if test -n "$GENERATE_COMBRELOC_SCRIPT" ; then
+fragment <<EOF
+ else if (link_info.combreloc && link_info.relro
+ && (link_info.flags & DF_BIND_NOW))
+ {
+ if (link_info.separate_code)
+ return "ldscripts/${EMULATION_NAME}.xwe";
+ else
+ return "ldscripts/${EMULATION_NAME}.xw";
+ }
+EOF
+if test -n "$GENERATE_RELRO_SCRIPT" ; then
+fragment <<EOF
+ else if (link_info.combreloc
+ && link_info.relro)
+ {
+ if (link_info.separate_code)
+ return "ldscripts/${EMULATION_NAME}.xceo";
+ else
+ return "ldscripts/${EMULATION_NAME}.xco";
+ }
+EOF
+fi
+fragment <<EOF
+ else if (link_info.combreloc)
+ {
+ if (link_info.separate_code)
+ return "ldscripts/${EMULATION_NAME}.xce";
+ else
+ return "ldscripts/${EMULATION_NAME}.xc";
+ }
+EOF
+fi
+if test -n "$GENERATE_RELRO_SCRIPT" ; then
+fragment <<EOF
+ else if (link_info.relro)
+ {
+ if (link_info.separate_code)
+ return "ldscripts/${EMULATION_NAME}.xeo";
+ else
+ return "ldscripts/${EMULATION_NAME}.xo";
+ }
+EOF
+fi
+fragment <<EOF
+ else
+ {
+ if (link_info.separate_code)
+ return "ldscripts/${EMULATION_NAME}.xe";
+ else
+ return "ldscripts/${EMULATION_NAME}.x";
+ }
+}
+
+EOF
+fi
+fi
+
+if test -n "$PARSE_AND_LIST_PROLOGUE" ; then
+fragment <<EOF
+ $PARSE_AND_LIST_PROLOGUE
+EOF
+fi
+
+fragment <<EOF
+
+enum elf_options
+{
+ OPTION_DISABLE_NEW_DTAGS = 400,
+ OPTION_ENABLE_NEW_DTAGS,
+ OPTION_GROUP,
+ OPTION_EH_FRAME_HDR,
+ OPTION_NO_EH_FRAME_HDR,
+ OPTION_EXCLUDE_LIBS,
+ OPTION_HASH_STYLE,
+ OPTION_BUILD_ID,
+ OPTION_AUDIT,
+ OPTION_COMPRESS_DEBUG
+};
+
+static void
+gld${EMULATION_NAME}_add_options
+ (int ns, char **shortopts, int nl, struct option **longopts,
+ int nrl ATTRIBUTE_UNUSED, struct option **really_longopts ATTRIBUTE_UNUSED)
+{
+EOF
+if test x"$GENERATE_SHLIB_SCRIPT" = xyes; then
+fragment <<EOF
+ static const char xtra_short[] = "${PARSE_AND_LIST_SHORTOPTS}z:P:";
+EOF
+else
+fragment <<EOF
+ static const char xtra_short[] = "${PARSE_AND_LIST_SHORTOPTS}z:";
+EOF
+fi
+fragment <<EOF
+ static const struct option xtra_long[] = {
+EOF
+if test x"$GENERATE_SHLIB_SCRIPT" = xyes; then
+fragment <<EOF
+ {"audit", required_argument, NULL, OPTION_AUDIT},
+ {"Bgroup", no_argument, NULL, OPTION_GROUP},
+EOF
+fi
+fragment <<EOF
+ {"build-id", optional_argument, NULL, OPTION_BUILD_ID},
+ {"compress-debug-sections", required_argument, NULL, OPTION_COMPRESS_DEBUG},
+EOF
+if test x"$GENERATE_SHLIB_SCRIPT" = xyes; then
+fragment <<EOF
+ {"depaudit", required_argument, NULL, 'P'},
+ {"disable-new-dtags", no_argument, NULL, OPTION_DISABLE_NEW_DTAGS},
+ {"enable-new-dtags", no_argument, NULL, OPTION_ENABLE_NEW_DTAGS},
+ {"eh-frame-hdr", no_argument, NULL, OPTION_EH_FRAME_HDR},
+ {"no-eh-frame-hdr", no_argument, NULL, OPTION_NO_EH_FRAME_HDR},
+ {"exclude-libs", required_argument, NULL, OPTION_EXCLUDE_LIBS},
+ {"hash-style", required_argument, NULL, OPTION_HASH_STYLE},
+EOF
+fi
+if test -n "$PARSE_AND_LIST_LONGOPTS" ; then
+fragment <<EOF
+ $PARSE_AND_LIST_LONGOPTS
+EOF
+fi
+fragment <<EOF
+ {NULL, no_argument, NULL, 0}
+ };
+
+ *shortopts = (char *) xrealloc (*shortopts, ns + sizeof (xtra_short));
+ memcpy (*shortopts + ns, &xtra_short, sizeof (xtra_short));
+ *longopts = (struct option *)
+ xrealloc (*longopts, nl * sizeof (struct option) + sizeof (xtra_long));
+ memcpy (*longopts + nl, &xtra_long, sizeof (xtra_long));
+}
+
+#define DEFAULT_BUILD_ID_STYLE "sha1"
+
+static bfd_boolean
+gld${EMULATION_NAME}_handle_option (int optc)
+{
+ switch (optc)
+ {
+ default:
+ return FALSE;
+
+ case OPTION_BUILD_ID:
+ if (ldelf_emit_note_gnu_build_id != NULL)
+ {
+ free ((char *) ldelf_emit_note_gnu_build_id);
+ ldelf_emit_note_gnu_build_id = NULL;
+ }
+ if (optarg == NULL)
+ optarg = DEFAULT_BUILD_ID_STYLE;
+ if (strcmp (optarg, "none"))
+ ldelf_emit_note_gnu_build_id = xstrdup (optarg);
+ break;
+
+ case OPTION_COMPRESS_DEBUG:
+ if (strcasecmp (optarg, "none") == 0)
+ link_info.compress_debug = COMPRESS_DEBUG_NONE;
+ else if (strcasecmp (optarg, "zlib") == 0)
+ link_info.compress_debug = COMPRESS_DEBUG_GABI_ZLIB;
+ else if (strcasecmp (optarg, "zlib-gnu") == 0)
+ link_info.compress_debug = COMPRESS_DEBUG_GNU_ZLIB;
+ else if (strcasecmp (optarg, "zlib-gabi") == 0)
+ link_info.compress_debug = COMPRESS_DEBUG_GABI_ZLIB;
+ else
+ einfo (_("%F%P: invalid --compress-debug-sections option: \`%s'\n"),
+ optarg);
+ break;
+EOF
+
+if test x"$GENERATE_SHLIB_SCRIPT" = xyes; then
+fragment <<EOF
+ case OPTION_AUDIT:
+ ldelf_append_to_separated_string (&audit, optarg);
+ break;
+
+ case 'P':
+ ldelf_append_to_separated_string (&depaudit, optarg);
+ break;
+
+ case OPTION_DISABLE_NEW_DTAGS:
+ link_info.new_dtags = FALSE;
+ break;
+
+ case OPTION_ENABLE_NEW_DTAGS:
+ link_info.new_dtags = TRUE;
+ break;
+
+ case OPTION_EH_FRAME_HDR:
+ link_info.eh_frame_hdr_type = DWARF2_EH_HDR;
+ break;
+
+ case OPTION_NO_EH_FRAME_HDR:
+ link_info.eh_frame_hdr_type = 0;
+ break;
+
+ case OPTION_GROUP:
+ link_info.flags_1 |= (bfd_vma) DF_1_GROUP;
+ /* Groups must be self-contained. */
+ link_info.unresolved_syms_in_objects = RM_GENERATE_ERROR;
+ link_info.unresolved_syms_in_shared_libs = RM_GENERATE_ERROR;
+ break;
+
+ case OPTION_EXCLUDE_LIBS:
+ add_excluded_libs (optarg);
+ break;
+
+ case OPTION_HASH_STYLE:
+ link_info.emit_hash = FALSE;
+ link_info.emit_gnu_hash = FALSE;
+ if (strcmp (optarg, "sysv") == 0)
+ link_info.emit_hash = TRUE;
+ else if (strcmp (optarg, "gnu") == 0)
+ link_info.emit_gnu_hash = TRUE;
+ else if (strcmp (optarg, "both") == 0)
+ {
+ link_info.emit_hash = TRUE;
+ link_info.emit_gnu_hash = TRUE;
+ }
+ else
+ einfo (_("%F%P: invalid hash style \`%s'\n"), optarg);
+ break;
+
+EOF
+fi
+fragment <<EOF
+ case 'z':
+ if (strcmp (optarg, "defs") == 0)
+ link_info.unresolved_syms_in_objects = RM_GENERATE_ERROR;
+ else if (strcmp (optarg, "undefs") == 0)
+ link_info.unresolved_syms_in_objects = RM_IGNORE;
+ else if (strcmp (optarg, "muldefs") == 0)
+ link_info.allow_multiple_definition = TRUE;
+ else if (CONST_STRNEQ (optarg, "max-page-size="))
+ {
+ char *end;
+
+ config.maxpagesize = strtoul (optarg + 14, &end, 0);
+ if (*end || (config.maxpagesize & (config.maxpagesize - 1)) != 0)
+ einfo (_("%F%P: invalid maximum page size \`%s'\n"),
+ optarg + 14);
+ }
+ else if (CONST_STRNEQ (optarg, "common-page-size="))
+ {
+ char *end;
+ config.commonpagesize = strtoul (optarg + 17, &end, 0);
+ if (*end
+ || (config.commonpagesize & (config.commonpagesize - 1)) != 0)
+ einfo (_("%F%P: invalid common page size \`%s'\n"),
+ optarg + 17);
+ }
+ else if (CONST_STRNEQ (optarg, "stack-size="))
+ {
+ char *end;
+ link_info.stacksize = strtoul (optarg + 11, &end, 0);
+ if (*end || link_info.stacksize < 0)
+ einfo (_("%F%P: invalid stack size \`%s'\n"), optarg + 11);
+ if (!link_info.stacksize)
+ /* Use -1 for explicit no-stack, because zero means
+ 'default'. */
+ link_info.stacksize = -1;
+ }
+ else if (strcmp (optarg, "execstack") == 0)
+ {
+ link_info.execstack = TRUE;
+ link_info.noexecstack = FALSE;
+ }
+ else if (strcmp (optarg, "noexecstack") == 0)
+ {
+ link_info.noexecstack = TRUE;
+ link_info.execstack = FALSE;
+ }
+ else if (strcmp (optarg, "globalaudit") == 0)
+ {
+ link_info.flags_1 |= DF_1_GLOBAUDIT;
+ }
+EOF
+
+if test x"$GENERATE_SHLIB_SCRIPT" = xyes; then
+fragment <<EOF
+ else if (strcmp (optarg, "global") == 0)
+ link_info.flags_1 |= (bfd_vma) DF_1_GLOBAL;
+ else if (strcmp (optarg, "initfirst") == 0)
+ link_info.flags_1 |= (bfd_vma) DF_1_INITFIRST;
+ else if (strcmp (optarg, "interpose") == 0)
+ link_info.flags_1 |= (bfd_vma) DF_1_INTERPOSE;
+ else if (strcmp (optarg, "loadfltr") == 0)
+ link_info.flags_1 |= (bfd_vma) DF_1_LOADFLTR;
+ else if (strcmp (optarg, "nodefaultlib") == 0)
+ link_info.flags_1 |= (bfd_vma) DF_1_NODEFLIB;
+ else if (strcmp (optarg, "nodelete") == 0)
+ link_info.flags_1 |= (bfd_vma) DF_1_NODELETE;
+ else if (strcmp (optarg, "nodlopen") == 0)
+ link_info.flags_1 |= (bfd_vma) DF_1_NOOPEN;
+ else if (strcmp (optarg, "nodump") == 0)
+ link_info.flags_1 |= (bfd_vma) DF_1_NODUMP;
+ else if (strcmp (optarg, "now") == 0)
+ {
+ link_info.flags |= (bfd_vma) DF_BIND_NOW;
+ link_info.flags_1 |= (bfd_vma) DF_1_NOW;
+ }
+ else if (strcmp (optarg, "lazy") == 0)
+ {
+ link_info.flags &= ~(bfd_vma) DF_BIND_NOW;
+ link_info.flags_1 &= ~(bfd_vma) DF_1_NOW;
+ }
+ else if (strcmp (optarg, "origin") == 0)
+ {
+ link_info.flags |= (bfd_vma) DF_ORIGIN;
+ link_info.flags_1 |= (bfd_vma) DF_1_ORIGIN;
+ }
+ else if (strcmp (optarg, "combreloc") == 0)
+ link_info.combreloc = TRUE;
+ else if (strcmp (optarg, "nocombreloc") == 0)
+ link_info.combreloc = FALSE;
+ else if (strcmp (optarg, "nocopyreloc") == 0)
+ link_info.nocopyreloc = TRUE;
+ else if (strcmp (optarg, "relro") == 0)
+ link_info.relro = TRUE;
+ else if (strcmp (optarg, "norelro") == 0)
+ link_info.relro = FALSE;
+ else if (strcmp (optarg, "separate-code") == 0)
+ link_info.separate_code = TRUE;
+ else if (strcmp (optarg, "noseparate-code") == 0)
+ link_info.separate_code = FALSE;
+ else if (strcmp (optarg, "common") == 0)
+ link_info.elf_stt_common = elf_stt_common;
+ else if (strcmp (optarg, "nocommon") == 0)
+ link_info.elf_stt_common = no_elf_stt_common;
+ else if (strcmp (optarg, "text") == 0)
+ link_info.error_textrel = TRUE;
+ else if (strcmp (optarg, "notext") == 0)
+ link_info.error_textrel = FALSE;
+ else if (strcmp (optarg, "textoff") == 0)
+ link_info.error_textrel = FALSE;
+EOF
+fi
+
+if test -n "$PARSE_AND_LIST_ARGS_CASE_Z" ; then
+fragment <<EOF
+ $PARSE_AND_LIST_ARGS_CASE_Z
+EOF
+fi
+
+fragment <<EOF
+ else
+ einfo (_("%P: warning: -z %s ignored\n"), optarg);
+ break;
+EOF
+
+if test -n "$PARSE_AND_LIST_ARGS_CASES" ; then
+fragment <<EOF
+ $PARSE_AND_LIST_ARGS_CASES
+EOF
+fi
+
+fragment <<EOF
+ }
+
+ return TRUE;
+}
+
+EOF
+
+if test x"$LDEMUL_LIST_OPTIONS" != xgld"$EMULATION_NAME"_list_options; then
+gld_list_options="gld${EMULATION_NAME}_list_options"
+if test -n "$PARSE_AND_LIST_OPTIONS"; then
+fragment <<EOF
+
+static void
+gld${EMULATION_NAME}_list_options (FILE * file)
+{
+EOF
+
+if test -n "$PARSE_AND_LIST_OPTIONS" ; then
+fragment <<EOF
+ $PARSE_AND_LIST_OPTIONS
+EOF
+fi
+
+fragment <<EOF
+}
+EOF
+else
+ gld_list_options="NULL"
+fi
+
+if test -n "$PARSE_AND_LIST_EPILOGUE" ; then
+fragment <<EOF
+ $PARSE_AND_LIST_EPILOGUE
+EOF
+fi
+fi
+
+fragment <<EOF
+
+struct ld_emulation_xfer_struct ld_${EMULATION_NAME}_emulation =
+{
+ ${LDEMUL_BEFORE_PARSE-gld${EMULATION_NAME}_before_parse},
+ ${LDEMUL_SYSLIB-syslib_default},
+ ${LDEMUL_HLL-hll_default},
+ ${LDEMUL_AFTER_PARSE-ldelf_after_parse},
+ ${LDEMUL_AFTER_OPEN-gld${EMULATION_NAME}_after_open},
+ ${LDEMUL_AFTER_CHECK_RELOCS-after_check_relocs_default},
+ ${LDEMUL_AFTER_ALLOCATION-gld${EMULATION_NAME}_after_allocation},
+ ${LDEMUL_SET_OUTPUT_ARCH-set_output_arch_default},
+ ${LDEMUL_CHOOSE_TARGET-ldemul_default_target},
+ ${LDEMUL_BEFORE_ALLOCATION-gld${EMULATION_NAME}_before_allocation},
+ ${LDEMUL_GET_SCRIPT-gld${EMULATION_NAME}_get_script},
+ "${EMULATION_NAME}",
+ "${OUTPUT_FORMAT}",
+ ${LDEMUL_FINISH-finish_default},
+ ${LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS-NULL},
+ ${LDEMUL_OPEN_DYNAMIC_ARCHIVE-ldelf_open_dynamic_archive},
+ ${LDEMUL_PLACE_ORPHAN-ldelf_place_orphan},
+ ${LDEMUL_SET_SYMBOLS-NULL},
+ ${LDEMUL_PARSE_ARGS-NULL},
+ gld${EMULATION_NAME}_add_options,
+ gld${EMULATION_NAME}_handle_option,
+ ${LDEMUL_UNRECOGNIZED_FILE-NULL},
+ ${LDEMUL_LIST_OPTIONS-${gld_list_options}},
+ ${LDEMUL_RECOGNIZED_FILE-ldelf_load_symbols},
+ ${LDEMUL_FIND_POTENTIAL_LIBRARIES-NULL},
+ ${LDEMUL_NEW_VERS_PATTERN-NULL},
+ ${LDEMUL_EXTRA_MAP_FILE_TEXT-NULL}
+};
+EOF
+++ /dev/null
-# This shell script emits a C file. -*- C -*-
-# It does some substitutions.
-# This file is now misnamed, because it supports both 32 bit and 64 bit
-# ELF emulations.
-test -z "${ELFSIZE}" && ELFSIZE=32
-if [ -z "$MACHINE" ]; then
- OUTPUT_ARCH=${ARCH}
-else
- OUTPUT_ARCH=${ARCH}:${MACHINE}
-fi
-fragment <<EOF
-/* This file is is generated by a shell script. DO NOT EDIT! */
-
-/* ${ELFSIZE} bit ELF emulation code for ${EMULATION_NAME}
- Copyright (C) 1991-2019 Free Software Foundation, Inc.
- Written by Steve Chamberlain <sac@cygnus.com>
- ELF support by Ian Lance Taylor <ian@cygnus.com>
-
- This file is part of the GNU Binutils.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
- MA 02110-1301, USA. */
-
-#define TARGET_IS_${EMULATION_NAME}
-
-#include "sysdep.h"
-#include "bfd.h"
-#include "libiberty.h"
-#include "getopt.h"
-#include "bfdlink.h"
-#include "ld.h"
-#include "ldmain.h"
-#include "ldmisc.h"
-#include "ldexp.h"
-#include "ldlang.h"
-#include "ldfile.h"
-#include "ldemul.h"
-#include <ldgram.h>
-#include "elf-bfd.h"
-#include "ldelf.h"
-#include "ldelfgen.h"
-
-/* Declare functions used by various EXTRA_EM_FILEs. */
-static void gld${EMULATION_NAME}_before_parse (void);
-static void gld${EMULATION_NAME}_after_open (void);
-static void gld${EMULATION_NAME}_before_allocation (void);
-static void gld${EMULATION_NAME}_after_allocation (void);
-EOF
-
-# Import any needed special functions and/or overrides.
-#
-source_em ${srcdir}/emultempl/elf-generic.em
-if test -n "$EXTRA_EM_FILE" ; then
- source_em ${srcdir}/emultempl/${EXTRA_EM_FILE}.em
-fi
-
-# Functions in this file can be overridden by setting the LDEMUL_* shell
-# variables. If the name of the overriding function is the same as is
-# defined in this file, then don't output this file's version.
-# If a different overriding name is given then output the standard function
-# as presumably it is called from the overriding function.
-#
-if test x"$LDEMUL_BEFORE_PARSE" != xgld"$EMULATION_NAME"_before_parse; then
-fragment <<EOF
-
-static void
-gld${EMULATION_NAME}_before_parse (void)
-{
- ldfile_set_output_arch ("${OUTPUT_ARCH}", bfd_arch_`echo ${ARCH} | sed -e 's/:.*//'`);
- input_flags.dynamic = ${DYNAMIC_LINK-TRUE};
- config.has_shared = `if test -n "$GENERATE_SHLIB_SCRIPT" ; then echo TRUE ; else echo FALSE ; fi`;
- config.separate_code = `if test "x${SEPARATE_CODE}" = xyes ; then echo TRUE ; else echo FALSE ; fi`;
- link_info.check_relocs_after_open_input = TRUE;
- link_info.relro = DEFAULT_LD_Z_RELRO;
- link_info.separate_code = DEFAULT_LD_Z_SEPARATE_CODE;
-}
-
-EOF
-fi
-
-fragment <<EOF
-
-/* These variables are used to implement target options */
-
-static char *audit; /* colon (typically) separated list of libs */
-static char *depaudit; /* colon (typically) separated list of libs */
-
-EOF
-
-if test x"$LDEMUL_AFTER_OPEN" != xgld"$EMULATION_NAME"_after_open; then
-
- IS_LINUX_TARGET=FALSE
- IS_FREEBSD_TARGET=FALSE
- case ${target} in
- *-*-linux-* | *-*-k*bsd*-* | *-*-gnu*)
- IS_LINUX_TARGET=TRUE ;;
- *-*-freebsd* | *-*-dragonfly*)
- IS_FREEBSD_TARGET=TRUE ;;
- esac
- IS_LIBPATH=FALSE
- if test "x${USE_LIBPATH}" = xyes; then
- IS_LIBPATH=TRUE
- fi
- IS_NATIVE=FALSE
- if test "x${NATIVE}" = xyes; then
- IS_NATIVE=TRUE
- fi
-
-fragment <<EOF
-
-/* This is called after all the input files have been opened. */
-
-static void
-gld${EMULATION_NAME}_after_open (void)
-{
- ldelf_after_open ($IS_LIBPATH, $IS_NATIVE,
- $IS_LINUX_TARGET, $IS_FREEBSD_TARGET, $ELFSIZE);
-}
-
-EOF
-fi
-
-if test x"$LDEMUL_BEFORE_ALLOCATION" != xgld"$EMULATION_NAME"_before_allocation; then
- if test x"${ELF_INTERPRETER_NAME}" = x; then
- ELF_INTERPRETER_NAME=NULL
- fi
-fragment <<EOF
-
-/* This is called after the sections have been attached to output
- sections, but before any sizes or addresses have been set. */
-
-static void
-gld${EMULATION_NAME}_before_allocation (void)
-{
- ldelf_before_allocation (audit, depaudit, ${ELF_INTERPRETER_NAME});
-}
-
-EOF
-fi
-
-if test x"$LDEMUL_AFTER_ALLOCATION" != xgld"$EMULATION_NAME"_after_allocation; then
-fragment <<EOF
-
-static void
-gld${EMULATION_NAME}_after_allocation (void)
-{
- int need_layout = bfd_elf_discard_info (link_info.output_bfd, &link_info);
-
- if (need_layout < 0)
- einfo (_("%X%P: .eh_frame/.stab edit: %E\n"));
- else
- ldelf_map_segments (need_layout);
-}
-EOF
-fi
-
-if test x"$LDEMUL_GET_SCRIPT" != xgld"$EMULATION_NAME"_get_script; then
-fragment <<EOF
-
-static char *
-gld${EMULATION_NAME}_get_script (int *isfile)
-EOF
-
-if test x"$COMPILE_IN" = xyes
-then
-# Scripts compiled in.
-
-# sed commands to quote an ld script as a C string.
-sc="-f stringify.sed"
-
-fragment <<EOF
-{
- *isfile = 0;
-
- if (bfd_link_relocatable (&link_info) && config.build_constructors)
- return
-EOF
-sed $sc ldscripts/${EMULATION_NAME}.xu >> e${EMULATION_NAME}.c
-echo ' ; else if (bfd_link_relocatable (&link_info)) return' >> e${EMULATION_NAME}.c
-sed $sc ldscripts/${EMULATION_NAME}.xr >> e${EMULATION_NAME}.c
-echo ' ; else if (!config.text_read_only) return' >> e${EMULATION_NAME}.c
-sed $sc ldscripts/${EMULATION_NAME}.xbn >> e${EMULATION_NAME}.c
-if cmp -s ldscripts/${EMULATION_NAME}.x ldscripts/${EMULATION_NAME}.xn; then : ; else
-echo ' ; else if (!config.magic_demand_paged) return' >> e${EMULATION_NAME}.c
-sed $sc ldscripts/${EMULATION_NAME}.xn >> e${EMULATION_NAME}.c
-fi
-if test -n "$GENERATE_PIE_SCRIPT" ; then
-if test -n "$GENERATE_COMBRELOC_SCRIPT" ; then
-echo ' ; else if (bfd_link_pie (&link_info)' >> e${EMULATION_NAME}.c
-echo ' && link_info.combreloc' >> e${EMULATION_NAME}.c
-echo ' && link_info.separate_code' >> e${EMULATION_NAME}.c
-echo ' && (link_info.flags & DF_BIND_NOW)) return' >> e${EMULATION_NAME}.c
-sed $sc ldscripts/${EMULATION_NAME}.xdwe >> e${EMULATION_NAME}.c
-echo ' ; else if (bfd_link_pie (&link_info)' >> e${EMULATION_NAME}.c
-echo ' && link_info.combreloc' >> e${EMULATION_NAME}.c
-echo ' && link_info.relro' >> e${EMULATION_NAME}.c
-echo ' && (link_info.flags & DF_BIND_NOW)) return' >> e${EMULATION_NAME}.c
-sed $sc ldscripts/${EMULATION_NAME}.xdw >> e${EMULATION_NAME}.c
-if test -n "$GENERATE_RELRO_SCRIPT" ; then
-echo ' ; else if (bfd_link_pie (&link_info)' >> e${EMULATION_NAME}.c
-echo ' && link_info.combreloc' >> e${EMULATION_NAME}.c
-echo ' && link_info.separate_code' >> e${EMULATION_NAME}.c
-echo ' && link_info.relro) return' >> e${EMULATION_NAME}.c
-sed $sc ldscripts/${EMULATION_NAME}.xdceo >> e${EMULATION_NAME}.c
-fi
-echo ' ; else if (bfd_link_pie (&link_info)' >> e${EMULATION_NAME}.c
-echo ' && link_info.separate_code' >> e${EMULATION_NAME}.c
-echo ' && link_info.combreloc) return' >> e${EMULATION_NAME}.c
-sed $sc ldscripts/${EMULATION_NAME}.xdce >> e${EMULATION_NAME}.c
-if test -n "$GENERATE_RELRO_SCRIPT" ; then
-echo ' ; else if (bfd_link_pie (&link_info)' >> e${EMULATION_NAME}.c
-echo ' && link_info.combreloc' >> e${EMULATION_NAME}.c
-echo ' && link_info.relro) return' >> e${EMULATION_NAME}.c
-sed $sc ldscripts/${EMULATION_NAME}.xdco >> e${EMULATION_NAME}.c
-fi
-echo ' ; else if (bfd_link_pie (&link_info)' >> e${EMULATION_NAME}.c
-echo ' && link_info.combreloc) return' >> e${EMULATION_NAME}.c
-sed $sc ldscripts/${EMULATION_NAME}.xdc >> e${EMULATION_NAME}.c
-if test -n "$GENERATE_RELRO_SCRIPT" ; then
-echo ' ; else if (bfd_link_pie (&link_info)' >> e${EMULATION_NAME}.c
-echo ' && link_info.separate_code' >> e${EMULATION_NAME}.c
-echo ' && link_info.relro) return' >> e${EMULATION_NAME}.c
-sed $sc ldscripts/${EMULATION_NAME}.xdeo >> e${EMULATION_NAME}.c
-fi
-fi
-echo ' ; else if (bfd_link_pie (&link_info)' >> e${EMULATION_NAME}.c
-echo ' && link_info.separate_code) return' >> e${EMULATION_NAME}.c
-sed $sc ldscripts/${EMULATION_NAME}.xde >> e${EMULATION_NAME}.c
-if test -n "$GENERATE_RELRO_SCRIPT" ; then
-echo ' ; else if (bfd_link_pie (&link_info)' >> e${EMULATION_NAME}.c
-echo ' && link_info.relro) return' >> e${EMULATION_NAME}.c
-sed $sc ldscripts/${EMULATION_NAME}.xdo >> e${EMULATION_NAME}.c
-fi
-echo ' ; else if (bfd_link_pie (&link_info)) return' >> e${EMULATION_NAME}.c
-sed $sc ldscripts/${EMULATION_NAME}.xd >> e${EMULATION_NAME}.c
-fi
-if test -n "$GENERATE_SHLIB_SCRIPT" ; then
-if test -n "$GENERATE_COMBRELOC_SCRIPT" ; then
-echo ' ; else if (bfd_link_dll (&link_info)' >> e${EMULATION_NAME}.c
-echo ' && link_info.combreloc' >> e${EMULATION_NAME}.c
-echo ' && link_info.separate_code' >> e${EMULATION_NAME}.c
-echo ' && (link_info.flags & DF_BIND_NOW)) return' >> e${EMULATION_NAME}.c
-sed $sc ldscripts/${EMULATION_NAME}.xswe >> e${EMULATION_NAME}.c
-echo ' ; else if (bfd_link_dll (&link_info)' >> e${EMULATION_NAME}.c
-echo ' && link_info.combreloc' >> e${EMULATION_NAME}.c
-echo ' && link_info.relro' >> e${EMULATION_NAME}.c
-echo ' && (link_info.flags & DF_BIND_NOW)) return' >> e${EMULATION_NAME}.c
-sed $sc ldscripts/${EMULATION_NAME}.xsw >> e${EMULATION_NAME}.c
-if test -n "$GENERATE_RELRO_SCRIPT" ; then
-echo ' ; else if (bfd_link_dll (&link_info)' >> e${EMULATION_NAME}.c
-echo ' && link_info.combreloc' >> e${EMULATION_NAME}.c
-echo ' && link_info.separate_code' >> e${EMULATION_NAME}.c
-echo ' && link_info.relro) return' >> e${EMULATION_NAME}.c
-sed $sc ldscripts/${EMULATION_NAME}.xsceo >> e${EMULATION_NAME}.c
-fi
-echo ' ; else if (bfd_link_dll (&link_info)' >> e${EMULATION_NAME}.c
-echo ' && link_info.combreloc' >> e${EMULATION_NAME}.c
-echo ' && link_info.separate_code) return' >> e${EMULATION_NAME}.c
-sed $sc ldscripts/${EMULATION_NAME}.xsce >> e${EMULATION_NAME}.c
-if test -n "$GENERATE_RELRO_SCRIPT" ; then
-echo ' ; else if (bfd_link_dll (&link_info)' >> e${EMULATION_NAME}.c
-echo ' && link_info.combreloc' >> e${EMULATION_NAME}.c
-echo ' && link_info.relro) return' >> e${EMULATION_NAME}.c
-sed $sc ldscripts/${EMULATION_NAME}.xsco >> e${EMULATION_NAME}.c
-fi
-echo ' ; else if (bfd_link_dll (&link_info)' >> e${EMULATION_NAME}.c
-echo ' && link_info.combreloc) return' >> e${EMULATION_NAME}.c
-sed $sc ldscripts/${EMULATION_NAME}.xsc >> e${EMULATION_NAME}.c
-if test -n "$GENERATE_RELRO_SCRIPT" ; then
-echo ' ; else if (bfd_link_dll (&link_info)' >> e${EMULATION_NAME}.c
-echo ' && link_info.separate_code' >> e${EMULATION_NAME}.c
-echo ' && link_info.relro) return' >> e${EMULATION_NAME}.c
-sed $sc ldscripts/${EMULATION_NAME}.xseo >> e${EMULATION_NAME}.c
-fi
-fi
-echo ' ; else if (bfd_link_dll (&link_info)' >> e${EMULATION_NAME}.c
-echo ' && link_info.separate_code) return' >> e${EMULATION_NAME}.c
-sed $sc ldscripts/${EMULATION_NAME}.xse >> e${EMULATION_NAME}.c
-if test -n "$GENERATE_RELRO_SCRIPT" ; then
-echo ' ; else if (bfd_link_dll (&link_info)' >> e${EMULATION_NAME}.c
-echo ' && link_info.relro) return' >> e${EMULATION_NAME}.c
-sed $sc ldscripts/${EMULATION_NAME}.xso >> e${EMULATION_NAME}.c
-fi
-echo ' ; else if (bfd_link_dll (&link_info)) return' >> e${EMULATION_NAME}.c
-sed $sc ldscripts/${EMULATION_NAME}.xs >> e${EMULATION_NAME}.c
-fi
-if test -n "$GENERATE_COMBRELOC_SCRIPT" ; then
-echo ' ; else if (link_info.combreloc' >> e${EMULATION_NAME}.c
-echo ' && link_info.separate_code' >> e${EMULATION_NAME}.c
-echo ' && (link_info.flags & DF_BIND_NOW)) return' >> e${EMULATION_NAME}.c
-sed $sc ldscripts/${EMULATION_NAME}.xwe >> e${EMULATION_NAME}.c
-echo ' ; else if (link_info.combreloc' >> e${EMULATION_NAME}.c
-echo ' && link_info.relro' >> e${EMULATION_NAME}.c
-echo ' && (link_info.flags & DF_BIND_NOW)) return' >> e${EMULATION_NAME}.c
-sed $sc ldscripts/${EMULATION_NAME}.xw >> e${EMULATION_NAME}.c
-if test -n "$GENERATE_RELRO_SCRIPT" ; then
-echo ' ; else if (link_info.combreloc' >> e${EMULATION_NAME}.c
-echo ' && link_info.separate_code' >> e${EMULATION_NAME}.c
-echo ' && link_info.relro) return' >> e${EMULATION_NAME}.c
-sed $sc ldscripts/${EMULATION_NAME}.xceo >> e${EMULATION_NAME}.c
-fi
-echo ' ; else if (link_info.combreloc' >> e${EMULATION_NAME}.c
-echo ' && link_info.separate_code) return' >> e${EMULATION_NAME}.c
-sed $sc ldscripts/${EMULATION_NAME}.xce >> e${EMULATION_NAME}.c
-if test -n "$GENERATE_RELRO_SCRIPT" ; then
-echo ' ; else if (link_info.combreloc' >> e${EMULATION_NAME}.c
-echo ' && link_info.relro) return' >> e${EMULATION_NAME}.c
-sed $sc ldscripts/${EMULATION_NAME}.xco >> e${EMULATION_NAME}.c
-fi
-echo ' ; else if (link_info.combreloc) return' >> e${EMULATION_NAME}.c
-sed $sc ldscripts/${EMULATION_NAME}.xc >> e${EMULATION_NAME}.c
-fi
-if test -n "$GENERATE_RELRO_SCRIPT" ; then
-echo ' ; else if (link_info.separate_code' >> e${EMULATION_NAME}.c
-echo ' && link_info.relro) return' >> e${EMULATION_NAME}.c
-sed $sc ldscripts/${EMULATION_NAME}.xeo >> e${EMULATION_NAME}.c
-fi
-echo ' ; else if (link_info.separate_code) return' >> e${EMULATION_NAME}.c
-sed $sc ldscripts/${EMULATION_NAME}.xe >> e${EMULATION_NAME}.c
-if test -n "$GENERATE_RELRO_SCRIPT" ; then
-echo ' ; else if (link_info.relro) return' >> e${EMULATION_NAME}.c
-sed $sc ldscripts/${EMULATION_NAME}.xo >> e${EMULATION_NAME}.c
-fi
-echo ' ; else return' >> e${EMULATION_NAME}.c
-sed $sc ldscripts/${EMULATION_NAME}.x >> e${EMULATION_NAME}.c
-echo '; }' >> e${EMULATION_NAME}.c
-
-else
-# Scripts read from the filesystem.
-
-fragment <<EOF
-{
- *isfile = 1;
-
- if (bfd_link_relocatable (&link_info) && config.build_constructors)
- return "ldscripts/${EMULATION_NAME}.xu";
- else if (bfd_link_relocatable (&link_info))
- return "ldscripts/${EMULATION_NAME}.xr";
- else if (!config.text_read_only)
- return "ldscripts/${EMULATION_NAME}.xbn";
-EOF
-if cmp -s ldscripts/${EMULATION_NAME}.x ldscripts/${EMULATION_NAME}.xn; then :
-else
-fragment <<EOF
- else if (!config.magic_demand_paged)
- return "ldscripts/${EMULATION_NAME}.xn";
-EOF
-fi
-if test -n "$GENERATE_PIE_SCRIPT" ; then
-if test -n "$GENERATE_COMBRELOC_SCRIPT" ; then
-fragment <<EOF
- else if (bfd_link_pie (&link_info)
- && link_info.combreloc
- && link_info.relro
- && (link_info.flags & DF_BIND_NOW))
- {
- if (link_info.separate_code)
- return "ldscripts/${EMULATION_NAME}.xdwe";
- else
- return "ldscripts/${EMULATION_NAME}.xdw";
- }
-EOF
-if test -n "$GENERATE_RELRO_SCRIPT" ; then
-fragment <<EOF
- else if (bfd_link_pie (&link_info)
- && link_info.combreloc
- && link_info.relro)
- {
- if (link_info.separate_code)
- return "ldscripts/${EMULATION_NAME}.xdceo";
- else
- return "ldscripts/${EMULATION_NAME}.xdco";
- }
-EOF
-fi
-fragment <<EOF
- else if (bfd_link_pie (&link_info)
- && link_info.combreloc)
- {
- if (link_info.separate_code)
- return "ldscripts/${EMULATION_NAME}.xdce";
- else
- return "ldscripts/${EMULATION_NAME}.xdc";
- }
-EOF
-fi
-if test -n "$GENERATE_RELRO_SCRIPT" ; then
-fragment <<EOF
- else if (bfd_link_pie (&link_info)
- && link_info.relro)
- {
- if (link_info.separate_code)
- return "ldscripts/${EMULATION_NAME}.xdeo";
- else
- return "ldscripts/${EMULATION_NAME}.xdo";
- }
-EOF
-fi
-fragment <<EOF
- else if (bfd_link_pie (&link_info))
- {
- if (link_info.separate_code)
- return "ldscripts/${EMULATION_NAME}.xde";
- else
- return "ldscripts/${EMULATION_NAME}.xd";
- }
-EOF
-fi
-if test -n "$GENERATE_SHLIB_SCRIPT" ; then
-if test -n "$GENERATE_COMBRELOC_SCRIPT" ; then
-fragment <<EOF
- else if (bfd_link_dll (&link_info) && link_info.combreloc
- && link_info.relro && (link_info.flags & DF_BIND_NOW))
- {
- if (link_info.separate_code)
- return "ldscripts/${EMULATION_NAME}.xswe";
- else
- return "ldscripts/${EMULATION_NAME}.xsw";
- }
-EOF
-if test -n "$GENERATE_RELRO_SCRIPT" ; then
-fragment <<EOF
- else if (bfd_link_dll (&link_info)
- && link_info.combreloc
- && link_info.relro)
- {
- if (link_info.separate_code)
- return "ldscripts/${EMULATION_NAME}.xsceo";
- else
- return "ldscripts/${EMULATION_NAME}.xsco";
- }
-EOF
-fi
-fragment <<EOF
- else if (bfd_link_dll (&link_info) && link_info.combreloc)
- {
- if (link_info.separate_code)
- return "ldscripts/${EMULATION_NAME}.xsce";
- else
- return "ldscripts/${EMULATION_NAME}.xsc";
- }
-EOF
-fi
-if test -n "$GENERATE_RELRO_SCRIPT" ; then
-fragment <<EOF
- else if (bfd_link_dll (&link_info)
- && link_info.relro)
- {
- if (link_info.separate_code)
- return "ldscripts/${EMULATION_NAME}.xseo";
- else
- return "ldscripts/${EMULATION_NAME}.xso";
- }
-EOF
-fi
-fragment <<EOF
- else if (bfd_link_dll (&link_info))
- {
- if (link_info.separate_code)
- return "ldscripts/${EMULATION_NAME}.xse";
- else
- return "ldscripts/${EMULATION_NAME}.xs";
- }
-EOF
-fi
-if test -n "$GENERATE_COMBRELOC_SCRIPT" ; then
-fragment <<EOF
- else if (link_info.combreloc && link_info.relro
- && (link_info.flags & DF_BIND_NOW))
- {
- if (link_info.separate_code)
- return "ldscripts/${EMULATION_NAME}.xwe";
- else
- return "ldscripts/${EMULATION_NAME}.xw";
- }
-EOF
-if test -n "$GENERATE_RELRO_SCRIPT" ; then
-fragment <<EOF
- else if (link_info.combreloc
- && link_info.relro)
- {
- if (link_info.separate_code)
- return "ldscripts/${EMULATION_NAME}.xceo";
- else
- return "ldscripts/${EMULATION_NAME}.xco";
- }
-EOF
-fi
-fragment <<EOF
- else if (link_info.combreloc)
- {
- if (link_info.separate_code)
- return "ldscripts/${EMULATION_NAME}.xce";
- else
- return "ldscripts/${EMULATION_NAME}.xc";
- }
-EOF
-fi
-if test -n "$GENERATE_RELRO_SCRIPT" ; then
-fragment <<EOF
- else if (link_info.relro)
- {
- if (link_info.separate_code)
- return "ldscripts/${EMULATION_NAME}.xeo";
- else
- return "ldscripts/${EMULATION_NAME}.xo";
- }
-EOF
-fi
-fragment <<EOF
- else
- {
- if (link_info.separate_code)
- return "ldscripts/${EMULATION_NAME}.xe";
- else
- return "ldscripts/${EMULATION_NAME}.x";
- }
-}
-
-EOF
-fi
-fi
-
-if test -n "$PARSE_AND_LIST_PROLOGUE" ; then
-fragment <<EOF
- $PARSE_AND_LIST_PROLOGUE
-EOF
-fi
-
-fragment <<EOF
-
-enum elf_options
-{
- OPTION_DISABLE_NEW_DTAGS = 400,
- OPTION_ENABLE_NEW_DTAGS,
- OPTION_GROUP,
- OPTION_EH_FRAME_HDR,
- OPTION_NO_EH_FRAME_HDR,
- OPTION_EXCLUDE_LIBS,
- OPTION_HASH_STYLE,
- OPTION_BUILD_ID,
- OPTION_AUDIT,
- OPTION_COMPRESS_DEBUG
-};
-
-static void
-gld${EMULATION_NAME}_add_options
- (int ns, char **shortopts, int nl, struct option **longopts,
- int nrl ATTRIBUTE_UNUSED, struct option **really_longopts ATTRIBUTE_UNUSED)
-{
-EOF
-if test x"$GENERATE_SHLIB_SCRIPT" = xyes; then
-fragment <<EOF
- static const char xtra_short[] = "${PARSE_AND_LIST_SHORTOPTS}z:P:";
-EOF
-else
-fragment <<EOF
- static const char xtra_short[] = "${PARSE_AND_LIST_SHORTOPTS}z:";
-EOF
-fi
-fragment <<EOF
- static const struct option xtra_long[] = {
-EOF
-if test x"$GENERATE_SHLIB_SCRIPT" = xyes; then
-fragment <<EOF
- {"audit", required_argument, NULL, OPTION_AUDIT},
- {"Bgroup", no_argument, NULL, OPTION_GROUP},
-EOF
-fi
-fragment <<EOF
- {"build-id", optional_argument, NULL, OPTION_BUILD_ID},
- {"compress-debug-sections", required_argument, NULL, OPTION_COMPRESS_DEBUG},
-EOF
-if test x"$GENERATE_SHLIB_SCRIPT" = xyes; then
-fragment <<EOF
- {"depaudit", required_argument, NULL, 'P'},
- {"disable-new-dtags", no_argument, NULL, OPTION_DISABLE_NEW_DTAGS},
- {"enable-new-dtags", no_argument, NULL, OPTION_ENABLE_NEW_DTAGS},
- {"eh-frame-hdr", no_argument, NULL, OPTION_EH_FRAME_HDR},
- {"no-eh-frame-hdr", no_argument, NULL, OPTION_NO_EH_FRAME_HDR},
- {"exclude-libs", required_argument, NULL, OPTION_EXCLUDE_LIBS},
- {"hash-style", required_argument, NULL, OPTION_HASH_STYLE},
-EOF
-fi
-if test -n "$PARSE_AND_LIST_LONGOPTS" ; then
-fragment <<EOF
- $PARSE_AND_LIST_LONGOPTS
-EOF
-fi
-fragment <<EOF
- {NULL, no_argument, NULL, 0}
- };
-
- *shortopts = (char *) xrealloc (*shortopts, ns + sizeof (xtra_short));
- memcpy (*shortopts + ns, &xtra_short, sizeof (xtra_short));
- *longopts = (struct option *)
- xrealloc (*longopts, nl * sizeof (struct option) + sizeof (xtra_long));
- memcpy (*longopts + nl, &xtra_long, sizeof (xtra_long));
-}
-
-#define DEFAULT_BUILD_ID_STYLE "sha1"
-
-static bfd_boolean
-gld${EMULATION_NAME}_handle_option (int optc)
-{
- switch (optc)
- {
- default:
- return FALSE;
-
- case OPTION_BUILD_ID:
- if (ldelf_emit_note_gnu_build_id != NULL)
- {
- free ((char *) ldelf_emit_note_gnu_build_id);
- ldelf_emit_note_gnu_build_id = NULL;
- }
- if (optarg == NULL)
- optarg = DEFAULT_BUILD_ID_STYLE;
- if (strcmp (optarg, "none"))
- ldelf_emit_note_gnu_build_id = xstrdup (optarg);
- break;
-
- case OPTION_COMPRESS_DEBUG:
- if (strcasecmp (optarg, "none") == 0)
- link_info.compress_debug = COMPRESS_DEBUG_NONE;
- else if (strcasecmp (optarg, "zlib") == 0)
- link_info.compress_debug = COMPRESS_DEBUG_GABI_ZLIB;
- else if (strcasecmp (optarg, "zlib-gnu") == 0)
- link_info.compress_debug = COMPRESS_DEBUG_GNU_ZLIB;
- else if (strcasecmp (optarg, "zlib-gabi") == 0)
- link_info.compress_debug = COMPRESS_DEBUG_GABI_ZLIB;
- else
- einfo (_("%F%P: invalid --compress-debug-sections option: \`%s'\n"),
- optarg);
- break;
-EOF
-
-if test x"$GENERATE_SHLIB_SCRIPT" = xyes; then
-fragment <<EOF
- case OPTION_AUDIT:
- ldelf_append_to_separated_string (&audit, optarg);
- break;
-
- case 'P':
- ldelf_append_to_separated_string (&depaudit, optarg);
- break;
-
- case OPTION_DISABLE_NEW_DTAGS:
- link_info.new_dtags = FALSE;
- break;
-
- case OPTION_ENABLE_NEW_DTAGS:
- link_info.new_dtags = TRUE;
- break;
-
- case OPTION_EH_FRAME_HDR:
- link_info.eh_frame_hdr_type = DWARF2_EH_HDR;
- break;
-
- case OPTION_NO_EH_FRAME_HDR:
- link_info.eh_frame_hdr_type = 0;
- break;
-
- case OPTION_GROUP:
- link_info.flags_1 |= (bfd_vma) DF_1_GROUP;
- /* Groups must be self-contained. */
- link_info.unresolved_syms_in_objects = RM_GENERATE_ERROR;
- link_info.unresolved_syms_in_shared_libs = RM_GENERATE_ERROR;
- break;
-
- case OPTION_EXCLUDE_LIBS:
- add_excluded_libs (optarg);
- break;
-
- case OPTION_HASH_STYLE:
- link_info.emit_hash = FALSE;
- link_info.emit_gnu_hash = FALSE;
- if (strcmp (optarg, "sysv") == 0)
- link_info.emit_hash = TRUE;
- else if (strcmp (optarg, "gnu") == 0)
- link_info.emit_gnu_hash = TRUE;
- else if (strcmp (optarg, "both") == 0)
- {
- link_info.emit_hash = TRUE;
- link_info.emit_gnu_hash = TRUE;
- }
- else
- einfo (_("%F%P: invalid hash style \`%s'\n"), optarg);
- break;
-
-EOF
-fi
-fragment <<EOF
- case 'z':
- if (strcmp (optarg, "defs") == 0)
- link_info.unresolved_syms_in_objects = RM_GENERATE_ERROR;
- else if (strcmp (optarg, "undefs") == 0)
- link_info.unresolved_syms_in_objects = RM_IGNORE;
- else if (strcmp (optarg, "muldefs") == 0)
- link_info.allow_multiple_definition = TRUE;
- else if (CONST_STRNEQ (optarg, "max-page-size="))
- {
- char *end;
-
- config.maxpagesize = strtoul (optarg + 14, &end, 0);
- if (*end || (config.maxpagesize & (config.maxpagesize - 1)) != 0)
- einfo (_("%F%P: invalid maximum page size \`%s'\n"),
- optarg + 14);
- }
- else if (CONST_STRNEQ (optarg, "common-page-size="))
- {
- char *end;
- config.commonpagesize = strtoul (optarg + 17, &end, 0);
- if (*end
- || (config.commonpagesize & (config.commonpagesize - 1)) != 0)
- einfo (_("%F%P: invalid common page size \`%s'\n"),
- optarg + 17);
- }
- else if (CONST_STRNEQ (optarg, "stack-size="))
- {
- char *end;
- link_info.stacksize = strtoul (optarg + 11, &end, 0);
- if (*end || link_info.stacksize < 0)
- einfo (_("%F%P: invalid stack size \`%s'\n"), optarg + 11);
- if (!link_info.stacksize)
- /* Use -1 for explicit no-stack, because zero means
- 'default'. */
- link_info.stacksize = -1;
- }
- else if (strcmp (optarg, "execstack") == 0)
- {
- link_info.execstack = TRUE;
- link_info.noexecstack = FALSE;
- }
- else if (strcmp (optarg, "noexecstack") == 0)
- {
- link_info.noexecstack = TRUE;
- link_info.execstack = FALSE;
- }
- else if (strcmp (optarg, "globalaudit") == 0)
- {
- link_info.flags_1 |= DF_1_GLOBAUDIT;
- }
-EOF
-
-if test x"$GENERATE_SHLIB_SCRIPT" = xyes; then
-fragment <<EOF
- else if (strcmp (optarg, "global") == 0)
- link_info.flags_1 |= (bfd_vma) DF_1_GLOBAL;
- else if (strcmp (optarg, "initfirst") == 0)
- link_info.flags_1 |= (bfd_vma) DF_1_INITFIRST;
- else if (strcmp (optarg, "interpose") == 0)
- link_info.flags_1 |= (bfd_vma) DF_1_INTERPOSE;
- else if (strcmp (optarg, "loadfltr") == 0)
- link_info.flags_1 |= (bfd_vma) DF_1_LOADFLTR;
- else if (strcmp (optarg, "nodefaultlib") == 0)
- link_info.flags_1 |= (bfd_vma) DF_1_NODEFLIB;
- else if (strcmp (optarg, "nodelete") == 0)
- link_info.flags_1 |= (bfd_vma) DF_1_NODELETE;
- else if (strcmp (optarg, "nodlopen") == 0)
- link_info.flags_1 |= (bfd_vma) DF_1_NOOPEN;
- else if (strcmp (optarg, "nodump") == 0)
- link_info.flags_1 |= (bfd_vma) DF_1_NODUMP;
- else if (strcmp (optarg, "now") == 0)
- {
- link_info.flags |= (bfd_vma) DF_BIND_NOW;
- link_info.flags_1 |= (bfd_vma) DF_1_NOW;
- }
- else if (strcmp (optarg, "lazy") == 0)
- {
- link_info.flags &= ~(bfd_vma) DF_BIND_NOW;
- link_info.flags_1 &= ~(bfd_vma) DF_1_NOW;
- }
- else if (strcmp (optarg, "origin") == 0)
- {
- link_info.flags |= (bfd_vma) DF_ORIGIN;
- link_info.flags_1 |= (bfd_vma) DF_1_ORIGIN;
- }
- else if (strcmp (optarg, "combreloc") == 0)
- link_info.combreloc = TRUE;
- else if (strcmp (optarg, "nocombreloc") == 0)
- link_info.combreloc = FALSE;
- else if (strcmp (optarg, "nocopyreloc") == 0)
- link_info.nocopyreloc = TRUE;
- else if (strcmp (optarg, "relro") == 0)
- link_info.relro = TRUE;
- else if (strcmp (optarg, "norelro") == 0)
- link_info.relro = FALSE;
- else if (strcmp (optarg, "separate-code") == 0)
- link_info.separate_code = TRUE;
- else if (strcmp (optarg, "noseparate-code") == 0)
- link_info.separate_code = FALSE;
- else if (strcmp (optarg, "common") == 0)
- link_info.elf_stt_common = elf_stt_common;
- else if (strcmp (optarg, "nocommon") == 0)
- link_info.elf_stt_common = no_elf_stt_common;
- else if (strcmp (optarg, "text") == 0)
- link_info.error_textrel = TRUE;
- else if (strcmp (optarg, "notext") == 0)
- link_info.error_textrel = FALSE;
- else if (strcmp (optarg, "textoff") == 0)
- link_info.error_textrel = FALSE;
-EOF
-fi
-
-if test -n "$PARSE_AND_LIST_ARGS_CASE_Z" ; then
-fragment <<EOF
- $PARSE_AND_LIST_ARGS_CASE_Z
-EOF
-fi
-
-fragment <<EOF
- else
- einfo (_("%P: warning: -z %s ignored\n"), optarg);
- break;
-EOF
-
-if test -n "$PARSE_AND_LIST_ARGS_CASES" ; then
-fragment <<EOF
- $PARSE_AND_LIST_ARGS_CASES
-EOF
-fi
-
-fragment <<EOF
- }
-
- return TRUE;
-}
-
-EOF
-
-if test x"$LDEMUL_LIST_OPTIONS" != xgld"$EMULATION_NAME"_list_options; then
-gld_list_options="gld${EMULATION_NAME}_list_options"
-if test -n "$PARSE_AND_LIST_OPTIONS"; then
-fragment <<EOF
-
-static void
-gld${EMULATION_NAME}_list_options (FILE * file)
-{
-EOF
-
-if test -n "$PARSE_AND_LIST_OPTIONS" ; then
-fragment <<EOF
- $PARSE_AND_LIST_OPTIONS
-EOF
-fi
-
-fragment <<EOF
-}
-EOF
-else
- gld_list_options="NULL"
-fi
-
-if test -n "$PARSE_AND_LIST_EPILOGUE" ; then
-fragment <<EOF
- $PARSE_AND_LIST_EPILOGUE
-EOF
-fi
-fi
-
-fragment <<EOF
-
-struct ld_emulation_xfer_struct ld_${EMULATION_NAME}_emulation =
-{
- ${LDEMUL_BEFORE_PARSE-gld${EMULATION_NAME}_before_parse},
- ${LDEMUL_SYSLIB-syslib_default},
- ${LDEMUL_HLL-hll_default},
- ${LDEMUL_AFTER_PARSE-ldelf_after_parse},
- ${LDEMUL_AFTER_OPEN-gld${EMULATION_NAME}_after_open},
- ${LDEMUL_AFTER_CHECK_RELOCS-after_check_relocs_default},
- ${LDEMUL_AFTER_ALLOCATION-gld${EMULATION_NAME}_after_allocation},
- ${LDEMUL_SET_OUTPUT_ARCH-set_output_arch_default},
- ${LDEMUL_CHOOSE_TARGET-ldemul_default_target},
- ${LDEMUL_BEFORE_ALLOCATION-gld${EMULATION_NAME}_before_allocation},
- ${LDEMUL_GET_SCRIPT-gld${EMULATION_NAME}_get_script},
- "${EMULATION_NAME}",
- "${OUTPUT_FORMAT}",
- ${LDEMUL_FINISH-finish_default},
- ${LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS-NULL},
- ${LDEMUL_OPEN_DYNAMIC_ARCHIVE-ldelf_open_dynamic_archive},
- ${LDEMUL_PLACE_ORPHAN-ldelf_place_orphan},
- ${LDEMUL_SET_SYMBOLS-NULL},
- ${LDEMUL_PARSE_ARGS-NULL},
- gld${EMULATION_NAME}_add_options,
- gld${EMULATION_NAME}_handle_option,
- ${LDEMUL_UNRECOGNIZED_FILE-NULL},
- ${LDEMUL_LIST_OPTIONS-${gld_list_options}},
- ${LDEMUL_RECOGNIZED_FILE-ldelf_load_symbols},
- ${LDEMUL_FIND_POTENTIAL_LIBRARIES-NULL},
- ${LDEMUL_NEW_VERS_PATTERN-NULL},
- ${LDEMUL_EXTRA_MAP_FILE_TEXT-NULL}
-};
-EOF
# MA 02110-1301, USA.
#
-# This file is sourced from elf32.em, and defines extra epiphany-elf
+# This file is sourced from elf.em, and defines extra epiphany-elf
# specific routines.
#
# MA 02110-1301, USA.
#
-# This file is sourced from elf32.em, and defines extra hppa-elf
+# This file is sourced from elf.em, and defines extra hppa-elf
# specific routines.
#
fragment <<EOF
# MA 02110-1301, USA.
#
-# This file is sourced from elf32.em, and defines extra ia64-elf
+# This file is sourced from elf.em, and defines extra ia64-elf
# specific routines.
#
# Define some shell vars to insert bits of code into the standard elf
# MA 02110-1301, USA.
#
-# This file is sourced from elf32.em, and defines extra m68hc12-elf
+# This file is sourced from elf.em, and defines extra m68hc12-elf
# and m68hc11-elf specific routines. It is used to generate the
# HC11/HC12 trampolines to call a far function by using a normal 'jsr/bsr'.
#
# MA 02110-1301, USA.
-# This file is sourced from elf32.em, and defines some extra routines for m68k
+# This file is sourced from elf.em, and defines some extra routines for m68k
# embedded systems using ELF and for some other systems using m68k ELF. While
-# it is sourced from elf32.em for all m68k ELF configurations, here we include
+# it is sourced from elf.em for all m68k ELF configurations, here we include
# only the features we want depending on the configuration.
case ${target} in
# MA 02110-1301, USA.
#
-# This file is sourced from elf32.em, and defines extra metagelf
+# This file is sourced from elf.em, and defines extra metagelf
# specific routines. Taken from hppaelf.em.
#
fragment <<EOF
# MA 02110-1301, USA.
#
-# This file is sourced from elf32.em and mmo.em, used to define
+# This file is sourced from elf.em and mmo.em, used to define
# MMIX-specific things common to ELF and MMO.
fragment <<EOF
# MA 02110-1301, USA.
#
-# This file is sourced from elf32.em and used to define MMIX and ELF
+# This file is sourced from elf.em and used to define MMIX and ELF
# specific things. First include what we have in common with mmo.
source_em ${srcdir}/emultempl/mmix-elfnmmo.em
fragment <<EOF
/* Need to have this macro defined before mmix-elfnmmo, which uses the
name for the before_allocation function, defined in ldemul.c (for
- the mmo "emulation") or in elf32.em (for the elf64mmix
+ the mmo "emulation") or in elf.em (for the elf64mmix
"emulation"). */
#define gldmmo_before_allocation before_allocation_default
/* Place an orphan section. We use this to put random SEC_CODE or
SEC_READONLY sections right after MMO_TEXT_SECTION_NAME. Much borrowed
- from elf32.em. */
+ from elf.em. */
static lang_output_section_statement_type *
mmo_place_orphan (asection *s,
return NULL;
/* If there's an output section by *this* name, we'll use it, regardless
- of actual section flags, in contrast to what's done in elf32.em. */
+ of actual section flags, in contrast to what's done in elf.em. */
os = lang_insert_orphan (s, secname, 0, after, place, NULL, NULL);
return os;
# MA 02110-1301, USA.
#
-# This file is sourced from elf32.em. It is used by targets for
+# This file is sourced from elf.em. It is used by targets for
# which relaxation is not just an optimization, but for correctness.
LDEMUL_BEFORE_ALLOCATION=need_relax_${EMULATION_NAME}_before_allocation
# MA 02110-1301, USA.
#
-# This file is sourced from elf32.em, and defines extra Nios II ELF
+# This file is sourced from elf.em, and defines extra Nios II ELF
# specific routines. Taken from metagelf.em.
#
fragment <<EOF
# MA 02110-1301, USA.
#
-# This file is sourced from elf32.em, and defines extra powerpc32-elf
+# This file is sourced from elf.em, and defines extra powerpc32-elf
# specific routines.
#
fragment <<EOF
# MA 02110-1301, USA.
#
-# This file is sourced from elf32.em, and defines extra powerpc64-elf
+# This file is sourced from elf.em, and defines extra powerpc64-elf
# specific routines.
#
fragment <<EOF
# MA 02110-1301, USA.
#
-# This file is sourced from elf32.em, and defines extra pru-elf
+# This file is sourced from elf.em, and defines extra pru-elf
# specific routines.
#
fragment <<EOF
# MA 02110-1301, USA.
#
-# This file is sourced from elf32.em, and defines extra rx-elf
+# This file is sourced from elf.em, and defines extra rx-elf
# specific routines.
#
test -z "$TARGET2_TYPE" && TARGET2_TYPE="rel"
# MA 02110-1301, USA.
#
-# This file is sourced from elf32.em, and defines extra score-elf
+# This file is sourced from elf.em, and defines extra score-elf
# specific routines.
#
fragment <<EOF
# MA 02110-1301, USA.
#
-# This file is sourced from elf32.em, and defines extra spu specific
+# This file is sourced from elf.em, and defines extra spu specific
# features.
#
fragment <<EOF
# MA 02110-1301, USA.
#
-# This file is sourced from elf32.em, and defines extra C6X DSBT specific
+# This file is sourced from elf.em, and defines extra C6X DSBT specific
# features.
#
fragment <<EOF
# MA 02110-1301, USA.
#
-# This file is sourced from elf32.em, and defines extra cpu specific
+# This file is sourced from elf.em, and defines extra cpu specific
# features.
#
fragment <<EOF
}
/* Place an orphan section. We use this to put random OVR sections.
- Much borrowed from elf32.em. */
+ Much borrowed from elf.em. */
static lang_output_section_statement_type *
vms_place_orphan (asection *s,
#
# (2) VXWORKS_BASE_EM_FILE set the hook's LDEMUL_FOO variable to
# gld${EMULATION_NAME}_foo. This means that the file has
-# replaced elf32.em's default definition, so we simply #define
+# replaced elf.em's default definition, so we simply #define
# the current value of LDEMUL_FOO to vxworks_foo.
#
# (3) VXWORKS_BASE_EM_FILE set the hook's LDEMUL_FOO variable to
# MA 02110-1301, USA.
#
-# This file is sourced from elf32.em, and defines extra xtensa-elf
+# This file is sourced from elf.em, and defines extra xtensa-elf
# specific routines.
#
fragment <<EOF
-/* ELF emulation code for targets using elf32.em.
+/* ELF emulation code for targets using elf.em.
Copyright (C) 1991-2019 Free Software Foundation, Inc.
This file is part of the GNU Binutils.
-/* ELF emulation code for targets using elf32.em.
+/* ELF emulation code for targets using elf.em.
Copyright (C) 1991-2019 Free Software Foundation, Inc.
This file is part of the GNU Binutils.
${RELOCATING+*(.text.startup .text.startup.*)}
${RELOCATING+*(.text.hot .text.hot.*)}
*(.text .stub${RELOCATING+ .text.* .gnu.linkonce.t.*})
- /* .gnu.warning sections are handled specially by elf32.em. */
+ /* .gnu.warning sections are handled specially by elf.em. */
*(.gnu.warning)
${RELOCATING+${OTHER_TEXT_SECTIONS}}
} ${FILL}
{
${RELOCATING+${TEXT_START_SYMBOLS}}
*(.text .stub${RELOCATING+ .text.* .gnu.linkonce.t.*})
- /* .gnu.warning sections are handled specially by elf32.em. */
+ /* .gnu.warning sections are handled specially by elf.em. */
*(.gnu.warning)
${RELOCATING+${OTHER_TEXT_SECTIONS}}
} =${NOP-0}
${RELOCATING+*(.text.startup .text.startup.*)}
${RELOCATING+*(.text.hot .text.hot.*)}
*(.text .stub${RELOCATING+ .text.* .gnu.linkonce.t.*})
- /* .gnu.warning sections are handled specially by elf32.em. */
+ /* .gnu.warning sections are handled specially by elf.em. */
*(.gnu.warning)
${RELOCATING+${OTHER_TEXT_SECTIONS}}
} ${FILL}
${RELOCATING+*(.text.startup .text.startup.*)}
${RELOCATING+*(.text.hot .text.hot.*)}
*(.text .stub${RELOCATING+ .text.* .gnu.linkonce.t.*})
- /* .gnu.warning sections are handled specially by elf32.em. */
+ /* .gnu.warning sections are handled specially by elf.em. */
*(.gnu.warning)
${RELOCATING+${OTHER_TEXT_SECTIONS}}
} ${FILL}
{
${RELOCATING+${TEXT_START_SYMBOLS}}
*(.text .stub${RELOCATING+ .text.* .gnu.linkonce.t.*})
- /* .gnu.warning sections are handled specially by elf32.em. */
+ /* .gnu.warning sections are handled specially by elf.em. */
*(.gnu.warning)
${RELOCATING+${OTHER_TEXT_SECTIONS}}
} =${NOP-0}
{
${RELOCATING+${TEXT_START_SYMBOLS}}
*(.text .stub${RELOCATING+ .text.* .gnu.linkonce.t.*})
- /* .gnu.warning sections are handled specially by elf32.em. */
+ /* .gnu.warning sections are handled specially by elf.em. */
*(.gnu.warning)
${RELOCATING+${OTHER_TEXT_SECTIONS}}
} =${NOP-0}
{
${RELOCATING+${TEXT_START_SYMBOLS}}
*(.text .stub${RELOCATING+ .text.* .gnu.linkonce.t.*})
- /* .gnu.warning sections are handled specially by elf32.em. */
+ /* .gnu.warning sections are handled specially by elf.em. */
*(.gnu.warning)
${RELOCATING+${OTHER_TEXT_SECTIONS}}
} =${NOP-0}
${RELOCATING+${TEXT_START_SYMBOLS}}
*(.text .stub${RELOCATING+ .text.* .gnu.linkonce.t.*})
- /* .gnu.warning sections are handled specially by elf32.em. */
+ /* .gnu.warning sections are handled specially by elf.em. */
*(.gnu.warning)
${RELOCATING+${OTHER_TEXT_SECTIONS}}
KEEP (*(SORT_NONE(.fini.*)))}
*(.text)
${RELOCATING+*(.text.*)}
- /* .gnu.warning sections are handled specially by elf32.em. */
+ /* .gnu.warning sections are handled specially by elf.em. */
*(.gnu.warning)
${RELOCATING+*(.gnu.linkonce.t*)
_etext = .;
*(.text)
${RELOCATING+*(.text.*)}
- /* .gnu.warning sections are handled specially by elf32.em. */
+ /* .gnu.warning sections are handled specially by elf.em. */
*(.gnu.warning)
${RELOCATING+*(.gnu.linkonce.t.*)}
${RELOCATING+*(.tramp)}
*(.text)
${RELOCATING+*(.text.*)}
- /* .gnu.warning sections are handled specially by elf32.em. */
+ /* .gnu.warning sections are handled specially by elf.em. */
*(.gnu.warning)
${RELOCATING+*(.gnu.linkonce.t.*)}
${RELOCATING+*(.tramp)}
*(.text)
${RELOCATING+*(.text.*)}
- /* .gnu.warning sections are handled specially by elf32.em. */
+ /* .gnu.warning sections are handled specially by elf.em. */
*(.gnu.warning)
${RELOCATING+*(.gnu.linkonce.t.*)}
${RELOCATING+*(.tramp)}
*(.text)
${RELOCATING+*(.text.*)}
- /* .gnu.warning sections are handled specially by elf32.em. */
+ /* .gnu.warning sections are handled specially by elf.em. */
*(.gnu.warning)
${RELOCATING+*(.gnu.linkonce.t.*)}
${RELOCATING+*(.tramp)}
${RELOCATING+${TEXT_START_SYMBOLS}}
*(.literal .text .stub${RELOCATING+ .literal.* .text.* .gnu.linkonce.literal.* .gnu.linkonce.t.*.literal .gnu.linkonce.t.*})
- /* .gnu.warning sections are handled specially by elf32.em. */
+ /* .gnu.warning sections are handled specially by elf.em. */
*(.gnu.warning)
${RELOCATING+${OTHER_TEXT_SECTIONS}}
{
${RELOCATING+${TEXT_START_SYMBOLS}}
*(.text .stub${RELOCATING+ .text.* .gnu.linkonce.t.*})
- /* .gnu.warning sections are handled specially by elf32.em. */
+ /* .gnu.warning sections are handled specially by elf.em. */
*(.gnu.warning)
${RELOCATING+${OTHER_TEXT_SECTIONS}}
} /* ${RELOCATING+ > INTERNAL_RAM} */ =${NOP-0}
*(.text)
${RELOCATING+*(.text.*)}
*(.stub)
- /* .gnu.warning sections are handled specially by elf32.em. */
+ /* .gnu.warning sections are handled specially by elf.em. */
*(.gnu.warning)
${RELOCATING+*(.gnu.linkonce.t.*)}
${RELOCATING+${OTHER_TEXT_SECTIONS}}
{
${RELOCATING+${TEXT_START_SYMBOLS}}
*(.text .stub${RELOCATING+ .text.* .gnu.linkonce.t.*})
- /* .gnu.warning sections are handled specially by elf32.em. */
+ /* .gnu.warning sections are handled specially by elf.em. */
*(.gnu.warning)
${RELOCATING+${OTHER_TEXT_SECTIONS}}
} =${NOP-0}
${RELOCATING+*(.text.startup .text.startup.*)}
${RELOCATING+*(.text.hot .text.hot.*)}
*(.text .stub${RELOCATING+ .text.* .gnu.linkonce.t.*})
- /* .gnu.warning sections are handled specially by elf32.em. */
+ /* .gnu.warning sections are handled specially by elf.em. */
*(.gnu.warning)
${RELOCATING+${OTHER_TEXT_SECTIONS}}
} ${FILL}
*(.text)
${RELOCATING+*(.text.*)}
- /* .gnu.warning sections are handled specially by elf32.em. */
+ /* .gnu.warning sections are handled specially by elf.em. */
*(.gnu.warning)
${RELOCATING+*(.gnu.linkonce.t*)}
} =0
*(.text)
${RELOCATING+*(.text.*)}
- /* .gnu.warning sections are handled specially by elf32.em. */
+ /* .gnu.warning sections are handled specially by elf.em. */
*(.gnu.warning)
${RELOCATING+*(.gnu.linkonce.t*)}
} =0
*(.text)
${RELOCATING+*(.text.*)}
*(.stub)
- /* .gnu.warning sections are handled specially by elf32.em. */
+ /* .gnu.warning sections are handled specially by elf.em. */
*(.gnu.warning)
${RELOCATING+*(.gnu.linkonce.t.*)}
${RELOCATING+${OTHER_TEXT_SECTIONS}}
{
*(.text .stub .text.* .gnu.linkonce.t.*)
KEEP (*(.text.*personality*))
- /* .gnu.warning sections are handled specially by elf32.em. */
+ /* .gnu.warning sections are handled specially by elf.em. */
*(.gnu.warning)
*(.glue_7t) *(.glue_7)
} =0
{
*(.text .stub .text.* .gnu.linkonce.t.*)
KEEP (*(.text.*personality*))
- /* .gnu.warning sections are handled specially by elf32.em. */
+ /* .gnu.warning sections are handled specially by elf.em. */
*(.gnu.warning)
*(.glue_7t) *(.glue_7)
} =0
*(.text.startup .text.startup.*)
*(.text.hot .text.hot.*)
*(.text .stub .text.* .gnu.linkonce.t.*)
- /* .gnu.warning sections are handled specially by elf32.em. */
+ /* .gnu.warning sections are handled specially by elf.em. */
*(.gnu.warning)
*(.glue_7t) *(.glue_7) *(.vfp11_veneer) *(.v4_bx)
}
*(.text.startup .text.startup.*)
*(.text.hot .text.hot.*)
*(.text .stub .text.* .gnu.linkonce.t.*)
- /* .gnu.warning sections are handled specially by elf32.em. */
+ /* .gnu.warning sections are handled specially by elf.em. */
*(.gnu.warning)
*(.glue_7t) *(.glue_7) *(.vfp11_veneer) *(.v4_bx)
} =0
*(.text.startup .text.startup.*)
*(.text.hot .text.hot.*)
*(.text .stub .text.* .gnu.linkonce.t.*)
- /* .gnu.warning sections are handled specially by elf32.em. */
+ /* .gnu.warning sections are handled specially by elf.em. */
*(.gnu.warning)
*(.glue_7t) *(.glue_7) *(.vfp11_veneer) *(.v4_bx)
} =0
set ASFLAGS "$saved_ASFLAGS"
# Check that the --out-implib option work correctly.
-# Targets that don't use elf32.em won't support this.
+# Targets that don't use elf.em won't support this.
run_ld_link_tests [list \
[list "Generate empty import library" \
"--out-implib=tmpdir/implib.lib" "" \
#ld: -T orphan-region.ld -N -z stack-size=0
#readelf: -S -l --wide
#xfail: [uses_genelf] hppa*64*-*-* spu-*-* *-*-nacl*
-# if not using elf32.em, you don't get fancy orphan handling
+# if not using elf.em, you don't get fancy orphan handling
# spu twiddles LOAD range, hppa64 adds PHDR, nacl splits to two segments
#...
#ld: -T orphan.ld
#readelf: -S --wide
#xfail: [uses_genelf]
-# if not using elf32.em, you don't get fancy orphan handling
+# if not using elf.em, you don't get fancy orphan handling
#...
\[[ 0-9]+\] \.(text|notbad)[ \t]+PROGBITS[ \t0-9a-f]+AX?.*
#ld: -r
#readelf: -S
#xfail: [uses_genelf]
-# if not using elf32.em, you don't get fancy section handling
+# if not using elf.em, you don't get fancy section handling
#...
.* .abcxyz .*
#ld: -T group.ld
#warning: ^[^\n]*\.[obj]+: warning: function 'Foo' used$
#readelf: -s
-# if not using elf32.em, you don't get fancy section handling
+# if not using elf.em, you don't get fancy section handling
#xfail: [uses_genelf]
#xfail: "sparc64-*-solaris2*" "sparcv9-*-solaris2*"
*(.text)
*(.text.*)
*(.stub)
- /* .gnu.warning sections are handled specially by elf32.em. */
+ /* .gnu.warning sections are handled specially by elf.em. */
*(.gnu.warning)
*(.gnu.linkonce.t*)
}
_ftext = . ;
*(.text .stub .text.* .gnu.linkonce.t.*)
KEEP (*(.text.*personality*))
- /* .gnu.warning sections are handled specially by elf32.em. */
+ /* .gnu.warning sections are handled specially by elf.em. */
*(.gnu.warning)
*(.mips16.fn.*) *(.mips16.call.*)
} =0
_ftext = . ;
*(.text .stub .text.* .gnu.linkonce.t.*)
KEEP (*(.text.*personality*))
- /* .gnu.warning sections are handled specially by elf32.em. */
+ /* .gnu.warning sections are handled specially by elf.em. */
*(.gnu.warning)
*(.mips16.fn.*) *(.mips16.call.*)
} =0
.rodata : { *(.rodata) }
/* The .rel* sections are typically placed here, because of the way
- elf32.em handles orphaned sections. A bug introduced on 2002-06-10
+ elf.em handles orphaned sections. A bug introduced on 2002-06-10
would cause . to be 0 at this point. */
_bar = ASSERT (. > 0, "Bad . value");
*(.text)
*(.text.*)
*(.stub)
- /* .gnu.warning sections are handled specially by elf32.em. */
+ /* .gnu.warning sections are handled specially by elf.em. */
*(.gnu.warning)
*(.gnu.linkonce.t*)
}