* pe-dll.c: Formatting, whitespace fixes.
* NEWS: Whitespace fixes.
* configure.ac: Likewise.
* configure.tgt: Likewise.
* deffilep.y: Likewise.
* genscripts.sh: Likewise.
* ld.texinfo: Likewise.
* ldgram.y: Likewise.
* ldlang.c: Likewise.
* ldlex.l: Likewise.
* lexsup.c: Likewise.
* plugin.c: Likewise.
* emulparams/arc-endianness.sh: Likewise.
* emulparams/elf32_x86_64.sh: Likewise.
* emulparams/elf64mmix.sh: Likewise.
* emulparams/elf_x86_64.sh: Likewise.
* emulparams/h8300elf.sh: Likewise.
* emulparams/h8300elf_linux.sh: Likewise.
* emulparams/vxworks.sh: Likewise.
* emultempl/aarch64elf.em: Likewise.
* emultempl/aix.em: Likewise.
* emultempl/armelf.em: Likewise.
* emultempl/avrelf.em: Likewise.
* emultempl/beos.em: Likewise.
* emultempl/hppaelf.em: Likewise.
* emultempl/m68kcoff.em: Likewise.
* emultempl/m68kelf.em: Likewise.
* emultempl/metagelf.em: Likewise.
* emultempl/msp430.em: Likewise.
* emultempl/nds32elf.em: Likewise.
* emultempl/pe.em: Likewise.
* emultempl/pep.em: Likewise.
* emultempl/ppc64elf.em: Likewise.
* emultempl/sh64elf.em: Likewise.
* emultempl/spu_ovl.S: Likewise.
* emultempl/spuelf.em: Likewise.
* emultempl/tic6xdsbt.em: Likewise.
* emultempl/ticoff.em: Likewise.
* emultempl/vms.em: Likewise.
* po/Make-in: Likewise.
* scripttempl/DWARF.sc: Likewise.
* scripttempl/aix.sc: Likewise.
* scripttempl/alpha.sc: Likewise.
* scripttempl/alphavms.sc: Likewise.
* scripttempl/aout.sc: Likewise.
* scripttempl/arclinux.sc: Likewise.
* scripttempl/armaout.sc: Likewise.
* scripttempl/armbpabi.sc: Likewise.
* scripttempl/armcoff.sc: Likewise.
* scripttempl/avr.sc: Likewise.
* scripttempl/crisaout.sc: Likewise.
* scripttempl/delta68.sc: Likewise.
* scripttempl/dlx.sc: Likewise.
* scripttempl/elf.sc: Likewise.
* scripttempl/elf32cr16.sc: Likewise.
* scripttempl/elf32cr16c.sc: Likewise.
* scripttempl/elf32crx.sc: Likewise.
* scripttempl/elf32msp430.sc: Likewise.
* scripttempl/elf32msp430_3.sc: Likewise.
* scripttempl/elf32sh-symbian.sc: Likewise.
* scripttempl/elf32xc16x.sc: Likewise.
* scripttempl/elf32xc16xl.sc: Likewise.
* scripttempl/elf32xc16xs.sc: Likewise.
* scripttempl/elf64hppa.sc: Likewise.
* scripttempl/elf_chaos.sc: Likewise.
* scripttempl/elfarc.sc: Likewise.
* scripttempl/elfarcv2.sc: Likewise.
* scripttempl/elfd10v.sc: Likewise.
* scripttempl/elfd30v.sc: Likewise.
* scripttempl/elfi370.sc: Likewise.
* scripttempl/elfm68hc11.sc: Likewise.
* scripttempl/elfm68hc12.sc: Likewise.
* scripttempl/elfmicroblaze.sc: Likewise.
* scripttempl/elfxgate.sc: Likewise.
* scripttempl/elfxtensa.sc: Likewise.
* scripttempl/epiphany_4x4.sc: Likewise.
* scripttempl/epocpe.sc: Likewise.
* scripttempl/h8300.sc: Likewise.
* scripttempl/h8300h.sc: Likewise.
* scripttempl/h8300hn.sc: Likewise.
* scripttempl/h8300s.sc: Likewise.
* scripttempl/h8300sn.sc: Likewise.
* scripttempl/h8300sx.sc: Likewise.
* scripttempl/h8300sxn.sc: Likewise.
* scripttempl/h8500.sc: Likewise.
* scripttempl/h8500b.sc: Likewise.
* scripttempl/h8500c.sc: Likewise.
* scripttempl/h8500m.sc: Likewise.
* scripttempl/h8500s.sc: Likewise.
* scripttempl/hppaelf.sc: Likewise.
* scripttempl/i386beos.sc: Likewise.
* scripttempl/i386coff.sc: Likewise.
* scripttempl/i386go32.sc: Likewise.
* scripttempl/i386msdos.sc: Likewise.
* scripttempl/i860coff.sc: Likewise.
* scripttempl/i960.sc: Likewise.
* scripttempl/ia64vms.sc: Likewise.
* scripttempl/ip2k.sc: Likewise.
* scripttempl/iq2000.sc: Likewise.
* scripttempl/m68kaux.sc: Likewise.
* scripttempl/m68kcoff.sc: Likewise.
* scripttempl/m88kbcs.sc: Likewise.
* scripttempl/mcorepe.sc: Likewise.
* scripttempl/mep.sc: Likewise.
* scripttempl/mips.sc: Likewise.
* scripttempl/mipsbsd.sc: Likewise.
* scripttempl/mmo.sc: Likewise.
* scripttempl/moxie.sc: Likewise.
* scripttempl/nds32elf.sc: Likewise.
* scripttempl/nw.sc: Likewise.
* scripttempl/pe.sc: Likewise.
* scripttempl/pep.sc: Likewise.
* scripttempl/pj.sc: Likewise.
* scripttempl/ppcpe.sc: Likewise.
* scripttempl/psos.sc: Likewise.
* scripttempl/riscix.sc: Likewise.
* scripttempl/sh.sc: Likewise.
* scripttempl/sparccoff.sc: Likewise.
* scripttempl/st2000.sc: Likewise.
* scripttempl/tic30aout.sc: Likewise.
* scripttempl/tic30coff.sc: Likewise.
* scripttempl/tic4xcoff.sc: Likewise.
* scripttempl/tic54xcoff.sc: Likewise.
* scripttempl/tic80coff.sc: Likewise.
* scripttempl/v850.sc: Likewise.
* scripttempl/v850_rh850.sc: Likewise.
* scripttempl/vanilla.sc: Likewise.
* scripttempl/visium.sc: Likewise.
* scripttempl/w65.sc: Likewise.
* scripttempl/xstormy16.sc: Likewise.
* scripttempl/z80.sc: Likewise.
* scripttempl/z8000.sc: Likewise.
* configure: Regenerate.
-*- text -*-
* Add -z globalaudit command line option to force audit libraries to be run
for every dynamic object loaded by an executable - provided that the loader
- supports this functionality.
+ supports this functionality.
* Tighten linker script grammar around file name specifiers to prevent the use
of SORT_BY_ALIGNMENT and SORT_BY_INIT_PRIORITY on filenames. These would
if test "${enable_targets+set}" = set; then :
enableval=$enable_targets; case "${enableval}" in
yes | "") as_fn_error "enable-targets option must specify target names or 'all'" "$LINENO" 5
- ;;
+ ;;
no) enable_targets= ;;
*) enable_targets=$enableval ;;
esac
[ --enable-targets alternative target configurations],
[case "${enableval}" in
yes | "") AC_MSG_ERROR(enable-targets option must specify target names or 'all')
- ;;
+ ;;
no) enable_targets= ;;
*) enable_targets=$enableval ;;
esac])dnl
AC_ARG_ENABLE([got],
AS_HELP_STRING([--enable-got=<type>],
- [GOT handling scheme (target, single, negative, multigot)]),
+ [GOT handling scheme (target, single, negative, multigot)]),
[case "${enableval}" in
target | single | negative | multigot) got_handling=$enableval ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-got option) ;;
case "${got_handling}" in
target)
AC_DEFINE([GOT_HANDLING_DEFAULT], [GOT_HANDLING_TARGET_DEFAULT],
- [Define to choose default GOT handling scheme]) ;;
+ [Define to choose default GOT handling scheme]) ;;
single)
AC_DEFINE([GOT_HANDLING_DEFAULT], [GOT_HANDLING_SINGLE],
- [Define to choose default GOT handling scheme]) ;;
+ [Define to choose default GOT handling scheme]) ;;
negative)
AC_DEFINE([GOT_HANDLING_DEFAULT], [GOT_HANDLING_NEGATIVE],
- [Define to choose default GOT handling scheme]) ;;
+ [Define to choose default GOT handling scheme]) ;;
multigot)
AC_DEFINE([GOT_HANDLING_DEFAULT], [GOT_HANDLING_MULTIGOT],
- [Define to choose default GOT handling scheme]) ;;
+ [Define to choose default GOT handling scheme]) ;;
*) AC_MSG_ERROR(bad value ${got_handling} for --enable-got option) ;;
esac
# targ_extra_libpath additional linker emulations using LIB_PATH
# targ_extra_ofiles additional host-compiled objects needed by the emulation
# targ64_extra_emuls additional linker emulations to provide if
-# --enable-64-bit-bfd is given or if host is 64 bit.
+# --enable-64-bit-bfd is given or if host is 64 bit.
# targ64_extra_libpath additional linker emulations using LIB_PATH if
-# --enable-64-bit-bfd is given or if host is 64 bit.
+# --enable-64-bit-bfd is given or if host is 64 bit.
# NATIVE_LIB_DIRS library directories to search on this host
# (if we are a native or sysrooted linker)
targ_extra_libpath="aarch64linuxb aarch64linux32 aarch64linux32b armelfb_linux_eabi armelf_linux_eabi"
targ_extra_emuls="aarch64elf aarch64elf32 aarch64elf32b aarch64elfb armelf armelfb $targ_extra_libpath" ;;
alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu)
- targ_emul=elf64alpha_fbsd
+ targ_emul=elf64alpha_fbsd
targ_extra_emuls="elf64alpha alpha"
tdir_alpha=`echo ${targ_alias} | sed -e 's/freebsd/freebsdecoff/'` ;;
alpha*-*-linux*ecoff*) targ_emul=alpha targ_extra_emuls=elf64alpha
;;
arc*-*-elf*) targ_emul=arcelf
targ_extra_emuls="arcelf_prof arclinux arclinux_nps arclinux_prof arcv2elf arcv2elfx"
- ;;
+ ;;
arc*-*-linux*) case "${with_cpu}" in
nps400) targ_emul=arclinux_nps
targ_extra_emuls=arclinux
arm*b-*-freebsd*) targ_emul=armelfb_fbsd
targ_extra_emuls="armelf_fbsd armelf" ;;
arm*-*-freebsd* | arm-*-kfreebsd*-gnu)
- targ_emul=armelf_fbsd
+ targ_emul=armelf_fbsd
targ_extra_emuls="armelfb_fbsd armelf" ;;
armeb-*-netbsdelf*) targ_emul=armelfb_nbsd;
targ_extra_emuls="armelf_nbsd armelf armnbsd" ;;
arm-*-netbsdelf*) targ_emul=armelf_nbsd;
targ_extra_emuls="armelfb_nbsd armelf armnbsd" ;;
arm-*-netbsd*) targ_emul=armnbsd;
- targ_extra_emuls="armelf armelf_nbsd armelfb_nbsd" ;;
+ targ_extra_emuls="armelf armelf_nbsd armelfb_nbsd" ;;
arm-*-nto*) targ_emul=armnto ;;
arm-*-openbsd*) targ_emul=armnbsd ;;
arm-*-phoenix*) targ_emul=armelf ;;
armeb-*-elf | armeb-*-eabi*)
targ_emul=armelfb ;;
arm-*-elf | arm*-*-eabi* | arm-*-rtems*)
- targ_emul=armelf ;;
-arm*-*-symbianelf*) targ_emul=armsymbian;;
+ targ_emul=armelf ;;
+arm*-*-symbianelf*) targ_emul=armsymbian;;
arm-*-kaos*) targ_emul=armelf ;;
arm9e-*-elf) targ_emul=armelf ;;
arm*b-*-linux-*eabi*) targ_emul=armelfb_linux_eabi
targ_extra_emuls=armelfb_linux_eabi
targ_extra_libpath=$targ_extra_emuls
;;
-arm*-*-linux-*) targ_emul=armelf_linux
+arm*-*-linux-*) targ_emul=armelf_linux
targ_extra_emuls="armelf armelfb armelfb_linux"
targ_extra_libpath="armelfb_linux"
;;
targ_extra_emuls="elf32bfin"
targ_extra_libpath=$targ_extra_emuls
;;
-cr16-*-elf*) targ_emul=elf32cr16 ;;
-cr16c-*-elf*) targ_emul=elf32cr16c
+cr16-*-elf*) targ_emul=elf32cr16 ;;
+cr16c-*-elf*) targ_emul=elf32cr16c
;;
cris-*-*aout*) targ_emul=crisaout
targ_extra_emuls="criself crislinux"
tdir_i386linux=`echo ${targ_alias}aout | sed -e 's/x86_64/i386/'`
tdir_elf_i386=`echo ${targ_alias} | sed -e 's/x86_64/i386/'` ;;
i[3-7]86-*-redox*) targ_emul=elf_i386
- targ_extra_emuls=elf_x86_64 ;;
+ targ_extra_emuls=elf_x86_64 ;;
x86_64-*-redox*) targ_emul=elf_x86_64
targ_extra_emuls=elf_i386 ;;
i[3-7]86-*-sysv[45]*) targ_emul=elf_i386
targ_extra_emuls=elf_iamcu ;;
i[3-7]86-*-solaris2*) targ_emul=elf_i386_sol2
- targ_extra_emuls="elf_i386_ldso elf_i386 elf_iamcu elf_x86_64_sol2 elf_x86_64 elf_l1om elf_k1om"
+ targ_extra_emuls="elf_i386_ldso elf_i386 elf_iamcu elf_x86_64_sol2 elf_x86_64 elf_l1om elf_k1om"
targ_extra_libpath=$targ_extra_emuls
- ;;
+ ;;
x86_64-*-solaris2*)
targ_emul=elf_x86_64_sol2
targ_extra_emuls="elf_x86_64 elf_i386_sol2 elf_i386_ldso elf_i386 elf_iamcu elf_l1om elf_k1om"
i[3-7]86-*-unixware) targ_emul=elf_i386
targ_extra_emuls=elf_iamcu ;;
i[3-7]86-*-solaris*) targ_emul=elf_i386_ldso
- targ_extra_emuls="elf_i386"
+ targ_extra_emuls="elf_i386"
targ_extra_libpath=$targ_extra_emuls
- ;;
+ ;;
i[3-7]86-*-netbsdelf* | \
i[3-7]86-*-netbsd*-gnu* | \
i[3-7]86-*-knetbsd*-gnu)
case "${tdir_elf_iamcu}" in
*-netbsdelf*) ;;
*) tdir_elf_iamcu=`echo ${tdir_elf_iamcu} | \
- sed -e 's/netbsd/netbsdelf/'`;;
+ sed -e 's/netbsd/netbsdelf/'`;;
esac
tdir_elf_i386=`echo ${targ_alias} | \
sed -e 's/x86_64/i386/'`
case "${tdir_elf_i386}" in
*-netbsdelf*) ;;
*) tdir_elf_i386=`echo ${tdir_elf_i386} | \
- sed -e 's/netbsd/netbsdelf/'`;;
+ sed -e 's/netbsd/netbsdelf/'`;;
esac ;;
i[3-7]86-*-netware) targ_emul=i386nw ;;
i[3-7]86-*-elfiamcu) targ_emul=elf_iamcu
x86_64-*-dragonfly*) targ_emul=elf_x86_64
targ_extra_emuls="elf_i386 elf_iamcu elf_l1om elf_k1om" ;;
i[3-7]86-*-freebsd* | i[3-7]86-*-kfreebsd*-gnu)
- targ_emul=elf_i386_fbsd
+ targ_emul=elf_i386_fbsd
targ_extra_emuls="elf_i386 elf_iamcu i386bsd" ;;
x86_64-*-freebsd* | x86_64-*-kfreebsd*-gnu)
targ_emul=elf_x86_64_fbsd
targ_extra_emuls=i386pe
targ_extra_ofiles="deffilep.o pep-dll.o pe-dll.o" ;;
i[3-7]86-*-interix*) targ_emul=i386pe_posix;
- targ_extra_ofiles="deffilep.o pe-dll.o" ;;
+ targ_extra_ofiles="deffilep.o pe-dll.o" ;;
i[3-7]86-*-beospe*) targ_emul=i386beos ;;
i[3-7]86-*-beos*) targ_emul=elf_i386_be ;;
i[3-7]86-*-vxworks*) targ_emul=elf_i386_vxworks ;;
ia16-*-elf*) targ_emul=elf_i386 targ_extra_emuls=i386msdos ;;
ia64-*-elf*) targ_emul=elf64_ia64 ;;
ia64-*-freebsd* | ia64-*-kfreebsd*-gnu)
- targ_emul=elf64_ia64_fbsd
+ targ_emul=elf64_ia64_fbsd
targ_extra_emuls="elf64_ia64" ;;
ia64-*-netbsd*) targ_emul=elf64_ia64 ;;
ia64-*-linux*) targ_emul=elf64_ia64 ;;
;;
ip2k-*-elf) targ_emul=elf32ip2k
;;
-iq2000-*-elf) targ_emul=elf32iq2000 ; targ_extra_emuls="elf32iq10"
+iq2000-*-elf) targ_emul=elf32iq2000 ; targ_extra_emuls="elf32iq10"
+ ;;
+lm32-*-*linux*) targ_emul=elf32lm32fd ;;
+lm32-*-*) targ_emul=elf32lm32 ; targ_extra_emuls="elf32lm32fd"
;;
-lm32-*-*linux*) targ_emul=elf32lm32fd ;;
-lm32-*-*) targ_emul=elf32lm32 ; targ_extra_emuls="elf32lm32fd"
- ;;
m32c-*-elf | m32c-*-rtems*)
targ_emul=elf32m32c
;;
-m32r*le-*-elf*) targ_emul=m32rlelf ;;
+m32r*le-*-elf*) targ_emul=m32rlelf ;;
m32r*-*-elf* | m32r*-*-rtems*)
targ_emul=m32relf ;;
-m32r*le-*-linux-*) targ_emul=m32rlelf_linux ;;
-m32r*-*-linux-*) targ_emul=m32relf_linux
+m32r*le-*-linux-*) targ_emul=m32rlelf_linux ;;
+m32r*-*-linux-*) targ_emul=m32relf_linux
;;
m68hc11-*-*|m6811-*-*) targ_emul=m68hc11elf
targ_extra_emuls="m68hc11elfb m68hc12elf m68hc12elfb" ;;
m68k-*-linux*aout*) targ_emul=m68klinux
targ_extra_emuls=m68kelf
tdir_m68kelf=`echo ${targ_alias} | sed -e 's/aout//'` ;;
-m68k-*-linux-*) targ_emul=m68kelf
+m68k-*-linux-*) targ_emul=m68kelf
targ_extra_emuls=m68klinux
tdir_m68klinux=`echo ${targ_alias} | sed -e 's/linux/linuxaout/'` ;;
m68k-*-uclinux*) targ_emul=m68kelf ;;
;;
mips*-sgi-irix5*) targ_emul=elf32bsmip ;;
mips*-sgi-irix6*) targ_emul=elf32bmipn32
- targ_extra_emuls="elf32bsmip elf64bmip"
+ targ_extra_emuls="elf32bsmip elf64bmip"
targ_extra_libpath=$targ_extra_emuls ;;
mips*el-*-netbsd*) targ_emul=elf32ltsmip
targ_extra_emuls="elf32btsmip elf64ltsmip elf64btsmip"
;;
mips*-*-netbsd*) targ_emul=elf32btsmip
targ_extra_emuls="elf32ltsmip elf64btsmip elf64ltsmip"
- ;;
+ ;;
mips64el-*-openbsd*) targ_emul=elf64ltsmip
targ_extra_emuls=elf64btsmip
;;
mips*el-*-vxworks*) targ_emul=elf32elmipvxworks
targ_extra_emuls="elf32ebmipvxworks" ;;
mips*-*-vxworks*) targ_emul=elf32ebmipvxworks
- targ_extra_emuls="elf32elmipvxworks" ;;
+ targ_extra_emuls="elf32elmipvxworks" ;;
mips*-*-windiss) targ_emul=elf32mipswindiss ;;
mips64*el-*-linux-*) targ_emul=elf32ltsmipn32
targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip"
targ_emul=elf32btsmip_fbsd
targ_extra_emuls="elf32ltsmip elf32btsmip elf32ltsmipn32 elf32btsmipn32 elf64ltsmip elf64btsmip elf32ltsmip_fbsd elf32btsmipn32_fbsd elf32ltsmipn32_fbsd elf64ltsmip_fbsd elf64btsmip_fbsd"
targ_extra_libpath=$targ_extra_emuls ;;
-mips*-*-sysv4*) targ_emul=elf32btsmip
+mips*-*-sysv4*) targ_emul=elf32btsmip
;;
mmix-*-*) targ_emul=mmo
targ_extra_emuls=elf64mmix
mn10200-*-*) targ_emul=mn10200 ;;
mn10300-*-*) targ_emul=mn10300
;;
-mt-*elf) targ_emul=elf32mt
+mt-*elf) targ_emul=elf32mt
;;
-msp430-*-*) targ_emul=msp430elf
+msp430-*-*) targ_emul=msp430elf
targ_extra_emuls="msp430X"
;;
nds32*le-*-elf*) targ_emul=nds32elf
or1k-*-linux* | or1knd-*-linux*) targ_emul=elf32or1k_linux ;;
pdp11-*-*) targ_emul=pdp11
;;
-pjl*-*-*) targ_emul=pjlelf
+pjl*-*-*) targ_emul=pjlelf
targ_extra_emuls="elf_i386 elf_iamcu" ;;
-pj*-*-*) targ_emul=pjelf
+pj*-*-*) targ_emul=pjelf
;;
powerpc-*-freebsd* | powerpc-*-kfreebsd*-gnu)
targ_emul=elf32ppc_fbsd
eval test -n \"\$${td}sim\" || eval ${td}sim="${ta32}"
eval test -n \"\$${td64}\" || eval ${td64}="${ta64}"
;;
-powerpc-*-nto*) targ_emul=elf32ppcnto ;;
-powerpcle-*-nto*) targ_emul=elf32lppcnto ;;
+powerpc-*-nto*) targ_emul=elf32ppcnto ;;
+powerpcle-*-nto*) targ_emul=elf32lppcnto ;;
powerpc-*-macos*) targ_emul=ppcmacos ;;
powerpc-*-netware*) targ_emul=ppcnw ;;
powerpcle-*-pe | powerpcle-*-winnt* | powerpcle-*-cygwin*)
;;
rl78-*-*) targ_emul=elf32rl78 ;;
rx-*-*) targ_emul=elf32rx ;;
-s390x-*-linux*) targ_emul=elf64_s390
+s390x-*-linux*) targ_emul=elf64_s390
targ_extra_emuls=elf_s390
targ_extra_libpath=$targ_extra_emuls
tdir_elf_s390=`echo ${targ_alias} | sed -e 's/s390x/s390/'` ;;
s390x-*-tpf*) targ_emul=elf64_s390
tdir_elf_s390=`echo ${targ_alias} | sed -e 's/s390x/s390/'` ;;
-s390-*-linux*) targ_emul=elf_s390
+s390-*-linux*) targ_emul=elf_s390
targ64_extra_emuls=elf64_s390
targ64_extra_libpath=elf64_s390
tdir_elf64_s390=`echo ${targ_alias} | sed -e 's/s390/s390x/'`
;;
-score-*-elf) targ_emul=score7_elf
+score-*-elf) targ_emul=score7_elf
targ_extra_emuls=score3_elf ;;
sh-*-linux*) targ_emul=shlelf_linux
targ_extra_emuls="shelf_linux shlelf_fd shelf_fd"
sparc64-*-aout*) targ_emul=sparcaout ;;
sparc64-*-elf* | sparc64-*-rtems*)
targ_emul=elf64_sparc ;;
-sparc-sun-sunos4*) targ_emul=sun4 ;;
+sparc-sun-sunos4*) targ_emul=sun4 ;;
sparclite*-*-elf) targ_emul=elf32_sparc ;;
sparclite*-*-coff) targ_emul=coff_sparc ;;
sparclite*-fujitsu-*) targ_emul=sparcaout ;;
spu-*-elf*) targ_emul=elf32_spu ;;
tic30-*-*aout*) targ_emul=tic30aout ;;
tic30-*-*coff*) targ_emul=tic30coff ;;
-tic4x-*-* | c4x-*-*) targ_emul=tic4xcoff ; targ_extra_emuls="tic3xcoff tic3xcoff_onchip" ;;
+tic4x-*-* | c4x-*-*) targ_emul=tic4xcoff ; targ_extra_emuls="tic3xcoff tic3xcoff_onchip" ;;
tic54x-*-* | c54x*-*-*) targ_emul=tic54xcoff ;;
tic6x-*-elf) targ_emul=elf32_tic6x_elf_le
targ_extra_emuls="elf32_tic6x_elf_be elf32_tic6x_le elf32_tic6x_be"
vax-*-netbsdaout* | vax-*-netbsd*)
targ_emul=vaxnbsd
targ_extra_emuls=elf32vax ;;
-vax-*-linux-*) targ_emul=elf32vax
+vax-*-linux-*) targ_emul=elf32vax
;;
visium-*-elf) targ_emul=elf32visium
;;
w65-*-*) targ_emul=w65
;;
xc16x-*-elf) targ_emul=elf32xc16x
- targ_extra_emuls="elf32xc16xl elf32xc16xs"
- ;;
+ targ_extra_emuls="elf32xc16xl elf32xc16xs"
+ ;;
xstormy16-*-*) targ_emul=elf32xstormy16
;;
xtensa*-*-*) targ_emul=elf32xtensa
;;
-xgate-*-*) targ_emul=xgateelf
+xgate-*-*) targ_emul=xgateelf
;;
z80-*-coff) targ_emul=z80
;;
-z8k-*-coff) targ_emul=z8002; targ_extra_emuls=z8001
+z8k-*-coff) targ_emul=z8002; targ_extra_emuls=z8001
;;
*-*-ieee*) targ_emul=vanilla
;;
;
impline:
- ID '=' ID '.' ID '.' ID opt_equalequal_name
- { def_import ($1, $3, $5, $7, -1, $8); }
+ ID '=' ID '.' ID '.' ID opt_equalequal_name
+ { def_import ($1, $3, $5, $7, -1, $8); }
| ID '=' ID '.' ID '.' NUMBER opt_equalequal_name
{ def_import ($1, $3, $5, 0, $7, $8); }
| ID '=' ID '.' ID opt_equalequal_name
- { def_import ($1, $3, 0, $5, -1, $6); }
+ { def_import ($1, $3, 0, $5, -1, $6); }
| ID '=' ID '.' NUMBER opt_equalequal_name
- { def_import ($1, $3, 0, 0, $5, $6); }
+ { def_import ($1, $3, 0, 0, $5, $6); }
| ID '.' ID '.' ID opt_equalequal_name
- { def_import( 0, $1, $3, $5, -1, $6); }
+ { def_import( 0, $1, $3, $5, -1, $6); }
| ID '.' ID opt_equalequal_name
- { def_import ( 0, $1, 0, $3, -1, $4); }
+ { def_import ( 0, $1, 0, $3, -1, $4); }
;
seclist:
;
opt_equal_name:
- '=' opt_name2 { $$ = $2; }
- | { $$ = 0; }
+ '=' opt_name2 { $$ = $2; }
+ | { $$ = 0; }
;
opt_base: BASE '=' VMA { $$ = $3;}
if ((e = cmp_export_elem (b, ex_name, in_name, its_name, ord)) <= 0)
{
if (!e)
- *is_ident = 1;
+ *is_ident = 1;
return 0;
}
if (max == 1)
p = (l + r) / 2;
e = cmp_export_elem (b + p, ex_name, in_name, its_name, ord);
if (!e)
- {
- *is_ident = 1;
- return p;
- }
+ {
+ *is_ident = 1;
+ return p;
+ }
else if (e < 0)
- r = p - 1;
+ r = p - 1;
else if (e > 0)
- l = p + 1;
+ l = p + 1;
}
if ((e = cmp_export_elem (b + l, ex_name, in_name, its_name, ord)) > 0)
++l;
if ((e = cmp_import_elem (b, ex_name, in_name, module, ord)) <= 0)
{
if (!e)
- *is_ident = 1;
+ *is_ident = 1;
return 0;
}
if (max == 1)
else if (!e || max == 2)
{
if (!e)
- *is_ident = 1;
+ *is_ident = 1;
return max - 1;
}
l = 0; r = max - 1;
p = (l + r) / 2;
e = cmp_import_elem (b + p, ex_name, in_name, module, ord);
if (!e)
- {
- *is_ident = 1;
- return p;
- }
+ {
+ *is_ident = 1;
+ return p;
+ }
else if (e < 0)
- r = p - 1;
+ r = p - 1;
else if (e > 0)
- l = p + 1;
+ l = p + 1;
}
if ((e = cmp_import_elem (b + l, ex_name, in_name, module, ord)) > 0)
++l;
break;
/* Scan forward until we encounter any of:
- - the end of the buffer
+ - the end of the buffer
- the start of a new option
- a newline separating options
- - a NUL separating options. */
+ - a NUL separating options. */
for (tend = (char *) (param + 1);
(tend < pend
&& !(ISSPACE (tend[-1]) && *tend == '-')
def->name = xmalloc (strlen (image_name) + strlen (suffix) + 1);
sprintf (def->name, "%s%s", image_name, suffix);
- }
+ }
else
def->name = xstrdup (image_name);
}
return;
}
if (e > 0)
- break;
+ break;
c = (p = c)->next;
}
if (q == '@')
{
- if (ISBLANK (c) ) /* '@' followed by whitespace. */
+ if (ISBLANK (c) ) /* '@' followed by whitespace. */
return (q);
- else if (ISDIGIT (c)) /* '@' followed by digit. */
- {
+ else if (ISDIGIT (c)) /* '@' followed by digit. */
+ {
def_ungetc (c);
- return (q);
+ return (q);
}
#if TRACE
printf ("lex: @ returns itself\n");
def_ungetc (c);
if (ISALPHA (q)) /* Check for tokens. */
{
- for (i = 0; tokens[i].name; i++)
+ for (i = 0; tokens[i].name; i++)
if (strcmp (tokens[i].name, buffer) == 0)
{
#if TRACE
{
c = def_getc ();
if (c == '=')
- {
+ {
#if TRACE
- printf ("lex: `==' returns EQUAL\n");
+ printf ("lex: `==' returns EQUAL\n");
#endif
- return EQUAL;
- }
+ return EQUAL;
+ }
def_ungetc (c);
#if TRACE
printf ("lex: `=' returns itself\n");
# '*' pattern is for.
case ${target} in
arceb-*)
- ARC_ENDIAN="big"
- ;;
+ ARC_ENDIAN="big"
+ ;;
arc-* | * )
- ARC_ENDIAN="little"
- ;;
+ ARC_ENDIAN="little"
+ ;;
esac
x86_64*-linux*|i[3-7]86-*-linux-*)
case "$EMULATION_NAME" in
*32*)
- LIBPATH_SUFFIX=x32
+ LIBPATH_SUFFIX=x32
LIBPATH_SUFFIX_SKIP=64
;;
*64*)
- LIBPATH_SUFFIX=64
+ LIBPATH_SUFFIX=64
;;
esac
;;
OTHER_TEXT_SECTIONS="
${RELOCATING+
_start. = (DEFINED (_start) ? _start
- : (DEFINED (Main) ? Main : (DEFINED (.text) ? .text : 0)));
+ : (DEFINED (Main) ? Main : (DEFINED (.text) ? .text : 0)));
PROVIDE (Main = DEFINED (Main) ? Main : (DEFINED (_start) ? _start : _start.));
}"
x86_64*-linux*|i[3-7]86-*-linux-*)
case "$EMULATION_NAME" in
*64*)
- LIBPATH_SUFFIX=64
+ LIBPATH_SUFFIX=64
PARSE_AND_LIST_OPTIONS_BNDPLT='
fprintf (file, _("\
-z bndplt Always generate BND prefix in PLT entries\n"));
'
PARSE_AND_LIST_OPTIONS="$PARSE_AND_LIST_OPTIONS $PARSE_AND_LIST_OPTIONS_BNDPLT"
PARSE_AND_LIST_ARGS_CASE_Z="$PARSE_AND_LIST_ARGS_CASE_Z $PARSE_AND_LIST_ARGS_CASE_Z_BNDPLT"
- ;;
+ ;;
esac
;;
*-*-solaris2*)
TINY_DATA_SECTION=".tinydata ${RELOCATING+0xff8000} :
{
*(.tinydata)
- ${RELOCATING+ _tinydata = .; }
+ ${RELOCATING+ _tinydata = .; }
}"
TINY_BSS_SECTION=".tinybss : ${RELOCATING+AT (_tinydata)}
{
TINY_DATA_SECTION=".tinydata ${RELOCATING+0xff8000} :
{
*(.tinydata)
- ${RELOCATING+ _tinydata = .; }
+ ${RELOCATING+ _tinydata = .; }
}"
TINY_BSS_SECTION=".tinybss : ${RELOCATING+AT (_tinydata)}
{
# be last. The other sections should be sorted, but the current linker script
# parse does not seem to allow that with the SORT keyword in this context.
INIT_START='_init = .;
- KEEP (*(.init$00));
- KEEP (*(.init$0[1-9]));
- KEEP (*(.init$[1-8][0-9]));
- KEEP (*(.init$9[0-8]));'
+ KEEP (*(.init$00));
+ KEEP (*(.init$0[1-9]));
+ KEEP (*(.init$[1-8][0-9]));
+ KEEP (*(.init$9[0-8]));'
INIT_END='KEEP (*(.init$99));'
FINI_START='_fini = .;
- KEEP (*(.fini$00));
- KEEP (*(.fini$0[1-9]));
- KEEP (*(.fini$[1-8][0-9]));
- KEEP (*(.fini$9[0-8]));'
+ KEEP (*(.fini$00));
+ KEEP (*(.fini$0[1-9]));
+ KEEP (*(.fini$[1-8][0-9]));
+ KEEP (*(.fini$9[0-8]));'
FINI_END="KEEP (*(.fini\$99));
- PROVIDE (${SYMPREFIX}_etext = .);"
+ PROVIDE (${SYMPREFIX}_etext = .);"
OTHER_READWRITE_SECTIONS=".tls_data ${RELOCATING-0} : {${RELOCATING+
__wrs_rtp_tls_data_start = .;
{
/* Here we rummage through the found bfds to collect information. */
LANG_FOR_EACH_INPUT_STATEMENT (is)
- {
- /* Initialise mapping tables for code/data. */
- bfd_elf${ELFSIZE}_aarch64_init_maps (is->the_bfd);
- }
+ {
+ /* Initialise mapping tables for code/data. */
+ bfd_elf${ELFSIZE}_aarch64_init_maps (is->the_bfd);
+ }
}
/* Call the standard elf routine. */
PARSE_AND_LIST_PROLOGUE='
#define OPTION_NO_ENUM_SIZE_WARNING 309
#define OPTION_PIC_VENEER 310
-#define OPTION_STUBGROUP_SIZE 311
+#define OPTION_STUBGROUP_SIZE 311
#define OPTION_NO_WCHAR_SIZE_WARNING 312
#define OPTION_FIX_ERRATUM_835769 313
#define OPTION_FIX_ERRATUM_843419 314
{
const char *end;
- group_size = bfd_scan_vma (optarg, &end, 0);
- if (*end)
+ group_size = bfd_scan_vma (optarg, &end, 0);
+ if (*end)
einfo (_("%P%F: invalid number `%s'\''\n"), optarg);
}
break;
{
/* Skip empty lines. */
while (*b == '\n' || *b == '\r')
- b++;
+ b++;
/* Stop if end of buffer. */
if (b == buffer + len)
- break;
+ break;
/* Eat any byte until end of line. */
for (e = b; *e != '\0'; e++)
- if (*e == '\n' || *e == '\r')
- break;
+ if (*e == '\n' || *e == '\r')
+ break;
/* Replace end of line by nul. */
if (*e != '\0')
- *e++ = '\0';
+ *e++ = '\0';
if (b != e)
- lang_add_input_file (b, lang_input_file_is_search_file_enum, NULL);
+ lang_add_input_file (b, lang_input_file_is_search_file_enum, NULL);
b = e;
}
return;
case 'f':
/* This overrides --auxiliary. This option specifies a file containing
- a list of input files. */
+ a list of input files. */
read_file_list (optarg);
break;
/* Here we rummage through the found bfds to collect glue information. */
LANG_FOR_EACH_INPUT_STATEMENT (is)
{
- /* Initialise mapping tables for code/data. */
- bfd_elf32_arm_init_maps (is->the_bfd);
+ /* Initialise mapping tables for code/data. */
+ bfd_elf32_arm_init_maps (is->the_bfd);
if (!bfd_elf32_arm_process_before_allocation (is->the_bfd,
&link_info)
{
LANG_FOR_EACH_INPUT_STATEMENT (is)
{
- /* Figure out where VFP11 erratum veneers (and the labels returning
- from same) have been placed. */
- bfd_elf32_arm_vfp11_fix_veneer_locations (is->the_bfd, &link_info);
+ /* Figure out where VFP11 erratum veneers (and the labels returning
+ from same) have been placed. */
+ bfd_elf32_arm_vfp11_fix_veneer_locations (is->the_bfd, &link_info);
/* Figure out where STM32L4XX erratum veneers (and the labels returning
from them) have been placed. */
bfd_elf32_arm_set_target_params (link_info.output_bfd, &link_info, ¶ms);
stub_file = lang_add_input_file ("linker stubs",
- lang_input_file_is_fake_enum,
- NULL);
+ lang_input_file_is_fake_enum,
+ NULL);
stub_file->the_bfd = bfd_create ("linker stubs", link_info.output_bfd);
if (stub_file->the_bfd == NULL
|| ! bfd_set_arch_mach (stub_file->the_bfd,
- bfd_get_arch (link_info.output_bfd),
- bfd_get_mach (link_info.output_bfd)))
+ bfd_get_arch (link_info.output_bfd),
+ bfd_get_mach (link_info.output_bfd)))
{
einfo (_("%X%P: can not create BFD %E\n"));
return;
case OPTION_VFP11_DENORM_FIX:
if (strcmp (optarg, "none") == 0)
- params.vfp11_denorm_fix = BFD_ARM_VFP11_FIX_NONE;
+ params.vfp11_denorm_fix = BFD_ARM_VFP11_FIX_NONE;
else if (strcmp (optarg, "scalar") == 0)
- params.vfp11_denorm_fix = BFD_ARM_VFP11_FIX_SCALAR;
+ params.vfp11_denorm_fix = BFD_ARM_VFP11_FIX_SCALAR;
else if (strcmp (optarg, "vector") == 0)
- params.vfp11_denorm_fix = BFD_ARM_VFP11_FIX_VECTOR;
+ params.vfp11_denorm_fix = BFD_ARM_VFP11_FIX_VECTOR;
else
- einfo (_("Unrecognized VFP11 fix type '\''%s'\''.\n"), optarg);
+ einfo (_("Unrecognized VFP11 fix type '\''%s'\''.\n"), optarg);
break;
case OPTION_STM32L4XX_FIX:
if (!optarg)
- params.stm32l4xx_fix = BFD_ARM_STM32L4XX_FIX_DEFAULT;
+ params.stm32l4xx_fix = BFD_ARM_STM32L4XX_FIX_DEFAULT;
else if (strcmp (optarg, "none") == 0)
- params.stm32l4xx_fix = BFD_ARM_STM32L4XX_FIX_NONE;
+ params.stm32l4xx_fix = BFD_ARM_STM32L4XX_FIX_NONE;
else if (strcmp (optarg, "default") == 0)
- params.stm32l4xx_fix = BFD_ARM_STM32L4XX_FIX_DEFAULT;
+ params.stm32l4xx_fix = BFD_ARM_STM32L4XX_FIX_DEFAULT;
else if (strcmp (optarg, "all") == 0)
- params.stm32l4xx_fix = BFD_ARM_STM32L4XX_FIX_ALL;
+ params.stm32l4xx_fix = BFD_ARM_STM32L4XX_FIX_ALL;
else
- einfo (_("Unrecognized STM32L4XX fix type '\''%s'\''.\n"), optarg);
+ einfo (_("Unrecognized STM32L4XX fix type '\''%s'\''.\n"), optarg);
break;
case OPTION_NO_ENUM_SIZE_WARNING:
{
const char *end;
- group_size = bfd_scan_vma (optarg, &end, 0);
- if (*end)
+ group_size = bfd_scan_vma (optarg, &end, 0);
+ if (*end)
einfo (_("%P%F: invalid number `%s'\''\n"), optarg);
}
break;
avr_elf_set_global_bfd_parameters (void)
{
elf32_avr_setup_params (& link_info,
- stub_file->the_bfd,
- avr_stub_section,
- avr_no_stubs,
- avr_debug_stubs,
- avr_debug_relax,
- avr_pc_wrap_around,
- avr_replace_call_ret_sequences);
+ stub_file->the_bfd,
+ avr_stub_section,
+ avr_no_stubs,
+ avr_debug_stubs,
+ avr_debug_relax,
+ avr_pc_wrap_around,
+ avr_replace_call_ret_sequences);
}
}
stub_file = lang_add_input_file ("linker stubs",
- lang_input_file_is_fake_enum,
- NULL);
+ lang_input_file_is_fake_enum,
+ NULL);
stub_file->the_bfd = bfd_create ("linker stubs", link_info.output_bfd);
if (stub_file->the_bfd == NULL
|| !bfd_set_arch_mach (stub_file->the_bfd,
- bfd_get_arch (link_info.output_bfd),
- bfd_get_mach (link_info.output_bfd)))
+ bfd_get_arch (link_info.output_bfd),
+ bfd_get_mach (link_info.output_bfd)))
{
einfo (_("%X%P: can not create stub BFD %E\n"));
return;
/* Now we add the stub section. */
flags = (SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_CODE
- | SEC_HAS_CONTENTS | SEC_RELOC | SEC_IN_MEMORY | SEC_KEEP);
+ | SEC_HAS_CONTENTS | SEC_RELOC | SEC_IN_MEMORY | SEC_KEEP);
avr_stub_section = bfd_make_section_anyway_with_flags (stub_file->the_bfd,
".trampolines",
flags);
return;
- err_ret:
- einfo (_("%X%P: can not make stub section: %E\n"));
- return;
+ err_ret:
+ einfo (_("%X%P: can not make stub section: %E\n"));
+ return;
}
/* Re-calculates the size of the stubs so that we won't waste space. */
{
avr_link_relax = TRUE;
for (abfd = link_info.input_bfds; abfd != NULL; abfd = abfd->link.next)
- {
- /* Don't let the linker stubs prevent the final object being
- marked as link-relax ready. */
- if ((elf_elfheader (abfd)->e_flags
- & EF_AVR_LINKRELAX_PREPARED) == 0
- && abfd != stub_file->the_bfd)
- {
- avr_link_relax = FALSE;
- break;
- }
- }
+ {
+ /* Don't let the linker stubs prevent the final object being
+ marked as link-relax ready. */
+ if ((elf_elfheader (abfd)->e_flags
+ & EF_AVR_LINKRELAX_PREPARED) == 0
+ && abfd != stub_file->the_bfd)
+ {
+ avr_link_relax = FALSE;
+ break;
+ }
+ }
}
else
{
PARSE_AND_LIST_PROLOGUE='
#define OPTION_NO_CALL_RET_REPLACEMENT 301
-#define OPTION_PMEM_WRAP_AROUND 302
-#define OPTION_NO_STUBS 303
-#define OPTION_DEBUG_STUBS 304
-#define OPTION_DEBUG_RELAX 305
+#define OPTION_PMEM_WRAP_AROUND 302
+#define OPTION_NO_STUBS 303
+#define OPTION_DEBUG_STUBS 304
+#define OPTION_DEBUG_RELAX 305
'
PARSE_AND_LIST_LONGOPTS='
{ "no-call-ret-replacement", no_argument,
- NULL, OPTION_NO_CALL_RET_REPLACEMENT},
+ NULL, OPTION_NO_CALL_RET_REPLACEMENT},
{ "pmem-wrap-around", required_argument,
NULL, OPTION_PMEM_WRAP_AROUND},
{ "no-stubs", no_argument,
case OPTION_PMEM_WRAP_AROUND:
{
- /* This variable is defined in the bfd library. */
- if ((!strcmp (optarg,"32k")) || (!strcmp (optarg,"32K")))
- avr_pc_wrap_around = 32768;
- else if ((!strcmp (optarg,"8k")) || (!strcmp (optarg,"8K")))
- avr_pc_wrap_around = 8192;
- else if ((!strcmp (optarg,"16k")) || (!strcmp (optarg,"16K")))
- avr_pc_wrap_around = 16384;
- else if ((!strcmp (optarg,"64k")) || (!strcmp (optarg,"64K")))
- avr_pc_wrap_around = 0x10000;
- else
- return FALSE;
+ /* This variable is defined in the bfd library. */
+ if ((!strcmp (optarg,"32k")) || (!strcmp (optarg,"32K")))
+ avr_pc_wrap_around = 32768;
+ else if ((!strcmp (optarg,"8k")) || (!strcmp (optarg,"8K")))
+ avr_pc_wrap_around = 8192;
+ else if ((!strcmp (optarg,"16k")) || (!strcmp (optarg,"16K")))
+ avr_pc_wrap_around = 16384;
+ else if ((!strcmp (optarg,"64k")) || (!strcmp (optarg,"64K")))
+ avr_pc_wrap_around = 0x10000;
+ else
+ return FALSE;
}
break;
case OPTION_NO_CALL_RET_REPLACEMENT:
{
- /* This variable is defined in the bfd library. */
- avr_replace_call_ret_sequences = FALSE;
+ /* This variable is defined in the bfd library. */
+ avr_replace_call_ret_sequences = FALSE;
}
break;
'
#define OPTION_MINOR_OS_VERSION (OPTION_MINOR_IMAGE_VERSION + 1)
#define OPTION_MINOR_SUBSYSTEM_VERSION (OPTION_MINOR_OS_VERSION + 1)
#define OPTION_SECTION_ALIGNMENT (OPTION_MINOR_SUBSYSTEM_VERSION + 1)
-#define OPTION_STACK (OPTION_SECTION_ALIGNMENT + 1)
-#define OPTION_SUBSYSTEM (OPTION_STACK + 1)
+#define OPTION_STACK (OPTION_SECTION_ALIGNMENT + 1)
+#define OPTION_SUBSYSTEM (OPTION_STACK + 1)
#define OPTION_HEAP (OPTION_SUBSYSTEM + 1)
static void
/* Enable this once we split millicode stuff from libgcc:
lang_add_input_file ("milli",
- lang_input_file_is_l_enum,
+ lang_input_file_is_l_enum,
NULL);
*/
case OPTION_STUBGROUP_SIZE:
{
const char *end;
- group_size = bfd_scan_vma (optarg, &end, 0);
- if (*end)
+ group_size = bfd_scan_vma (optarg, &end, 0);
+ if (*end)
einfo (_("%P%F: invalid number `%s'\''\n"), optarg);
}
break;
asection *datasec;
/* As first-order business, make sure that each input BFD is COFF. It
- better be, as we are directly calling a COFF backend function. */
+ better be, as we are directly calling a COFF backend function. */
if (bfd_get_flavour (abfd) != bfd_target_coff_flavour)
einfo (_("%F%B: all input objects must be COFF "
"for --embedded-relocs\n"));
datasec = bfd_get_section_by_name (abfd, ".data");
/* Note that we assume that the reloc_count field has already
- been set up. We could call bfd_get_reloc_upper_bound, but
- that returns the size of a memory buffer rather than a reloc
- count. We do not want to call bfd_canonicalize_reloc,
- because although it would always work it would force us to
- read in the relocs into BFD canonical form, which would waste
- a significant amount of time and memory. */
+ been set up. We could call bfd_get_reloc_upper_bound, but
+ that returns the size of a memory buffer rather than a reloc
+ count. We do not want to call bfd_canonicalize_reloc,
+ because although it would always work it would force us to
+ read in the relocs into BFD canonical form, which would waste
+ a significant amount of time and memory. */
if (datasec != NULL && datasec->reloc_count > 0)
{
asection *relsec;
}
/* Double check that all other data sections are empty, as is
- required for embedded PIC code. */
+ required for embedded PIC code. */
bfd_map_over_sections (abfd, check_sections, datasec);
}
}
PARSE_AND_LIST_ARGS_CASES='
case OPTION_GOT:
if (strcmp (optarg, "target") == 0)
- got_handling = GOT_HANDLING_TARGET_DEFAULT;
+ got_handling = GOT_HANDLING_TARGET_DEFAULT;
else if (strcmp (optarg, "single") == 0)
- got_handling = 0;
+ got_handling = 0;
else if (strcmp (optarg, "negative") == 0)
- got_handling = 1;
+ got_handling = 1;
else if (strcmp (optarg, "multigot") == 0)
- got_handling = 2;
+ got_handling = 2;
else
- einfo (_("Unrecognized --got argument '\''%s'\''.\n"), optarg);
+ einfo (_("Unrecognized --got argument '\''%s'\''.\n"), optarg);
break;
'
case OPTION_STUBGROUP_SIZE:
{
const char *end;
- group_size = bfd_scan_vma (optarg, &end, 0);
- if (*end)
+ group_size = bfd_scan_vma (optarg, &end, 0);
+ if (*end)
einfo (_("%P%F: invalid number `%s'\''\n"), optarg);
}
break;
Copyright (C) 2014-2017 Free Software Foundation, Inc.
Written by Steve Chamberlain steve@cygnus.com
Extended for the MSP430 by Nick Clifton nickc@redhat.com
-
+
This file is part of the GNU Binutils.
This program is free software; you can redistribute it and/or modify
break;
case lang_wild_statement_enum:
- amount += scan_children (l->wild_statement.children.head);
+ amount += scan_children (l->wild_statement.children.head);
break;
case lang_data_statement_enum:
return amount;
}
-
+
/* Place an orphan section. We use this to put .either sections
into either their lower or their upper equivalents. */
}
else
name = (char *) secname;
-
+
lower_name = concat (".lower", name, NULL);
upper_name = concat (".upper", name, NULL);
{
/* Initialize ex9 hash table. */
if (!nds32_elf_ex9_init ())
- return;
+ return;
}
/* Call default after allocation callback.
(OPTION_EXCLUDE_LIBS + 1)
#define OPTION_DLL_DISABLE_RUNTIME_PSEUDO_RELOC \
(OPTION_DLL_ENABLE_RUNTIME_PSEUDO_RELOC + 1)
-#define OPTION_LARGE_ADDRESS_AWARE (OPTION_DLL_DISABLE_RUNTIME_PSEUDO_RELOC + 1)
+#define OPTION_LARGE_ADDRESS_AWARE (OPTION_DLL_DISABLE_RUNTIME_PSEUDO_RELOC + 1)
#define OPTION_DISABLE_LARGE_ADDRESS_AWARE \
- (OPTION_LARGE_ADDRESS_AWARE + 1)
+ (OPTION_LARGE_ADDRESS_AWARE + 1)
#define OPTION_DLL_ENABLE_RUNTIME_PSEUDO_RELOC_V1 \
(OPTION_DISABLE_LARGE_ADDRESS_AWARE + 1)
#define OPTION_DLL_ENABLE_RUNTIME_PSEUDO_RELOC_V2 \
(OPTION_DLL_ENABLE_RUNTIME_PSEUDO_RELOC_V2 + 1)
#define OPTION_USE_NUL_PREFIXED_IMPORT_TABLES \
(OPTION_EXCLUDE_MODULES_FOR_IMPLIB + 1)
-#define OPTION_NO_LEADING_UNDERSCORE (OPTION_USE_NUL_PREFIXED_IMPORT_TABLES + 1)
-#define OPTION_LEADING_UNDERSCORE (OPTION_NO_LEADING_UNDERSCORE + 1)
+#define OPTION_NO_LEADING_UNDERSCORE (OPTION_USE_NUL_PREFIXED_IMPORT_TABLES + 1)
+#define OPTION_LEADING_UNDERSCORE (OPTION_NO_LEADING_UNDERSCORE + 1)
#define OPTION_ENABLE_LONG_SECTION_NAMES \
(OPTION_LEADING_UNDERSCORE + 1)
#define OPTION_DISABLE_LONG_SECTION_NAMES \
int i;
static const struct
- {
- const int value;
- const char *entry;
- }
+ {
+ const int value;
+ const char *entry;
+ }
v[] =
{
{ 1, "NtProcessStartup" },
else
{
for (i = 0; v[i].entry; i++)
- if (v[i].value == pe_subsystem)
- break;
+ if (v[i].value == pe_subsystem)
+ break;
/* If no match, use the default. */
if (v[i].entry != NULL)
- entry = v[i].entry;
+ entry = v[i].entry;
else
- entry = default_entry;
+ entry = default_entry;
}
initial_symbol_char = (is_underscoring () != 0 ? "_" : "");
if (lead_at)
*cname = '_';
- if (at)
+ if (at)
* strchr (cname, '@') = 0;
sym = bfd_link_hash_lookup (link_info.hash, cname, FALSE, FALSE, TRUE);
status = bfd_bread (&b, (bfd_size_type) 1, abfd);
if (status < 1)
- {
- break;
- }
+ {
+ break;
+ }
(*process) (&b, 1, arg);
filepos += 1;
{
struct bfd_link_order *l = NULL;
for (l = asec->map_head.link_order; l != NULL; l = l->next)
- {
- if (l->type == bfd_indirect_link_order)
- {
- if (l->u.indirect.section == t->build_id.sec)
- {
- link_order = l;
- break;
- }
- }
- }
+ {
+ if (l->type == bfd_indirect_link_order)
+ {
+ if (l->u.indirect.section == t->build_id.sec)
+ {
+ link_order = l;
+ break;
+ }
+ }
+ }
if (link_order)
- break;
+ break;
}
if (!link_order)
{
einfo (_("%P: warning: .buildid section discarded,"
- " --build-id ignored.\n"));
+ " --build-id ignored.\n"));
return TRUE;
}
struct bfd_link_hash_entry *h;
sprintf (buf, "%s%s", U (""),
- pe_def_file->exports[i].internal_name);
+ pe_def_file->exports[i].internal_name);
h = bfd_link_hash_lookup (link_info.hash, buf, TRUE, TRUE, TRUE);
if (h == (struct bfd_link_hash_entry *) NULL)
/* Alternate explicit import library for dll's. */
{ "%s.dll.a", FALSE },
/* "libfoo.a" could be either an import lib or a static lib.
- For backwards compatibility, libfoo.a needs to precede
- libfoo.dll and foo.dll in the search. */
+ For backwards compatibility, libfoo.a needs to precede
+ libfoo.dll and foo.dll in the search. */
{ "lib%s.a", FALSE },
/* The 'native' spelling of an import lib name is "foo.lib". */
{ "%s.lib", FALSE },
int i;
static const struct
- {
- const int value;
- const char *entry;
- }
+ {
+ const int value;
+ const char *entry;
+ }
v[] =
{
{ 1, "NtProcessStartup" },
else
{
for (i = 0; v[i].entry; i++)
- if (v[i].value == pep_subsystem)
- break;
+ if (v[i].value == pep_subsystem)
+ break;
/* If no match, use the default. */
if (v[i].entry != NULL)
- entry = v[i].entry;
+ entry = v[i].entry;
else
- entry = default_entry;
+ entry = default_entry;
}
/* Now we check target's default for getting proper symbol_char. */
status = bfd_bread (&b, (bfd_size_type) 1, abfd);
if (status < 1)
- {
- break;
- }
+ {
+ break;
+ }
(*process) (&b, 1, arg);
filepos += 1;
{
struct bfd_link_order *l = NULL;
for (l = asec->map_head.link_order; l != NULL; l = l->next)
- {
- if (l->type == bfd_indirect_link_order)
- {
- if (l->u.indirect.section == t->build_id.sec)
- {
- link_order = l;
- break;
- }
- }
- }
+ {
+ if (l->type == bfd_indirect_link_order)
+ {
+ if (l->u.indirect.section == t->build_id.sec)
+ {
+ link_order = l;
+ break;
+ }
+ }
+ }
if (link_order)
- break;
+ break;
}
if (!link_order)
{
einfo (_("%P: warning: .buildid section discarded,"
- " --build-id ignored.\n"));
+ " --build-id ignored.\n"));
return TRUE;
}
/* Alternate explicit import library for dll's. */
{ "%s.dll.a", FALSE },
/* "libfoo.a" could be either an import lib or a static lib.
- For backwards compatibility, libfoo.a needs to precede
- libfoo.dll and foo.dll in the search. */
+ For backwards compatibility, libfoo.a needs to precede
+ libfoo.dll and foo.dll in the search. */
{ "lib%s.a", FALSE },
/* The 'native' spelling of an import lib name is "foo.lib". */
{ "%s.lib", FALSE },
case OPTION_STUBGROUP_SIZE:
{
const char *end;
- params.group_size = bfd_scan_vma (optarg, &end, 0);
- if (*end)
+ params.group_size = bfd_scan_vma (optarg, &end, 0);
+ if (*end)
einfo (_("%P%F: invalid number `%s'\''\n"), optarg);
}
break;
break_1:
/* Check that all input sections have the same contents-type flags
- as the first input section. */
+ as the first input section. */
{
LANG_FOR_EACH_INPUT_STATEMENT (f)
{
break_1:
/* Check that all input sections have the same contents-type flags
- as the first input section. */
+ as the first input section. */
{
LANG_FOR_EACH_INPUT_STATEMENT (f)
{
#define irq_stat save4
.text
- .align 4
+ .align 4
.type __rv_pattern, @object
.size __rv_pattern, 16
__rv_pattern:
* Load the previous overlay and jump to the caller return address.
* Updates __ovly_current.
*/
- .align 4
+ .align 4
.global __ovly_return
.type __ovly_return, @function
__ovly_return:
#endif
andc oldvma, oldvma, pbit # 0,2 77
lqd save1, -16($sp) # 1,6 77
- nop # 0,0 78
+ nop # 0,0 78
#lnop
#nop
stqx oldvma, tab5, off5 # 1,6 79
if (is_spu_target ())
{
if (params.local_store_lo < params.local_store_hi)
- {
+ {
asection *s;
s = spu_elf_check_vma (&link_info);
the unwind table index. */
unsigned int list_size = 10;
asection **sec_list = (asection **)
- xmalloc (list_size * sizeof (asection *));
+ xmalloc (list_size * sizeof (asection *));
unsigned int sec_count = 0;
LANG_FOR_EACH_INPUT_STATEMENT (is)
{
list_size *= 2;
sec_list = (asection **)
- xrealloc (sec_list, list_size * sizeof (asection *));
+ xrealloc (sec_list, list_size * sizeof (asection *));
}
sec_list[sec_count++] = sec;
case OPTION_COFF_FORMAT:
if ((*optarg == '0' || *optarg == '1' || *optarg == '2')
- && optarg[1] == '\0')
- {
- static char buf[] = "coffX-${OUTPUT_FORMAT_TEMPLATE}";
- coff_version = *optarg - '0';
- buf[4] = *optarg;
- lang_add_output_format (buf, NULL, NULL, 0);
- }
+ && optarg[1] == '\0')
+ {
+ static char buf[] = "coffX-${OUTPUT_FORMAT_TEMPLATE}";
+ coff_version = *optarg - '0';
+ buf[4] = *optarg;
+ lang_add_output_format (buf, NULL, NULL, 0);
+ }
else
- {
+ {
einfo (_("%P%F: invalid COFF format version %s\n"), optarg);
- }
+ }
break;
}
return FALSE;
static bfd_boolean
gld${EMULATION_NAME}_open_dynamic_archive (const char *arch ATTRIBUTE_UNUSED,
- search_dirs_type *search,
- lang_input_statement_type *entry)
+ search_dirs_type *search,
+ lang_input_statement_type *entry)
{
char *string;
if (elf_hash_table (&link_info)->dynamic_sections_created
&& bed->elf_backend_size_dynamic_sections
&& ! (*bed->elf_backend_size_dynamic_sections) (link_info.output_bfd,
- &link_info))
+ &link_info))
einfo (_("%P%F: failed to set dynamic section sizes: %E\n"));
before_allocation_default ();
( echo "/* Script for ld -r: link without relocation */"
. ${CUSTOMIZER_SCRIPT}
. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
-) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xr
+) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xr
LD_FLAG=u
DATA_ALIGNMENT=${DATA_ALIGNMENT_u}
( echo "/* Script for ld -Ur: link w/out relocation, do create constructors */"
. ${CUSTOMIZER_SCRIPT}
. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
-) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xu
+) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xu
LD_FLAG=
DATA_ALIGNMENT=${DATA_ALIGNMENT_}
( echo "/* Default linker script, for normal executables */"
. ${CUSTOMIZER_SCRIPT}
. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
-) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.x
+) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.x
LD_FLAG=n
DATA_ALIGNMENT=${DATA_ALIGNMENT_n}
( echo "/* Script for -n: mix text and data on same page */"
. ${CUSTOMIZER_SCRIPT}
. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
-) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xn
+) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xn
LD_FLAG=N
DATA_ALIGNMENT=${DATA_ALIGNMENT_N}
( echo "/* Script for -N: mix text and data on same page; don't align data */"
. ${CUSTOMIZER_SCRIPT}
. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
-) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xbn
+) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xbn
if test -n "$GENERATE_COMBRELOC_SCRIPT"; then
DATA_ALIGNMENT=${DATA_ALIGNMENT_c-${DATA_ALIGNMENT_}}
( echo "/* Script for -z combreloc: combine and sort reloc sections */"
. ${CUSTOMIZER_SCRIPT}
. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
- ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xc
+ ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xc
rm -f ${COMBRELOC}
LD_FLAG=w
RELRO_NOW=" "
( echo "/* Script for -z combreloc -z now -z relro: combine and sort reloc sections */"
. ${CUSTOMIZER_SCRIPT}
. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
- ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xw
+ ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xw
rm -f ${COMBRELOC}
COMBRELOC=
unset RELRO_NOW
echo "/* Script for ld --shared: link shared library */"
. ${CUSTOMIZER_SCRIPT}
. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
- ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xs
+ ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xs
if test -n "$GENERATE_COMBRELOC_SCRIPT"; then
LD_FLAG=cshared
DATA_ALIGNMENT=${DATA_ALIGNMENT_sc-${DATA_ALIGNMENT}}
( echo "/* Script for --shared -z combreloc: shared library, combine & sort relocs */"
. ${CUSTOMIZER_SCRIPT}
. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
- ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xsc
+ ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xsc
rm -f ${COMBRELOC}
LD_FLAG=wshared
RELRO_NOW=" "
( echo "/* Script for --shared -z combreloc -z now -z relro: shared library, combine & sort relocs */"
. ${CUSTOMIZER_SCRIPT}
. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
- ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xsw
+ ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xsw
rm -f ${COMBRELOC}
COMBRELOC=
unset RELRO_NOW
echo "/* Script for ld -pie: link position independent executable */"
. ${CUSTOMIZER_SCRIPT}
. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
- ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xd
+ ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xd
if test -n "$GENERATE_COMBRELOC_SCRIPT"; then
LD_FLAG=cpie
DATA_ALIGNMENT=${DATA_ALIGNMENT_sc-${DATA_ALIGNMENT}}
( echo "/* Script for -pie -z combreloc: position independent executable, combine & sort relocs */"
. ${CUSTOMIZER_SCRIPT}
. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
- ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xdc
+ ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xdc
rm -f ${COMBRELOC}
LD_FLAG=wpie
RELRO_NOW=" "
( echo "/* Script for -pie -z combreloc -z now -z relro: position independent executable, combine & sort relocs */"
. ${CUSTOMIZER_SCRIPT}
. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
- ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xdw
+ ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xdw
rm -f ${COMBRELOC}
COMBRELOC=
unset RELRO_NOW
echo "/* Script for ld --enable-auto-import: Like the default script except read only data is placed into .data */"
. ${CUSTOMIZER_SCRIPT}
. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
- ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xa
+ ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xa
fi
case "$COMPILE_IN: $EMULATION_LIBPATH " in
those commands to make use of a compiler based plugin it must first be
copied into the @file{$@{libdir@}/bfd-plugins} directory. All gcc
based linker plugins are backward compatible, so it is sufficient to
-just copy in the newest one.
+just copy in the newest one.
@kindex --push-state
@cindex push state governing input file handling
setting the @code{DF_1_GLOBAUDIT} bit in the @code{DT_FLAGS_1} dynamic
tag. Global auditing requires that any auditing library defined via
the @option{--depaudit} or @option{-P} command line options be run for
-all dynamic objects loaded by the application.
+all dynamic objects loaded by the application.
@item initfirst
This option is only meaningful when building a shared object.
mri_script_lines:
mri_script_lines mri_script_command NEWLINE
- |
+ |
;
mri_script_command:
CHIP exp
| CHIP exp ',' exp
- | NAME {
+ | NAME {
einfo(_("%P%F: unrecognised keyword in MRI style script '%s'\n"),$1);
}
- | LIST {
+ | LIST {
config.map_filename = "-";
}
- | ORDER ordernamelist
- | ENDWORD
- | PUBLIC NAME '=' exp
- { mri_public($2, $4); }
- | PUBLIC NAME ',' exp
- { mri_public($2, $4); }
- | PUBLIC NAME exp
- { mri_public($2, $3); }
- | FORMAT NAME
+ | ORDER ordernamelist
+ | ENDWORD
+ | PUBLIC NAME '=' exp
+ { mri_public($2, $4); }
+ | PUBLIC NAME ',' exp
+ { mri_public($2, $4); }
+ | PUBLIC NAME exp
+ { mri_public($2, $3); }
+ | FORMAT NAME
{ mri_format($2); }
| SECT NAME ',' exp
{ mri_output_section($2, $4);}
{ mri_alignmod($2,$4); }
| ABSOLUTE mri_abs_name_list
| LOAD mri_load_name_list
- | NAMEWORD NAME
+ | NAMEWORD NAME
{ mri_name($2); }
| ALIAS NAME ',' NAME
{ mri_alias($2,$4,0);}
| ALIAS NAME ',' INT
{ mri_alias ($2, 0, (int) $4.integer); }
- | BASE exp
+ | BASE exp
{ mri_base($2); }
| TRUNCATE INT
{ mri_truncate ((unsigned int) $2.integer); }
{ ldlex_popstate (); }
| START NAME
{ lang_add_entry ($2, FALSE); }
- |
+ |
;
ordernamelist:
- ordernamelist ',' NAME { mri_order($3); }
- | ordernamelist NAME { mri_order($2); }
- |
+ ordernamelist ',' NAME { mri_order($3); }
+ | ordernamelist NAME { mri_order($2); }
+ |
;
mri_load_name_list:
;
mri_abs_name_list:
- NAME
- { mri_only_load($1); }
+ NAME
+ { mri_only_load($1); }
| mri_abs_name_list ',' NAME
- { mri_only_load($3); }
+ { mri_only_load($3); }
;
casesymlist:
{ ldlex_both(); }
ifile_list
{ ldlex_popstate(); }
- ;
+ ;
ifile_list:
ifile_list ifile_p1
- |
+ |
;
| floating_point_support
| statement_anywhere
| version
- | ';'
+ | ';'
| TARGET_K '(' NAME ')'
{ lang_add_target($3); }
| SEARCH_DIR '(' filename ')'
{ ldfile_add_library_path ($3, FALSE); }
| OUTPUT '(' filename ')'
{ lang_add_output($3, 1); }
- | OUTPUT_FORMAT '(' NAME ')'
+ | OUTPUT_FORMAT '(' NAME ')'
{ lang_add_output_format ($3, (char *) NULL,
(char *) NULL, 1); }
| OUTPUT_FORMAT '(' NAME ',' NAME ',' NAME ')'
{ lang_add_output_format ($3, $5, $7, 1); }
- | OUTPUT_ARCH '(' NAME ')'
+ | OUTPUT_ARCH '(' NAME ')'
{ ldfile_set_output_arch ($3, bfd_arch_unknown); }
| FORCE_COMMON_ALLOCATION
{ command_line.force_common_definition = TRUE ; }
{ lang_enter_group (); }
'(' input_list ')'
{ lang_leave_group (); }
- | MAP '(' filename ')'
+ | MAP '(' filename ')'
{ lang_add_map($3); }
| INCLUDE filename
{ ldlex_script (); ldfile_open_command_file($2); }
$$.exclude_name_list = NULL;
$$.section_flag_list = NULL;
}
- | EXCLUDE_FILE '(' exclude_name_list ')' wildcard_name
+ | EXCLUDE_FILE '(' exclude_name_list ')' wildcard_name
{
$$.name = $5;
$$.sorted = none;
tmp.section_flag_list = $1;
lang_add_wild (&tmp, NULL, ldgram_had_keep);
}
- | '[' section_name_list ']'
+ | '[' section_name_list ']'
{
lang_add_wild (NULL, $2, ldgram_had_keep);
}
- | sect_flags '[' section_name_list ']'
+ | sect_flags '[' section_name_list ']'
{
struct wildcard_spec tmp;
tmp.name = NULL;
;
statement:
- assignment end
+ assignment end
| CREATE_OBJECT_SYMBOLS
{
- lang_add_attribute(lang_object_symbols_statement_enum);
- }
- | ';'
- | CONSTRUCTORS
+ lang_add_attribute(lang_object_symbols_statement_enum);
+ }
+ | ';'
+ | CONSTRUCTORS
{
lang_add_attribute(lang_constructors_statement_enum);
lang_add_attribute (lang_constructors_statement_enum);
}
| input_section_spec
- | length '(' mustbe_exp ')'
- {
- lang_add_data ((int) $1, $3);
- }
+ | length '(' mustbe_exp ')'
+ {
+ lang_add_data ((int) $1, $3);
+ }
| FILL '(' fill_exp ')'
- {
- lang_add_fill ($3);
- }
+ {
+ lang_add_fill ($3);
+ }
| ASSERT_K {ldlex_expression ();} '(' exp ',' NAME ')' end
{ ldlex_popstate ();
lang_add_assignment (exp_assert ($4, $6)); }
statement_list:
statement_list statement
- | statement
+ | statement
;
statement_list_opt:
{ $$ = $1; }
| LONG
{ $$ = $1; }
- | SHORT
+ | SHORT
{ $$ = $1; }
| BYTE
{ $$ = $1; }
fill_opt:
'=' fill_exp
{ $$ = $2; }
- | { $$ = (fill_type *) 0; }
+ | { $$ = (fill_type *) 0; }
;
assign_op:
{ $$ = '+'; }
| MINUSEQ
{ $$ = '-'; }
- | MULTEQ
+ | MULTEQ
{ $$ = '*'; }
- | DIVEQ
+ | DIVEQ
{ $$ = '/'; }
- | LSHIFTEQ
+ | LSHIFTEQ
{ $$ = LSHIFT; }
- | RSHIFTEQ
+ | RSHIFTEQ
{ $$ = RSHIFT; }
- | ANDEQ
+ | ANDEQ
{ $$ = '&'; }
- | OREQ
+ | OREQ
{ $$ = '|'; }
;
;
-memory_spec: NAME
+memory_spec: NAME
{ region = lang_memory_region_lookup ($1, TRUE); }
attributes_opt ':'
origin_spec opt_comma length_spec
;
length_spec:
- LENGTH '=' mustbe_exp
+ LENGTH '=' mustbe_exp
{
region->length_exp = $3;
}
{ $$ = exp_binop (NE , $1, $3); }
| exp LE exp
{ $$ = exp_binop (LE , $1, $3); }
- | exp GE exp
+ | exp GE exp
{ $$ = exp_binop (GE , $1, $3); }
| exp '<' exp
{ $$ = exp_binop ('<' , $1, $3); }
{ $$ = exp_nameop (DEFINED, $3); }
| INT
{ $$ = exp_bigintop ($1.integer, $1.str); }
- | SIZEOF_HEADERS
+ | SIZEOF_HEADERS
{ $$ = exp_nameop (SIZEOF_HEADERS,0); }
| ALIGNOF '(' NAME ')'
{ $$ = exp_binop (DATA_SEGMENT_RELRO_END, $5, $3); }
| DATA_SEGMENT_END '(' exp ')'
{ $$ = exp_unop (DATA_SEGMENT_END, $3); }
- | SEGMENT_START '(' NAME ',' exp ')'
- { /* The operands to the expression node are
+ | SEGMENT_START '(' NAME ',' exp ')'
+ { /* The operands to the expression node are
placed in the opposite order from the way
in which they appear in the script as
that allows us to reuse more code in
memspec_at_opt:
- AT '>' NAME { $$ = $3; }
- | { $$ = 0; }
- ;
+ AT '>' NAME { $$ = $3; }
+ | { $$ = 0; }
+ ;
opt_at:
AT '(' exp ')' { $$ = $3; }
| { $$ = 0; }
;
-section: NAME { ldlex_expression(); }
+section: NAME { ldlex_expression(); }
opt_exp_with_type
opt_at
opt_align
$5, $7, $4, $9, $6);
}
statement_list_opt
- '}' { ldlex_popstate (); ldlex_expression (); }
+ '}' { ldlex_popstate (); ldlex_expression (); }
memspec_opt memspec_at_opt phdr_opt fill_opt
{
ldlex_popstate ();
;
atype:
- '(' type ')'
- | /* EMPTY */ { sectype = normal_section; }
- | '(' ')' { sectype = normal_section; }
+ '(' type ')'
+ | /* EMPTY */ { sectype = normal_section; }
+ | '(' ')' { sectype = normal_section; }
;
opt_exp_with_type:
{
$$ = lang_new_vers_pattern (NULL, $1, ldgram_vers_current_lang, FALSE);
}
- | NAME
+ | NAME
{
$$ = lang_new_vers_pattern (NULL, $1, ldgram_vers_current_lang, TRUE);
}
static bfd_boolean
walk_wild_file_in_exclude_list (struct name_list *exclude_list,
- lang_input_statement_type *file)
+ lang_input_statement_type *file)
{
struct name_list *list_tmp;
if ((flags & (SEC_LINK_ONCE | SEC_GROUP)) == (SEC_LINK_ONCE | SEC_GROUP))
{
if (link_info.resolve_section_groups)
- flags &= ~(SEC_LINK_ONCE | SEC_LINK_DUPLICATES | SEC_RELOC);
+ flags &= ~(SEC_LINK_ONCE | SEC_LINK_DUPLICATES | SEC_RELOC);
else
- flags &= ~(SEC_LINK_DUPLICATES | SEC_RELOC);
+ flags &= ~(SEC_LINK_DUPLICATES | SEC_RELOC);
}
else if (!bfd_link_relocatable (&link_info))
flags &= ~(SEC_LINK_ONCE | SEC_LINK_DUPLICATES | SEC_RELOC);
name_list *tmp;
minfo ("EXCLUDE_FILE(%s", w->exclude_name_list->name);
for (tmp = w->exclude_name_list->next; tmp; tmp = tmp->next)
- minfo (" %s", tmp->name);
+ minfo (" %s", tmp->name);
minfo (") ");
}
int closing_paren = 0;
switch (sec->spec.sorted)
- {
- case none:
- break;
-
- case by_name:
- minfo ("SORT_BY_NAME(");
- closing_paren = 1;
- break;
-
- case by_alignment:
- minfo ("SORT_BY_ALIGNMENT(");
- closing_paren = 1;
- break;
-
- case by_name_alignment:
- minfo ("SORT_BY_NAME(SORT_BY_ALIGNMENT(");
- closing_paren = 2;
- break;
-
- case by_alignment_name:
- minfo ("SORT_BY_ALIGNMENT(SORT_BY_NAME(");
- closing_paren = 2;
- break;
-
- case by_none:
- minfo ("SORT_NONE(");
- closing_paren = 1;
- break;
-
- case by_init_priority:
- minfo ("SORT_BY_INIT_PRIORITY(");
- closing_paren = 1;
- break;
- }
+ {
+ case none:
+ break;
+
+ case by_name:
+ minfo ("SORT_BY_NAME(");
+ closing_paren = 1;
+ break;
+
+ case by_alignment:
+ minfo ("SORT_BY_ALIGNMENT(");
+ closing_paren = 1;
+ break;
+
+ case by_name_alignment:
+ minfo ("SORT_BY_NAME(SORT_BY_ALIGNMENT(");
+ closing_paren = 2;
+ break;
+
+ case by_alignment_name:
+ minfo ("SORT_BY_ALIGNMENT(SORT_BY_NAME(");
+ closing_paren = 2;
+ break;
+
+ case by_none:
+ minfo ("SORT_NONE(");
+ closing_paren = 1;
+ break;
+
+ case by_init_priority:
+ minfo ("SORT_BY_INIT_PRIORITY(");
+ closing_paren = 1;
+ break;
+ }
if (sec->spec.exclude_name_list != NULL)
{
else
minfo ("*");
for (;closing_paren > 0; closing_paren--)
- minfo (")");
+ minfo (")");
if (sec->next)
minfo (" ");
}
INPUTLIST definitely in a script, a filename-list
BOTH either EXPRESSION or SCRIPT
DEFSYMEXP in an argument to -defsym
- MRI in an MRI script
+ MRI in an MRI script
VERS_START starting a Sun style mapfile
VERS_SCRIPT a Sun style mapfile
VERS_NODE a node within a Sun style mapfile
<BOTH,SCRIPT,EXPRESSION,VERS_START,VERS_NODE,VERS_SCRIPT,INPUTLIST>"/*" { comment (); }
-<DEFSYMEXP>"-" { RTOKEN('-');}
-<DEFSYMEXP>"+" { RTOKEN('+');}
+<DEFSYMEXP>"-" { RTOKEN('-');}
+<DEFSYMEXP>"+" { RTOKEN('+');}
<DEFSYMEXP>{SYMBOLNAMECHAR1}{SYMBOLCHARN}* { yylval.name = xstrdup (yytext); return NAME; }
-<DEFSYMEXP>"=" { RTOKEN('='); }
+<DEFSYMEXP>"=" { RTOKEN('='); }
<MRI,EXPRESSION>"$"([0-9A-Fa-f])+ {
- yylval.integer = bfd_scan_vma (yytext + 1, 0, 16);
+ yylval.integer = bfd_scan_vma (yytext + 1, 0, 16);
yylval.bigint.str = NULL;
return INT;
}
<BOTH,SCRIPT,EXPRESSION,MRI>"/" { RTOKEN('/');}
<BOTH,SCRIPT,EXPRESSION,MRI>"%" { RTOKEN('%');}
<BOTH,SCRIPT,EXPRESSION,MRI>"<" { RTOKEN('<');}
-<BOTH,SCRIPT,EXPRESSION,MRI>"=" { RTOKEN('=');}
+<BOTH,SCRIPT,EXPRESSION,MRI>"=" { RTOKEN('=');}
<BOTH,SCRIPT,EXPRESSION,MRI>"}" { RTOKEN('}') ; }
<BOTH,SCRIPT,EXPRESSION,MRI>"{" { RTOKEN('{'); }
<BOTH,SCRIPT,EXPRESSION,MRI,INPUTLIST>")" { RTOKEN(')');}
<EXPRESSION,BOTH,SCRIPT>"EXCLUDE_FILE" { RTOKEN(EXCLUDE_FILE); }
<EXPRESSION,BOTH,SCRIPT>"CONSTANT" { RTOKEN(CONSTANT);}
<MRI>"#".*\n? { ++ lineno; }
-<MRI>"\n" { ++ lineno; RTOKEN(NEWLINE); }
+<MRI>"\n" { ++ lineno; RTOKEN(NEWLINE); }
<MRI>"*".* { /* Mri comment line */ }
<MRI>";".* { /* Mri comment line */ }
-<MRI>"END" { RTOKEN(ENDWORD); }
+<MRI>"END" { RTOKEN(ENDWORD); }
<MRI>"ALIGNMOD" { RTOKEN(ALIGNMOD);}
<MRI>"ALIGN" { RTOKEN(ALIGN_K);}
-<MRI>"CHIP" { RTOKEN(CHIP); }
-<MRI>"BASE" { RTOKEN(BASE); }
-<MRI>"ALIAS" { RTOKEN(ALIAS); }
-<MRI>"TRUNCATE" { RTOKEN(TRUNCATE); }
-<MRI>"LOAD" { RTOKEN(LOAD); }
-<MRI>"PUBLIC" { RTOKEN(PUBLIC); }
-<MRI>"ORDER" { RTOKEN(ORDER); }
-<MRI>"NAME" { RTOKEN(NAMEWORD); }
-<MRI>"FORMAT" { RTOKEN(FORMAT); }
-<MRI>"CASE" { RTOKEN(CASE); }
-<MRI>"START" { RTOKEN(START); }
-<MRI>"LIST".* { RTOKEN(LIST); /* LIST and ignore to end of line */ }
+<MRI>"CHIP" { RTOKEN(CHIP); }
+<MRI>"BASE" { RTOKEN(BASE); }
+<MRI>"ALIAS" { RTOKEN(ALIAS); }
+<MRI>"TRUNCATE" { RTOKEN(TRUNCATE); }
+<MRI>"LOAD" { RTOKEN(LOAD); }
+<MRI>"PUBLIC" { RTOKEN(PUBLIC); }
+<MRI>"ORDER" { RTOKEN(ORDER); }
+<MRI>"NAME" { RTOKEN(NAMEWORD); }
+<MRI>"FORMAT" { RTOKEN(FORMAT); }
+<MRI>"CASE" { RTOKEN(CASE); }
+<MRI>"START" { RTOKEN(START); }
+<MRI>"LIST".* { RTOKEN(LIST); /* LIST and ignore to end of line */ }
<MRI>"SECT" { RTOKEN(SECT); }
<EXPRESSION,BOTH,SCRIPT,MRI>"ABSOLUTE" { RTOKEN(ABSOLUTE); }
-<MRI>"end" { RTOKEN(ENDWORD); }
+<MRI>"end" { RTOKEN(ENDWORD); }
<MRI>"alignmod" { RTOKEN(ALIGNMOD);}
<MRI>"align" { RTOKEN(ALIGN_K);}
-<MRI>"chip" { RTOKEN(CHIP); }
-<MRI>"base" { RTOKEN(BASE); }
-<MRI>"alias" { RTOKEN(ALIAS); }
-<MRI>"truncate" { RTOKEN(TRUNCATE); }
-<MRI>"load" { RTOKEN(LOAD); }
-<MRI>"public" { RTOKEN(PUBLIC); }
-<MRI>"order" { RTOKEN(ORDER); }
-<MRI>"name" { RTOKEN(NAMEWORD); }
-<MRI>"format" { RTOKEN(FORMAT); }
-<MRI>"case" { RTOKEN(CASE); }
-<MRI>"extern" { RTOKEN(EXTERN); }
-<MRI>"start" { RTOKEN(START); }
-<MRI>"list".* { RTOKEN(LIST); /* LIST and ignore to end of line */ }
+<MRI>"chip" { RTOKEN(CHIP); }
+<MRI>"base" { RTOKEN(BASE); }
+<MRI>"alias" { RTOKEN(ALIAS); }
+<MRI>"truncate" { RTOKEN(TRUNCATE); }
+<MRI>"load" { RTOKEN(LOAD); }
+<MRI>"public" { RTOKEN(PUBLIC); }
+<MRI>"order" { RTOKEN(ORDER); }
+<MRI>"name" { RTOKEN(NAMEWORD); }
+<MRI>"format" { RTOKEN(FORMAT); }
+<MRI>"case" { RTOKEN(CASE); }
+<MRI>"extern" { RTOKEN(EXTERN); }
+<MRI>"start" { RTOKEN(START); }
+<MRI>"list".* { RTOKEN(LIST); /* LIST and ignore to end of line */ }
<MRI>"sect" { RTOKEN(SECT); }
<EXPRESSION,BOTH,SCRIPT,MRI>"absolute" { RTOKEN(ABSOLUTE); }
<VERS_START,VERS_NODE,VERS_SCRIPT>#.* { /* Eat up comments */ }
-<VERS_START,VERS_NODE,VERS_SCRIPT,INPUTLIST>[ \t\r]+ { /* Eat up whitespace */ }
+<VERS_START,VERS_NODE,VERS_SCRIPT,INPUTLIST>[ \t\r]+ { /* Eat up whitespace */ }
<<EOF>> {
include_stack_ptr--;
case 'd':
command_line.force_common_definition = TRUE;
break;
- case OPTION_FORCE_GROUP_ALLOCATION:
- command_line.force_group_allocation = TRUE;
- break;
+ case OPTION_FORCE_GROUP_ALLOCATION:
+ command_line.force_group_allocation = TRUE;
+ break;
case OPTION_DEFSYM:
lex_string = optarg;
lex_redirect (optarg, "--defsym", ++defsym_count);
if (command_line.auxiliary_filters == NULL)
{
command_line.auxiliary_filters = (char **)
- xmalloc (2 * sizeof (char *));
+ xmalloc (2 * sizeof (char *));
command_line.auxiliary_filters[0] = optarg;
command_line.auxiliary_filters[1] = NULL;
}
for (p = command_line.auxiliary_filters; *p != NULL; p++)
++c;
command_line.auxiliary_filters = (char **)
- xrealloc (command_line.auxiliary_filters,
- (c + 2) * sizeof (char *));
+ xrealloc (command_line.auxiliary_filters,
+ (c + 2) * sizeof (char *));
command_line.auxiliary_filters[c] = optarg;
command_line.auxiliary_filters[c + 1] = NULL;
}
link_info.unresolved_syms_in_shared_libs
= how_to_report_unresolved_symbols;
}
- else if (strcmp (optarg, "ignore-in-shared-libs") == 0)
+ else if (strcmp (optarg, "ignore-in-shared-libs") == 0)
{
link_info.unresolved_syms_in_objects
= how_to_report_unresolved_symbols;
char *buf;
buf = (char *) xmalloc (strlen (command_line.rpath_link)
- + strlen (optarg)
- + 2);
+ + strlen (optarg)
+ + 2);
sprintf (buf, "%s%c%s", command_line.rpath_link,
config.rpath_separator, optarg);
free (command_line.rpath_link);
case OPTION_SORT_COMMON:
if (optarg == NULL
|| strcmp (optarg, N_("descending")) == 0)
- config.sort_common = sort_descending;
- else if (strcmp (optarg, N_("ascending")) == 0)
+ config.sort_common = sort_descending;
+ else if (strcmp (optarg, N_("ascending")) == 0)
config.sort_common = sort_ascending;
else
einfo (_("%P%F: invalid common section sorting option: %s\n"),
case 'u':
ldlang_add_undef (optarg, TRUE);
break;
- case OPTION_REQUIRE_DEFINED_SYMBOL:
- ldlang_add_require_defined (optarg);
+ case OPTION_REQUIRE_DEFINED_SYMBOL:
+ ldlang_add_require_defined (optarg);
break;
case OPTION_UNIQUE:
if (optarg != NULL)
config.hash_table_size = 1021;
break;
- case OPTION_HASH_SIZE:
+ case OPTION_HASH_SIZE:
{
bfd_size_type new_size;
- new_size = strtoul (optarg, NULL, 0);
- if (new_size)
- config.hash_table_size = new_size;
- else
- einfo (_("%P%X: --hash-size needs a numeric argument\n"));
- }
- break;
+ new_size = strtoul (optarg, NULL, 0);
+ if (new_size)
+ config.hash_table_size = new_size;
+ else
+ einfo (_("%P%X: --hash-size needs a numeric argument\n"));
+ }
+ break;
case OPTION_PUSH_STATE:
input_flags.pushed = xmemdup (&input_flags,
/* Return false if n is in the d->exports table. */
if (bsearch (&key, d->exports, d->num_exports,
- sizeof (pe_def_file->exports[0]), pe_export_sort))
+ sizeof (pe_def_file->exports[0]), pe_export_sort))
return 0;
if (pe_dll_do_default_excludes)
{
struct coff_link_hash_entry *sym_hash;
sym_hash = coff_link_hash_lookup (coff_hash_table (info),
- ac->symbol_name, FALSE, FALSE, FALSE);
+ ac->symbol_name, FALSE, FALSE, FALSE);
if (sym_hash && sym_hash->root.type == bfd_link_hash_common
- && sym_hash->root.u.c.p->alignment_power < (unsigned) ac->alignment)
+ && sym_hash->root.u.c.p->alignment_power < (unsigned) ac->alignment)
{
sym_hash->root.u.c.p->alignment_power = (unsigned) ac->alignment;
}
&& ((symbols[j]->flags & BSF_GLOBAL)
|| (symbols[j]->flags == 0)));
if (link_info.version_info && would_export)
- would_export
- = !bfd_hide_sym_by_version (link_info.version_info,
- symbols[j]->name);
+ would_export
+ = !bfd_hide_sym_by_version (link_info.version_info,
+ symbols[j]->name);
if (would_export)
{
const char *sn = symbols[j]->name;
{
char *name;
if (is_import (sn))
- continue;
+ continue;
name = xmalloc (strlen ("__imp_") + strlen (sn) + 1);
sprintf (name, "%s%s", "__imp_", sn);
NULL, &is_dup);
/* Fill data flag properly, from dlltool.c. */
if (!is_dup)
- p->flag_data = !(symbols[j]->flags & BSF_FUNCTION);
+ p->flag_data = !(symbols[j]->flags & BSF_FUNCTION);
}
}
}
char *tmp_at = strrchr (tmp, '@');
if (tmp_at)
- *tmp_at = 0;
+ *tmp_at = 0;
else
- einfo (_("%P%X: Cannot export %s: invalid export name\n"),
+ einfo (_("%P%X: Cannot export %s: invalid export name\n"),
pe_def_file->exports[i].name);
pe_def_file->exports[i].name = tmp;
- resort_needed = TRUE;
+ resort_needed = TRUE;
}
}
}
by removing leading @. */
if (resort_needed)
qsort (pe_def_file->exports, NE, sizeof (pe_def_file->exports[0]),
- pe_export_sort);
+ pe_export_sort);
if (pe_dll_stdcall_aliases)
{
pe_def_file->exports[i].internal_name,
-1, NULL, &is_dup);
if (is_dup)
- free (tmp);
+ free (tmp);
}
}
}
}
}
/* Check for forward exports. These are indicated in DEF files by an
- export directive of the form NAME1 = MODULE-NAME.EXTERNAL-NAME
+ export directive of the form NAME1 = MODULE-NAME.EXTERNAL-NAME
but we must take care not to be fooled when the user wants to export
a symbol that actually really has a dot in it, so we only check
for them here, after real defined symbols have already been matched. */
/* Now we need to assign ordinals to those that don't have them. */
for (i = 0; i < NE; i++)
{
- if (exported_symbol_sections[i] ||
- pe_def_file->exports[i].flag_forward)
+ if (exported_symbol_sections[i]
+ || pe_def_file->exports[i].flag_forward)
{
if (pe_def_file->exports[i].ordinal != -1)
{
next_ordinal = min_ordinal;
for (i = 0; i < NE; i++)
- if ((exported_symbol_sections[i] ||
- pe_def_file->exports[i].flag_forward) &&
- pe_def_file->exports[i].ordinal == -1)
+ if ((exported_symbol_sections[i]
+ || pe_def_file->exports[i].flag_forward)
+ && pe_def_file->exports[i].ordinal == -1)
{
while (exported_symbols[next_ordinal - min_ordinal] != -1)
next_ordinal++;
name = xmalloc (strlen (pe_def_file->exports[i].internal_name) + 2);
if (pe_details->underscored
- && *pe_def_file->exports[i].internal_name != '@')
+ && *pe_def_file->exports[i].internal_name != '@')
{
*name = '_';
strcpy (name + 1, pe_def_file->exports[i].internal_name);
Scan alphabetically - ie the ordering in the exports[] table,
rather than by ordinal - the ordering in the exported_symbol[]
table. See dlltool.c and:
- http://sources.redhat.com/ml/binutils/2003-04/msg00379.html
+ http://sources.redhat.com/ml/binutils/2003-04/msg00379.html
for more information. */
hint = 0;
for (s = 0; s < NE; s++)
{
struct bfd_section *ssec = exported_symbol_sections[s];
- if (pe_def_file->exports[s].ordinal != -1 &&
- (pe_def_file->exports[s].flag_forward || ssec != NULL))
+ if (pe_def_file->exports[s].ordinal != -1
+ && (pe_def_file->exports[s].flag_forward || ssec != NULL))
{
int ord = pe_def_file->exports[s].ordinal;
if (pe_def_file->exports[s].flag_forward)
{
bfd_put_32 (abfd, ERVA (enamestr),
- eaddresses + 4 * (ord - min_ordinal));
+ eaddresses + 4 * (ord - min_ordinal));
strcpy (enamestr, pe_def_file->exports[s].internal_name);
enamestr += strlen (pe_def_file->exports[s].internal_name) + 1;
+ ssec->output_offset);
bfd_put_32 (abfd, srva - image_base,
- eaddresses + 4 * (ord - min_ordinal));
+ eaddresses + 4 * (ord - min_ordinal));
}
if (!pe_def_file->exports[s].flag_noname)
}
/* .section .idata$2
- .global __head_my_dll
+ .global __head_my_dll
__head_my_dll:
- .rva hname
- .long 0
- .long 0
- .rva __my_dll_iname
- .rva fthunk
-
- .section .idata$5
- .long 0
+ .rva hname
+ .long 0
+ .long 0
+ .rva __my_dll_iname
+ .rva fthunk
+
+ .section .idata$5
+ .long 0
fthunk:
- .section .idata$4
- .long 0
+ .section .idata$4
+ .long 0
hname: */
static bfd *
}
/* .section .idata$4
- .long 0
+ .long 0
[.long 0] for PE+
- .section .idata$5
- .long 0
+ .section .idata$5
+ .long 0
[.long 0] for PE+
- .section idata$7
- .global __my_dll_iname
+ .section idata$7
+ .global __my_dll_iname
__my_dll_iname:
- .asciz "my.dll" */
+ .asciz "my.dll" */
static bfd *
make_tail (bfd *parent)
}
/* .text
- .global _function
- .global ___imp_function
- .global __imp__function
+ .global _function
+ .global ___imp_function
+ .global __imp__function
_function:
- jmp *__imp__function:
+ jmp *__imp__function:
- .section idata$7
- .long __head_my_dll
+ .section idata$7
+ .long __head_my_dll
- .section .idata$5
+ .section .idata$5
___imp_function:
__imp__function:
iat?
- .section .idata$4
+ .section .idata$4
iat?
- .section .idata$6
+ .section .idata$6
ID<ordinal>:
- .short <hint>
- .asciz "function" xlate? (add underscore, kill at) */
+ .short <hint>
+ .asciz "function" xlate? (add underscore, kill at) */
static const unsigned char jmp_ix86_bytes[] =
{
};
/* _function:
- mov.l ip+8,r0
- mov.l @r0,r0
- jmp @r0
- nop
- .dw __imp_function */
+ mov.l ip+8,r0
+ mov.l @r0,r0
+ jmp @r0
+ nop
+ .dw __imp_function */
static const unsigned char jmp_sh_bytes[] =
{
};
/* _function:
- lui $t0,<high:__imp_function>
- lw $t0,<low:__imp_function>
- jr $t0
- nop */
+ lui $t0,<high:__imp_function>
+ lw $t0,<low:__imp_function>
+ jr $t0
+ nop */
static const unsigned char jmp_mips_bytes[] =
{
/* Mark this object as SAFESEH compatible. */
quick_symbol (abfd, "", "@feat.00", "", bfd_abs_section_ptr,
BSF_LOCAL, 1);
- quick_reloc (abfd, 2, BFD_RELOC_32, 2);
+ quick_reloc (abfd, 2, BFD_RELOC_32, 2);
#endif
break;
case PE_ARCH_sh:
quick_reloc (abfd, 4, BFD_RELOC_LO16, 2);
break;
case PE_ARCH_arm:
- case PE_ARCH_arm_epoc:
- case PE_ARCH_arm_wince:
+ case PE_ARCH_arm_epoc:
+ case PE_ARCH_arm_wince:
quick_reloc (abfd, 8, BFD_RELOC_32, 2);
break;
default:
}
/* .section .idata$2
- .rva __nm_thnk_SYM (singleton thunk with name of func)
- .long 0
- .long 0
- .rva __my_dll_iname (name of dll)
- .rva __fuNN_SYM (pointer to reference (address) in text) */
+ .rva __nm_thnk_SYM (singleton thunk with name of func)
+ .long 0
+ .long 0
+ .rva __my_dll_iname (name of dll)
+ .rva __fuNN_SYM (pointer to reference (address) in text) */
static bfd *
make_import_fixup_entry (const char *name,
}
/* .section .rdata_runtime_pseudo_reloc
- .long addend
- .rva __fuNN_SYM (pointer to reference (address) in text) */
+ .long addend
+ .rva __fuNN_SYM (pointer to reference (address) in text) */
static bfd *
make_runtime_pseudo_reloc (const char *name ATTRIBUTE_UNUSED,
}
/* .section .rdata
- .rva __pei386_runtime_relocator */
+ .rva __pei386_runtime_relocator */
static bfd *
pe_create_runtime_relocator_reference (bfd *parent)
add_bfd_to_link (b, b->filename, &link_info);
/* If we ever use autoimport, we have to cast text section writable.
- But not for version 2. */
+ But not for version 2. */
if (link_info.pei386_runtime_pseudo_reloc != 2)
- {
- config.text_read_only = FALSE;
- link_info.output_bfd->flags &= ~WP_TEXT;
- }
+ {
+ config.text_read_only = FALSE;
+ link_info.output_bfd->flags &= ~WP_TEXT;
+ }
if (link_info.pei386_runtime_pseudo_reloc == 2)
- {
+ {
b = make_singleton_name_imp (name, link_info.output_bfd);
- add_bfd_to_link (b, b->filename, &link_info);
+ add_bfd_to_link (b, b->filename, &link_info);
}
}
add_bfd_to_link (b, b->filename, &link_info);
}
- if ((link_info.pei386_runtime_pseudo_reloc != 0 && addend != 0)
- || link_info.pei386_runtime_pseudo_reloc == 2)
- {
- if (pe_dll_extra_pe_debug)
- printf ("creating runtime pseudo-reloc entry for %s (addend=%d)\n",
- fixup_name, (int) addend);
+ if ((link_info.pei386_runtime_pseudo_reloc != 0 && addend != 0)
+ || link_info.pei386_runtime_pseudo_reloc == 2)
+ {
+ if (pe_dll_extra_pe_debug)
+ printf ("creating runtime pseudo-reloc entry for %s (addend=%d)\n",
+ fixup_name, (int) addend);
- b = make_runtime_pseudo_reloc (name, fixup_name, addend, rel->howto->bitsize,
- link_info.output_bfd);
- add_bfd_to_link (b, b->filename, &link_info);
+ b = make_runtime_pseudo_reloc (name, fixup_name, addend, rel->howto->bitsize,
+ link_info.output_bfd);
+ add_bfd_to_link (b, b->filename, &link_info);
- if (runtime_pseudo_relocs_created == 0)
- {
- b = pe_create_runtime_relocator_reference (link_info.output_bfd);
- add_bfd_to_link (b, b->filename, &link_info);
- }
- runtime_pseudo_relocs_created++;
- }
- else if (addend != 0)
- einfo (_("%P%X%C: variable '%T' can't be auto-imported. Please read the documentation for ld's --enable-auto-import for details.\n"),
- s->owner, s, rel->address, sym->name);
+ if (runtime_pseudo_relocs_created == 0)
+ {
+ b = pe_create_runtime_relocator_reference (link_info.output_bfd);
+ add_bfd_to_link (b, b->filename, &link_info);
+ }
+ runtime_pseudo_relocs_created++;
+ }
+ else if (addend != 0)
+ einfo (_("%P%X%C: variable '%T' can't be auto-imported. Please read the documentation for ld's --enable-auto-import for details.\n"),
+ s->owner, s, rel->address, sym->name);
}
found = (filename_cmp (ex->string, ibfd->filename) == 0);
}
/* If it matched, we must open a fresh BFD for it (the original
- input BFD is still needed for the DLL's final link) and add
- it into the archive member chain. */
+ input BFD is still needed for the DLL's final link) and add
+ it into the archive member chain. */
if (found)
{
bfd *newbfd = bfd_openr (ibfd->my_archive
{
h = bfd_link_hash_lookup (linfo->hash, kv->oname, FALSE, FALSE, FALSE);
if (h->type == bfd_link_hash_undefined)
- goto return_h;
+ goto return_h;
}
if (lname[0] == '?')
if (at || lname[0] == '@')
{
if (lname[0] == '@')
- {
+ {
if (pe_details->underscored)
lname[0] = '_';
else
}
}
if (at)
- *strchr (lname, '@') = 0;
+ *strchr (lname, '@') = 0;
key.key = lname;
kv = bsearch (&key, udef_table, undef_count,
sizeof (struct key_value), undef_sort_cmp);
{
h = bfd_link_hash_lookup (linfo->hash, kv->oname, FALSE, FALSE, FALSE);
if (h->type == bfd_link_hash_undefined)
- goto return_h;
+ goto return_h;
}
return_NULL:
static bfd_boolean
pe_undef_count (struct bfd_link_hash_entry *h ATTRIBUTE_UNUSED,
- void *inf ATTRIBUTE_UNUSED)
+ void *inf ATTRIBUTE_UNUSED)
{
if (h->type == bfd_link_hash_undefined)
undef_count++;
at = strchr (udef_table[undef_count].key
+ (udef_table[undef_count].key[0] == '@'), '@');
if (at)
- at[1] = 0;
+ at[1] = 0;
udef_table[undef_count].oname = h->root.string;
undef_count++;
}
for (i = 0; i < pe_def_file->num_imports && imp[i].module != module; i++)
;
if (i >= pe_def_file->num_imports)
- continue;
+ continue;
dll_filename = module->name;
dll_symname = xstrdup (module->name);
blhe = bfd_link_hash_lookup (linfo->hash, name,
FALSE, FALSE, FALSE);
if (blhe)
- is_undef = (blhe->type == bfd_link_hash_undefined);
+ is_undef = (blhe->type == bfd_link_hash_undefined);
}
else
{
blhe = pe_find_cdecl_alias_match (linfo, name);
include_jmp_stub = TRUE;
if (blhe)
- is_undef = (blhe->type == bfd_link_hash_undefined);
+ is_undef = (blhe->type == bfd_link_hash_undefined);
}
free (name);
/* Skip unwanted symbols, which are
exported in buggy auto-import releases. */
if (! CONST_STRNEQ (erva + name_rva, "__nm_"))
- {
+ {
int is_dup = 0;
- /* is_data is true if the address is in the data, rdata or bss
+ /* is_data is true if the address is in the data, rdata or bss
segment. */
- is_data =
+ is_data =
(func_rva >= data_start && func_rva < data_end)
|| (func_rva >= rdata_start && func_rva < rdata_end)
|| (func_rva >= bss_start && func_rva < bss_end);
imp = def_file_add_import (pe_def_file, erva + name_rva,
dllname, i, NULL, NULL, &is_dup);
- /* Mark symbol type. */
- if (!is_dup)
- imp->data = is_data;
+ /* Mark symbol type. */
+ if (!is_dup)
+ imp->data = is_data;
- if (pe_dll_extra_pe_debug)
+ if (pe_dll_extra_pe_debug)
printf ("%s dll-name: %s sym: %s addr: 0x%lx %s\n",
__FUNCTION__, dllname, erva + name_rva,
(unsigned long) func_rva, is_data ? "(data)" : "");
- }
+ }
}
return TRUE;
pe_bfd_is_dll (bfd *abfd)
{
return (bfd_get_format (abfd) == bfd_object
- && obj_pe (abfd)
- && pe_data (abfd)->dll);
+ && obj_pe (abfd)
+ && pe_data (abfd)->dll);
}
if (!onloadfn)
onloadfn = (ld_plugin_onload) dlsym (curplug->dlhandle, "_onload");
if (!onloadfn)
- einfo (_("%P%F: %s: error loading plugin: %s\n"),
+ einfo (_("%P%F: %s: error loading plugin: %s\n"),
curplug->name, dlerror ());
set_tv_plugin_args (curplug, &my_tv[tv_header_size]);
called_plugin = curplug;
posrcprefix="../"; \
fi; \
rm -f $@-t $@ \
- && (sed -e '/^#/d' -e '/^[ ]*$$/d' \
+ && (sed -e '/^#/d' -e '/^[ ]*$$/d' \
-e "s@.*@ $$posrcprefix& \\\\@" < $(srcdir)/$@.in \
| sed -e '$$s/\\$$//') > $@-t \
&& chmod a-w $@-t \
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
# specified by the -H option.
#
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
.loader : {
*(.loader)
}
-
+
.debug : {
*(.debug)
}
# defaults are appropriate for an Alpha running OSF/1.
#
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
# Tristan Gingold <gingold@adacore.com>.
#
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
# INPUT_FILES - INPUT command of files to always include
# WRITABLE_RODATA - if set, the .rodata section should be writable
# INIT_START, INIT_END - statements just before and just after
-# combination of .init sections.
+# combination of .init sections.
# FINI_START, FINI_END - statements just before and just after
-# combination of .fini sections.
+# combination of .fini sections.
# STACK_ADDR - start of a .stack section.
# OTHER_SYMBOLS - symbols to place right at the end of the script.
# ETEXT_NAME - name of a symbol for the end of the text section,
.rel.dyn ${RELOCATING-0} :
{
EOF
-sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rela\./d;/__rela_iplt_/d;s/^.*: { *\(.*\)}$/ \1/' $COMBRELOC >> ldscripts/dyntmp.$$
+sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rela\./d;/__rela_iplt_/d;s/^.*: { *\(.*\)}$/ \1/' $COMBRELOC >> ldscripts/dyntmp.$$
cat >> ldscripts/dyntmp.$$ <<EOF
}
.rela.dyn ${RELOCATING-0} :
{
EOF
-sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rel\./d;/__rel_iplt_/d;s/^.*: { *\(.*\)}/ \1/' $COMBRELOC >> ldscripts/dyntmp.$$
+sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rel\./d;/__rel_iplt_/d;s/^.*: { *\(.*\)}/ \1/' $COMBRELOC >> ldscripts/dyntmp.$$
cat >> ldscripts/dyntmp.$$ <<EOF
}
EOF
cat ldscripts/dyntmp.$$
else
if test -z "${NO_REL_RELOCS}"; then
- sed -e '/^[ ]*\.rela\.[^}]*$/,/}/d;/^[ ]*\.rela\./d;/__rela_iplt_/d' ldscripts/dyntmp.$$
+ sed -e '/^[ ]*\.rela\.[^}]*$/,/}/d;/^[ ]*\.rela\./d;/__rela_iplt_/d' ldscripts/dyntmp.$$
fi
if test -z "${NO_RELA_RELOCS}"; then
- sed -e '/^[ ]*\.rel\.[^}]*$/,/}/d;/^[ ]*\.rel\./d;/__rel_iplt_/d' ldscripts/dyntmp.$$
+ sed -e '/^[ ]*\.rel\.[^}]*$/,/}/d;/^[ ]*\.rel\./d;/__rel_iplt_/d' ldscripts/dyntmp.$$
fi
fi
rm -f ldscripts/dyntmp.$$
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
# that apply; only BPABI-specific variables will be noted here.
#
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
SDATA="/* We want the small data sections together, so single-instruction offsets
can access them all, and initialized data all before uninitialized, so
we can shorten the on-disk segment size. */
- .sdata ${RELOCATING-0} :
+ .sdata ${RELOCATING-0} :
{
${RELOCATING+${SDATA_START_SYMBOLS}}
*(.sdata${RELOCATING+ .sdata.* .gnu.linkonce.s.*})
KEEP (*(.fini_array))
${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (__fini_array_end = .);}}
}"
-CTOR=".ctors ${CONSTRUCTING-0} :
+CTOR=".ctors ${CONSTRUCTING-0} :
{
${CONSTRUCTING+${CTOR_START}}
/* gcc uses crtbegin.o to find the start of
at non-zero addresses. Could be a Solaris ld bug, could be a GNU ld
bug. But for now assigning the zero vmas works. */}
-/* ARM's proprietary toolchain generate these symbols to match the start
+/* ARM's proprietary toolchain generate these symbols to match the start
and end of particular sections of the image. SymbianOS uses these
- symbols. We provide them for compatibility with ARM's toolchains.
- These symbols should be bound locally; each shared object may define
- its own version of these symbols. */
-
+ symbols. We provide them for compatibility with ARM's toolchains.
+ These symbols should be bound locally; each shared object may define
+ its own version of these symbols. */
+
VERSION
-{
+{
/* Give these a dummy version to work around linker lameness.
The name used shouldn't matter as these are all local symbols. */
- __GNU {
- local:
+ __GNU {
+ local:
Image\$\$ER_RO\$\$Base;
Image\$\$ER_RO\$\$Limit;
SHT\$\$INIT_ARRAY\$\$Base;
SHT\$\$INIT_ARRAY\$\$Limit;
- .ARM.exidx\$\$Base;
+ .ARM.exidx\$\$Base;
.ARM.exidx\$\$Limit;
};
}
EOF
cat <<EOF
- .init ${RELOCATING-0} :
- {
+ .init ${RELOCATING-0} :
+ {
${RELOCATING+${INIT_START}}
KEEP (*(.init))
${RELOCATING+${INIT_END}}
.rel.dyn 0 :
{
EOF
-sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rela\./d;s/^.*: { *\(.*\)}$/ \1/' $COMBRELOC
+sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rela\./d;s/^.*: { *\(.*\)}$/ \1/' $COMBRELOC
cat <<EOF
}
.rela.dyn 0 :
{
EOF
-sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rel\./d;s/^.*: { *\(.*\)}/ \1/' $COMBRELOC
+sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rel\./d;s/^.*: { *\(.*\)}/ \1/' $COMBRELOC
cat <<EOF
}
EOF
# Based on i386coff.sc by Ian Taylor <ian@cygnus.com>.
#
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
*(.glue_7t)
*(.glue_7)
*(.rdata)
- ${CONSTRUCTING+ ___CTOR_LIST__ = .; __CTOR_LIST__ = . ;
+ ${CONSTRUCTING+ ___CTOR_LIST__ = .; __CTOR_LIST__ = . ;
LONG (-1); *(.ctors); *(.ctor); LONG (0); }
- ${CONSTRUCTING+ ___DTOR_LIST__ = .; __DTOR_LIST__ = . ;
+ ${CONSTRUCTING+ ___DTOR_LIST__ = .; __DTOR_LIST__ = . ;
LONG (-1); *(.dtors); *(.dtor); LONG (0); }
*(.fini)
${RELOCATING+ etext = .;}
.data ${RELOCATING+${DATA_ADDR-0x40000 + (ALIGN(0x8) & 0xfffc0fff)}} : {
${RELOCATING+ __data_start__ = . ;}
*(.data*)
-
+
${RELOCATING+*(.gcc_exc*)}
${RELOCATING+___EH_FRAME_BEGIN__ = . ;}
${RELOCATING+*(.eh_fram*)}
${RELOCATING+___EH_FRAME_END__ = . ;}
${RELOCATING+LONG(0);}
-
+
${RELOCATING+ __data_end__ = . ;}
${RELOCATING+ edata = .;}
${RELOCATING+ _edata = .;}
${CONSTRUCTING+${RELOCATING-$CTOR}}
${CONSTRUCTING+${RELOCATING-$DTOR}}
.bss ${RELOCATING+ ALIGN(0x8)} :
- {
+ {
${RELOCATING+ __bss_start__ = . ;}
*(.bss)
*(COMMON)
${RELOCATING+ _end = .;}
${RELOCATING+ __end__ = .;}
- .stab 0 ${RELOCATING+(NOLOAD)} :
+ .stab 0 ${RELOCATING+(NOLOAD)} :
{
[ .stab ]
}
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
${RELOCATING+ *libc.a:*(.progmem.data)}
${RELOCATING+ *(.progmem.*)}
-
+
${RELOCATING+. = ALIGN(2);}
/* For code that needs to reside in the lower 128k progmem. */
.stab.exclstr 0 : { *(.stab.exclstr) }
.stab.index 0 : { *(.stab.index) }
.stab.indexstr 0 : { *(.stab.indexstr) }
- .comment 0 : { *(.comment) }
+ .comment 0 : { *(.comment) }
.note.gnu.build-id : { *(.note.gnu.build-id) }
EOF
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
${CONSTRUCTING+ __Stext = .;}
${RELOCATING+*(.startup)}
*(.text)
- ${CONSTRUCTING+__start = DEFINED(__start) ? __start :
+ ${CONSTRUCTING+__start = DEFINED(__start) ? __start :
DEFINED(_start) ? _start :
DEFINED(start) ? start :
DEFINED(.startup) ? .startup + 2 : 2;}
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
${RELOCATING+ __.data.end = .};
}
.bss ${RELOCATING+ SIZEOF(.data) + ADDR(.data)} :
- {
+ {
${RELOCATING+ __.bss.start = .};
*(.bss)
*(COMMON)
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
# INPUT_FILES - INPUT command of files to always include
# WRITABLE_RODATA - if set, the .rodata section should be writable
# INIT_START, INIT_END - statements just before and just after
-# combination of .init sections.
+# combination of .init sections.
# FINI_START, FINI_END - statements just before and just after
-# combination of .fini sections.
+# combination of .fini sections.
# STACK_ADDR - start of a .stack section.
# OTHER_SYMBOLS - symbols to place right at the end of the script.
# ETEXT_NAME - name of a symbol for the end of the text section,
.rel.dyn ${RELOCATING-0} :
{
EOF
-sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rela\./d;/__rela_iplt_/d;s/^.*: { *\(.*\)}$/ \1/' $COMBRELOC >> ldscripts/dyntmp.$$
+sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rela\./d;/__rela_iplt_/d;s/^.*: { *\(.*\)}$/ \1/' $COMBRELOC >> ldscripts/dyntmp.$$
cat >> ldscripts/dyntmp.$$ <<EOF
}
.rela.dyn ${RELOCATING-0} :
{
EOF
-sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rel\./d;/__rel_iplt_/d;s/^.*: { *\(.*\)}/ \1/' $COMBRELOC >> ldscripts/dyntmp.$$
+sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rel\./d;/__rel_iplt_/d;s/^.*: { *\(.*\)}/ \1/' $COMBRELOC >> ldscripts/dyntmp.$$
cat >> ldscripts/dyntmp.$$ <<EOF
}
EOF
cat ldscripts/dyntmp.$$
else
if test -z "${NO_REL_RELOCS}"; then
- sed -e '/^[ ]*\.rela\.[^}]*$/,/}/d;/^[ ]*\.rela\./d;/__rela_iplt_/d' ldscripts/dyntmp.$$
+ sed -e '/^[ ]*\.rela\.[^}]*$/,/}/d;/^[ ]*\.rela\./d;/__rela_iplt_/d' ldscripts/dyntmp.$$
fi
if test -z "${NO_RELA_RELOCS}"; then
- sed -e '/^[ ]*\.rel\.[^}]*$/,/}/d;/^[ ]*\.rel\./d;/__rel_iplt_/d' ldscripts/dyntmp.$$
+ sed -e '/^[ ]*\.rel\.[^}]*$/,/}/d;/^[ ]*\.rel\./d;/__rel_iplt_/d' ldscripts/dyntmp.$$
fi
fi
rm -f ldscripts/dyntmp.$$
# Linker Script for National Semiconductor's CR16-ELF32.
#
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
/* Define memory regions. */
MEMORY
{
- rom : ORIGIN = 0x2, LENGTH = 3M
- ram : ORIGIN = 4M, LENGTH = 10M
+ rom : ORIGIN = 0x2, LENGTH = 3M
+ ram : ORIGIN = 4M, LENGTH = 10M
}
/* Many sections come in three flavours. There is the 'real' section,
SECTIONS
{
.init :
- {
- __INIT_START = .;
+ {
+ __INIT_START = .;
KEEP (*(.init))
- __INIT_END = .;
+ __INIT_END = .;
} > rom
.fini :
- {
- __FINI_START = .;
+ {
+ __FINI_START = .;
KEEP (*(.fini))
- __FINI_END = .;
+ __FINI_END = .;
} > rom
.jcr :
- {
+ {
KEEP (*(.jcr))
} > rom
- .text :
+ .text :
{
__TEXT_START = .;
*(.text) *(.text.*) *(.gnu.linkonce.t.*)
__RDATA_END = .;
} > rom
- .ctor ALIGN(4) :
- {
- __CTOR_START = .;
+ .ctor ALIGN(4) :
+ {
+ __CTOR_START = .;
/* The compiler uses crtbegin.o to find the start
of the constructors, so we make sure it is
first. Because this is a wildcard, it
KEEP (*(EXCLUDE_FILE (*crtend*.o) .ctors))
KEEP (*(SORT(.ctors.*)))
KEEP (*(.ctors))
- __CTOR_END = .;
+ __CTOR_END = .;
} > rom
- .dtor ALIGN(4) :
- {
- __DTOR_START = .;
+ .dtor ALIGN(4) :
+ {
+ __DTOR_START = .;
KEEP (*crtbegin*.o(.dtors))
KEEP (*(EXCLUDE_FILE (*crtend*.o) .dtors))
KEEP (*(SORT(.dtors.*)))
KEEP (*(.dtors))
- __DTOR_END = .;
+ __DTOR_END = .;
} > rom
.data :
# Linker Script for National Semiconductor's CR16C-ELF32.
#
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
{
near_rom : ORIGIN = 0x4, LENGTH = 512K - 4
near_ram : ORIGIN = 512K, LENGTH = 512K - 64K
- rom : ORIGIN = 1M, LENGTH = 3M
- ram : ORIGIN = 4M, LENGTH = 10M
+ rom : ORIGIN = 1M, LENGTH = 3M
+ ram : ORIGIN = 4M, LENGTH = 10M
}
SECTIONS
there. The alignment to 4 bytes is compatible for both the CR16C
bus width (2 bytes) and CR16CPlus bus width (4 bytes). */
- .text : { __TEXT_START = .; *(.text) __TEXT_END = .; } > rom
+ .text : { __TEXT_START = .; *(.text) __TEXT_END = .; } > rom
.rdata : { __RDATA_START = .; *(.rdata_4) *(.rdata_2) *(.rdata_1) __RDATA_END = .; } > near_rom
.ctor ALIGN(4) : { __CTOR_LIST = .; *(.ctors) __CTOR_END = .; } > near_rom
.dtor ALIGN(4) : { __DTOR_LIST = .; *(.dtors) __DTOR_END = .; } > near_rom
# Linker Script for National Semiconductor's CRX-ELF32.
#
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
/* Define memory regions. */
MEMORY
{
- rom : ORIGIN = 0x2, LENGTH = 3M
- ram : ORIGIN = 4M, LENGTH = 10M
+ rom : ORIGIN = 0x2, LENGTH = 3M
+ ram : ORIGIN = 4M, LENGTH = 10M
}
/* Many sections come in three flavours. There is the 'real' section,
SECTIONS
{
.init :
- {
- __INIT_START = .;
+ {
+ __INIT_START = .;
KEEP (*(.init))
- __INIT_END = .;
+ __INIT_END = .;
} > rom
.fini :
- {
- __FINI_START = .;
+ {
+ __FINI_START = .;
KEEP (*(.fini))
- __FINI_END = .;
+ __FINI_END = .;
} > rom
.jcr :
- {
+ {
KEEP (*(.jcr))
} > rom
- .text :
+ .text :
{
__TEXT_START = .;
*(.text) *(.text.*) *(.gnu.linkonce.t.*)
__RDATA_END = .;
} > rom
- .ctor ALIGN(4) :
- {
- __CTOR_START = .;
+ .ctor ALIGN(4) :
+ {
+ __CTOR_START = .;
/* The compiler uses crtbegin.o to find the start
of the constructors, so we make sure it is
first. Because this is a wildcard, it
KEEP (*crtbegin.o(.ctors))
KEEP (*crtbegin?.o(.ctors))
-
+
/* We don't want to include the .ctor section from
the crtend.o file until after the sorted ctors.
The .ctor section from the crtend file contains the
KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o) .ctors))
KEEP (*(SORT(.ctors.*)))
KEEP (*(.ctors))
- __CTOR_END = .;
+ __CTOR_END = .;
} > rom
- .dtor ALIGN(4) :
- {
- __DTOR_START = .;
+ .dtor ALIGN(4) :
+ {
+ __DTOR_START = .;
KEEP (*crtbegin.o(.dtors))
KEEP (*crtbegin?.o(.dtors))
KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o) .dtors))
KEEP (*(SORT(.dtors.*)))
KEEP (*(.dtors))
- __DTOR_END = .;
+ __DTOR_END = .;
} > rom
.data :
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
HEAP_SECTION_MSP430=" "
HEAP_MEMORY_MSP430=" "
-if test ${GOT_HEAP_MSP-0} -ne 0
-then
+if test ${GOT_HEAP_MSP-0} -ne 0
+then
HEAP_SECTION_MSP430=".heap ${RELOCATING-0} :
{
${RELOCATING+ PROVIDE (__heap_data_start = .) ; }
${RELOCATING+ PROVIDE (__heap_bottom = .) ; }
${RELOCATING+ PROVIDE (__heap_top = ${HEAP_START} + ${HEAP_LENGTH}) ; }
} ${RELOCATING+ > heap}"
-HEAP_MEMORY_MSP430="heap(rwx) : ORIGIN = $HEAP_START, LENGTH = $HEAP_LENGTH"
+HEAP_MEMORY_MSP430="heap(rwx) : ORIGIN = $HEAP_START, LENGTH = $HEAP_LENGTH"
fi
MEMORY
{
- text (rx) : ORIGIN = $ROM_START, LENGTH = $ROM_SIZE
- data (rwx) : ORIGIN = $RAM_START, LENGTH = $RAM_SIZE
- vectors (rw) : ORIGIN = 0xffe0, LENGTH = 0x20
+ text (rx) : ORIGIN = $ROM_START, LENGTH = $ROM_SIZE
+ data (rwx) : ORIGIN = $RAM_START, LENGTH = $RAM_SIZE
+ vectors (rw) : ORIGIN = 0xffe0, LENGTH = 0x20
bootloader(rx) : ORIGIN = 0x0c00, LENGTH = 1K
infomem(rx) : ORIGIN = 0x1000, LENGTH = 256
infomemnobits(rx) : ORIGIN = 0x1000, LENGTH = 256
${RELOCATING+. = ALIGN(2);}
*(.bootloader.*)
} ${RELOCATING+ > bootloader}
-
+
/* Information memory. */
.infomem ${RELOCATING-0} :
{
__romdatastart = LOADADDR(.data);
__romdatacopysize = SIZEOF(.data);
-
+
.bss ${RELOCATING+ SIZEOF(.data) + ADDR(.data)} :
{
${RELOCATING+. = ALIGN(2);}
/* Stabs for profiling information*/
.profiler 0 : { *(.profiler) }
-
+
/* Stabs debugging sections. */
- .stab 0 : { *(.stab) }
+ .stab 0 : { *(.stab) }
.stabstr 0 : { *(.stabstr) }
.stab.excl 0 : { *(.stab.excl) }
.stab.exclstr 0 : { *(.stab.exclstr) }
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
MEMORY
{
text (rx) : ORIGIN = $ROM_START, LENGTH = $ROM_SIZE
- data (rwx) : ORIGIN = $RAM_START, LENGTH = $RAM_SIZE
+ data (rwx) : ORIGIN = $RAM_START, LENGTH = $RAM_SIZE
vectors (rw) : ORIGIN = 0xffe0, LENGTH = 0x20
}
} ${RELOCATING+ > text}
.data ${RELOCATING-0} :
- {
+ {
${RELOCATING+ PROVIDE (__data_start = .) ; }
${RELOCATING+. = ALIGN(2);}
*(.data)
${RELOCATING+. = ALIGN(2);}
${RELOCATING+ _edata = . ; }
} ${RELOCATING+ > data ${RELOCATING+AT> text}}
-
+
__romdatastart = LOADADDR(.data);
__romdatacopysize = SIZEOF(.data);
-
+
.bss ${RELOCATING+ SIZEOF(.data) + ADDR(.data)} :
{
${RELOCATING+. = ALIGN(2);}
}
/* Stabs debugging sections. */
- .stab 0 : { *(.stab) }
+ .stab 0 : { *(.stab) }
.stabstr 0 : { *(.stabstr) }
.stab.excl 0 : { *(.stab.excl) }
.stab.exclstr 0 : { *(.stab.exclstr) }
.stab.index 0 : { *(.stab.index) }
.stab.indexstr 0 : { *(.stab.indexstr) }
.comment 0 : { *(.comment) }
-
+
EOF
. $srcdir/scripttempl/DWARF.sc
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
# DATA_PLT - .plt should be in data segment, not text segment.
# BSS_PLT - .plt should be in bss segment
# TEXT_DYNAMIC - .dynamic in text segment, not data segment.
-# EMBEDDED - whether this is for an embedded system.
+# EMBEDDED - whether this is for an embedded system.
# SHLIB_TEXT_START_ADDR - if set, add to SIZEOF_HEADERS to set
# start address of shared library.
# INPUT_FILES - INPUT command of files to always include
# WRITABLE_RODATA - if set, the .rodata section should be writable
# INIT_START, INIT_END - statements just before and just after
-# combination of .init sections.
+# combination of .init sections.
# FINI_START, FINI_END - statements just before and just after
-# combination of .fini sections.
+# combination of .fini sections.
# STACK_ADDR - start of a .stack section.
# OTHER_SYMBOLS - symbols to place right at the end of the script.
#
KEEP (*(.fini_array))
${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (__fini_array_end = .);}}
}"
-CTOR=".ctors ALIGN(4) :
+CTOR=".ctors ALIGN(4) :
{
${CONSTRUCTING+${CTOR_START}}
/* gcc uses crtbegin.o to find the start of
${CREATE_SHLIB+${RELOCATING+. = ${SHLIB_TEXT_START_ADDR:-0};}}
${CREATE_PIE+${RELOCATING+. = ${SHLIB_TEXT_START_ADDR:-0};}}
${CREATE_SHLIB-${INTERP}}
-
+
${INITIAL_READONLY_SECTIONS}
- .init ALIGN(4) :
- {
+ .init ALIGN(4) :
+ {
${RELOCATING+${INIT_START}}
KEEP (*(.init))
${RELOCATING+${INIT_END}}
*(.gnu.warning)
${RELOCATING+${OTHER_TEXT_SECTIONS}}
} =${NOP-0}
-
+
${RELOCATING+${CTOR}}
${RELOCATING+${DTOR}}
-
+
.fini ALIGN(4) :
{
${RELOCATING+${FINI_START}}
KEEP (*(.fini))
${RELOCATING+${FINI_END}}
} =${NOP-0}
-
+
${RELOCATING+PROVIDE (__etext = .);}
${RELOCATING+PROVIDE (_etext = .);}
${RELOCATING+PROVIDE (etext = .);}
-
+
${WRITABLE_RODATA-${RODATA}}
.rodata1 ALIGN(4) : { *(.rodata1) }
-
+
ExportTable ALIGN(4) : { KEEP (*(ExportTable)) }
.eh_frame_hdr ALIGN(4) : { *(.eh_frame_hdr) } :text
*(.data${RELOCATING+ .data.* .gnu.linkonce.d.*})
${CONSTRUCTING+SORT(CONSTRUCTORS)}
} :data
-
+
.data1 ALIGN(4) : { *(.data1) } :data
.tdata ALIGN(4) : { *(.tdata${RELOCATING+ .tdata.* .gnu.linkonce.td.*}) } :data
.tbss ALIGN(4) : { *(.tbss${RELOCATING+ .tbss.* .gnu.linkonce.tb.*})${RELOCATING+ *(.tcommon)} } :data
.rel.dyn ${RELOCATING-0} :
{
EOF
-sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rela\./d;s/^.*: { *\(.*\)}$/ \1/' $COMBRELOC
+sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rela\./d;s/^.*: { *\(.*\)}$/ \1/' $COMBRELOC
cat <<EOF
}
.rela.dyn ${RELOCATING-0} :
{
EOF
-sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rel\./d;s/^.*: { *\(.*\)}/ \1/' $COMBRELOC
+sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rel\./d;s/^.*: { *\(.*\)}/ \1/' $COMBRELOC
cat <<EOF
}
EOF
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
${RELOCATING+ENTRY ("_start")}
MEMORY
{
-
- vectarea : o =0x00000, l = 0x0300
-
+
+ vectarea : o =0x00000, l = 0x0300
+
introm : o = 0x00400, l = 0x16000
/* The stack starts at the top of main ram. */
-
+
dram : o = 0x8000 , l = 0xffff
/* At the very top of the address space is the 8-bit area. */
-
- ldata : o =0x4000 ,l = 0x0200
+
+ ldata : o =0x4000 ,l = 0x0200
}
SECTIONS
{
.init :
- {
- *(.init)
- } ${RELOCATING+ >introm}
-
+ {
+ *(.init)
+ } ${RELOCATING+ >introm}
+
.text :
{
- *(.rodata)
+ *(.rodata)
*(.text.*)
*(.text)
- ${RELOCATING+ _etext = . ; }
+ ${RELOCATING+ _etext = . ; }
} ${RELOCATING+ > introm}
.data :
{
*(.data)
*(.data.*)
-
+
${RELOCATING+ _edata = . ; }
} ${RELOCATING+ > dram}
${RELOCATING+ _end = . ; }
} ${RELOCATING+ > dram}
- .ldata :
- {
- *(.ldata)
- } ${RELOCATING+ > ldata}
+.ldata :
+ {
+ *(.ldata)
+ } ${RELOCATING+ > ldata}
-
- .vects :
- {
- *(.vects)
- } ${RELOCATING+ > vectarea}
+
+.vects :
+ {
+ *(.vects)
+ } ${RELOCATING+ > vectarea}
}
EOF
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
${RELOCATING+ENTRY ("_start")}
MEMORY
{
- vectarea : o =0xc00000, l = 0x0300
-
+ vectarea : o =0xc00000, l = 0x0300
+
introm : o = 0xc00300, l = 0x16000
/* The stack starts at the top of main ram. */
-
+
dram : o = 0x8000 , l = 0xffff
/* At the very top of the address space is the 8-bit area. */
-
- ldata : o =0x4000 ,l = 0x0200
+
+ ldata : o =0x4000 ,l = 0x0200
}
SECTIONS
{
/*.vects :
- {
- *(.vects)
- } ${RELOCATING+ > vectarea} */
+ {
+ *(.vects)
+ } ${RELOCATING+ > vectarea} */
.init :
- {
- *(.init)
- } ${RELOCATING+ >introm}
-
+ {
+ *(.init)
+ } ${RELOCATING+ >introm}
+
.text :
{
- *(.rodata)
+ *(.rodata)
*(.text.*)
*(.text)
- ${RELOCATING+ _etext = . ; }
+ ${RELOCATING+ _etext = . ; }
} ${RELOCATING+ > introm}
.data :
{
*(.data)
*(.data.*)
-
+
${RELOCATING+ _edata = . ; }
} ${RELOCATING+ > dram}
${RELOCATING+ _end = . ; }
} ${RELOCATING+ > dram}
- .ldata :
- {
- *(.ldata)
- } ${RELOCATING+ > ldata}
-
-
- .vects :
- {
- *(.vects)
- } ${RELOCATING+ > vectarea}
-
+.ldata :
+ {
+ *(.ldata)
+ } ${RELOCATING+ > ldata}
+.vects :
+ {
+ *(.vects)
+ } ${RELOCATING+ > vectarea}
}
EOF
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
${RELOCATING+ENTRY ("_start")}
MEMORY
{
- vectarea : o =0xc00000, l = 0x0300
-
+ vectarea : o =0xc00000, l = 0x0300
+
introm : o = 0xc00300, l = 0x16000
/* The stack starts at the top of main ram. */
-
+
dram : o = 0x8000 , l = 0xffff
/* At the very top of the address space is the 8-bit area. */
-
- ldata : o =0x4000 ,l = 0x0200
+
+ ldata : o =0x4000 ,l = 0x0200
}
SECTIONS
{
/*.vects :
- {
- *(.vects)
- } ${RELOCATING+ > vectarea} */
+ {
+ *(.vects)
+ } ${RELOCATING+ > vectarea} */
.init :
- {
- *(.init)
- } ${RELOCATING+ >introm}
-
+ {
+ *(.init)
+ } ${RELOCATING+ >introm}
+
.text :
{
- *(.rodata)
+ *(.rodata)
*(.text.*)
*(.text)
- ${RELOCATING+ _etext = . ; }
+ ${RELOCATING+ _etext = . ; }
} ${RELOCATING+ > introm}
.data :
{
*(.data)
*(.data.*)
-
+
${RELOCATING+ _edata = . ; }
} ${RELOCATING+ > dram}
${RELOCATING+ _end = . ; }
} ${RELOCATING+ > dram}
- .ldata :
- {
- *(.ldata)
- } ${RELOCATING+ > ldata}
+.ldata :
+ {
+ *(.ldata)
+ } ${RELOCATING+ > ldata}
- .vects :
- {
- *(.vects)
- } ${RELOCATING+ > vectarea}
+.vects :
+ {
+ *(.vects)
+ } ${RELOCATING+ > vectarea}
}
EOF
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
# NO_RELA_RELOCS - Don't include .rela.* sections in script
# NON_ALLOC_DYN - Place dynamic sections after data segment.
# TEXT_DYNAMIC - .dynamic in text segment, not data segment.
-# EMBEDDED - whether this is for an embedded system.
+# EMBEDDED - whether this is for an embedded system.
# SHLIB_TEXT_START_ADDR - if set, add to SIZEOF_HEADERS to set
# start address of shared library.
# INPUT_FILES - INPUT command of files to always include
# WRITABLE_RODATA - if set, the .rodata section should be writable
# INIT_START, INIT_END - statements just before and just after
-# combination of .init sections.
+# combination of .init sections.
# FINI_START, FINI_END - statements just before and just after
-# combination of .fini sections.
+# combination of .fini sections.
# STACK_ADDR - start of a .stack section.
# OTHER_SYMBOLS - symbols to place right at the end of the script.
# ETEXT_NAME - name of a symbol for the end of the text section,
SDATA="/* We want the small data sections together, so single-instruction offsets
can access them all, and initialized data all before uninitialized, so
we can shorten the on-disk segment size. */
- .sdata ${RELOCATING-0} :
+ .sdata ${RELOCATING-0} :
{
${RELOCATING+${SDATA_START_SYMBOLS}}
${CREATE_SHLIB+*(.sdata2 .sdata2.* .gnu.linkonce.s2.*)}
KEEP (*(.fini_array))
${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (${USER_LABEL_PREFIX}__fini_array_end = .);}}
}"
-CTOR=".ctors ${CONSTRUCTING-0} :
+CTOR=".ctors ${CONSTRUCTING-0} :
{
${CONSTRUCTING+${CTOR_START}}
/* gcc uses crtbegin.o to find the start of
.rel.dyn ${RELOCATING-0} :
{
EOF
-sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rela\./d;s/^.*: { *\(.*\)}$/ \1/' $COMBRELOC >> ldscripts/dyntmp.$$
+sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rela\./d;s/^.*: { *\(.*\)}$/ \1/' $COMBRELOC >> ldscripts/dyntmp.$$
cat >> ldscripts/dyntmp.$$ <<EOF
}
.rel.ifunc.dyn ${RELOCATING-0} :
.rela.dyn ${RELOCATING-0} :
{
EOF
-sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rel\./d;s/^.*: { *\(.*\)}/ \1/' $COMBRELOC >> ldscripts/dyntmp.$$
+sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rel\./d;s/^.*: { *\(.*\)}/ \1/' $COMBRELOC >> ldscripts/dyntmp.$$
cat >> ldscripts/dyntmp.$$ <<EOF
}
.rela.ifunc.dyn ${RELOCATING-0} :
cat ldscripts/dyntmp.$$
else
if test -z "${NO_REL_RELOCS}"; then
- sed -e '/^[ ]*\.rela\.[^}]*$/,/}/d' -e '/^[ ]*\.rela\./d' ldscripts/dyntmp.$$
+ sed -e '/^[ ]*\.rela\.[^}]*$/,/}/d' -e '/^[ ]*\.rela\./d' ldscripts/dyntmp.$$
fi
if test -z "${NO_RELA_RELOCS}"; then
- sed -e '/^[ ]*\.rel\.[^}]*$/,/}/d' -e '/^[ ]*\.rel\./d' ldscripts/dyntmp.$$
+ sed -e '/^[ ]*\.rel\.[^}]*$/,/}/d' -e '/^[ ]*\.rel\./d' ldscripts/dyntmp.$$
fi
fi
rm -f ldscripts/dyntmp.$$
fi
cat <<EOF
- .init ${RELOCATING-0} :
- {
+ .init ${RELOCATING-0} :
+ {
${RELOCATING+${INIT_START}}
KEEP (*(.init))
${RELOCATING+${INIT_END}}
cat ldscripts/dyntmp.$$
else
if test -z "${NO_REL_RELOCS}"; then
- sed -e '/^[ ]*\.rela\.[^}]*$/,/}/d' -e '/^[ ]*\.rela\./d' ldscripts/dyntmp.$$
+ sed -e '/^[ ]*\.rela\.[^}]*$/,/}/d' -e '/^[ ]*\.rela\./d' ldscripts/dyntmp.$$
fi
if test -z "${NO_RELA_RELOCS}"; then
- sed -e '/^[ ]*\.rel\.[^}]*$/,/}/d' -e '/^[ ]*\.rel\./d' ldscripts/dyntmp.$$
+ sed -e '/^[ ]*\.rel\.[^}]*$/,/}/d' -e '/^[ ]*\.rel\./d' ldscripts/dyntmp.$$
fi
fi
rm -f ldscripts/dyntmp.$$
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
# DATA_PLT - .plt should be in data segment, not text segment.
# BSS_PLT - .plt should be in bss segment
# TEXT_DYNAMIC - .dynamic in text segment, not data segment.
-# EMBEDDED - whether this is for an embedded system.
+# EMBEDDED - whether this is for an embedded system.
# SHLIB_TEXT_START_ADDR - if set, add to SIZEOF_HEADERS to set
# start address of shared library.
# INPUT_FILES - INPUT command of files to always include
# WRITABLE_RODATA - if set, the .rodata section should be writable
# INIT_START, INIT_END - statements just before and just after
-# combination of .init sections.
+# combination of .init sections.
# FINI_START, FINI_END - statements just before and just after
-# combination of .fini sections.
+# combination of .fini sections.
# STACK_ADDR - start of a .stack section.
# OTHER_SYMBOLS - symbols to place right at the end of the script.
#
SDATA="/* We want the small data sections together, so single-instruction offsets
can access them all, and initialized data all before uninitialized, so
we can shorten the on-disk segment size. */
- .sdata ${RELOCATING-0} :
+ .sdata ${RELOCATING-0} :
{
${RELOCATING+${SDATA_START_SYMBOLS}}
*(.sdata${RELOCATING+ .sdata.* .gnu.linkonce.s.*})
.rel.dyn ${RELOCATING-0} :
{
EOF
-sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rela\./d;s/^.*: { *\(.*\)}$/ \1/' $COMBRELOC
+sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rela\./d;s/^.*: { *\(.*\)}$/ \1/' $COMBRELOC
cat <<EOF
}
.rela.dyn ${RELOCATING-0} :
{
EOF
-sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rel\./d;s/^.*: { *\(.*\)}/ \1/' $COMBRELOC
+sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rel\./d;s/^.*: { *\(.*\)}/ \1/' $COMBRELOC
cat <<EOF
}
EOF
# DATA_PLT - .plt should be in data segment, not text segment.
# BSS_PLT - .plt should be in bss segment
# TEXT_DYNAMIC - .dynamic in text segment, not data segment.
-# EMBEDDED - whether this is for an embedded system.
+# EMBEDDED - whether this is for an embedded system.
# SHLIB_TEXT_START_ADDR - if set, add to SIZEOF_HEADERS to set
# start address of shared library.
# INPUT_FILES - INPUT command of files to always include
# WRITABLE_RODATA - if set, the .rodata section should be writable
# INIT_START, INIT_END - statements just before and just after
-# combination of .init sections.
+# combination of .init sections.
# FINI_START, FINI_END - statements just before and just after
-# combination of .fini sections.
+# combination of .fini sections.
# STACK_ADDR - start of a .stack section.
# OTHER_END_SYMBOLS - symbols to place right at the end of the script.
#
SDATA="/* We want the small data sections together, so single-instruction offsets
can access them all, and initialized data all before uninitialized, so
we can shorten the on-disk segment size. */
- .sdata ${RELOCATING-0} :
+ .sdata ${RELOCATING-0} :
{
${RELOCATING+${SDATA_START_SYMBOLS}}
*(.sdata${RELOCATING+ .sdata.* .gnu.linkonce.s.*})
REL_SBSS2=".rel.sbss2 ${RELOCATING-0} : { *(.rel.sbss2${RELOCATING+ .rel.sbss2.* .rel.gnu.linkonce.sb2.*}) }
.rela.sbss2 ${RELOCATING-0} : { *(.rela.sbss2${RELOCATING+ .rela.sbss2.* .rela.gnu.linkonce.sb2.*}) }"
fi
-CTOR=".ctors ${CONSTRUCTING-0} :
+CTOR=".ctors ${CONSTRUCTING-0} :
{
${CONSTRUCTING+${CTOR_START}}
/* gcc uses crtbegin.o to find the start of
.rel.dyn ${RELOCATING-0} :
{
EOF
-sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rela\./d;s/^.*: { *\(.*\)}$/ \1/' $COMBRELOC
+sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rela\./d;s/^.*: { *\(.*\)}$/ \1/' $COMBRELOC
cat <<EOF
}
.rela.dyn ${RELOCATING-0} :
{
EOF
-sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rel\./d;s/^.*: { *\(.*\)}/ \1/' $COMBRELOC
+sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rel\./d;s/^.*: { *\(.*\)}/ \1/' $COMBRELOC
cat <<EOF
}
EOF
.rela.plt ${RELOCATING-0} : { *(.rela.plt) }
${OTHER_PLT_RELOC_SECTIONS}
- .init ${RELOCATING-0} :
- {
+ .init ${RELOCATING-0} :
+ {
${RELOCATING+${INIT_START}}
KEEP (*(.init))
${RELOCATING+${INIT_END}}
the setting from ldflags prevails. */
.heap ${RELOCATING-0} :
{
- ${RELOCATING+ __start_heap = . ; }
- ${RELOCATING+ . = . + (DEFINED(__HEAP_SIZE) ? __HEAP_SIZE : (DEFINED(__DEFAULT_HEAP_SIZE) ? __DEFAULT_HEAP_SIZE : 20k)) ; }
- ${RELOCATING+ __end_heap = . ; }
+ ${RELOCATING+ __start_heap = . ; }
+ ${RELOCATING+ . = . + (DEFINED(__HEAP_SIZE) ? __HEAP_SIZE : (DEFINED(__DEFAULT_HEAP_SIZE) ? __DEFAULT_HEAP_SIZE : 20k)) ; }
+ ${RELOCATING+ __end_heap = . ; }
}
${RELOCATING+. = ALIGN(0x8);}
.stack ${RELOCATING-0} :
{
- ${RELOCATING+ __stack = . ; }
- ${RELOCATING+ . = . + (DEFINED(__STACK_SIZE) ? __STACK_SIZE : (DEFINED(__DEFAULT_STACK_SIZE) ? __DEFAULT_STACK_SIZE : 64k)) ; }
- ${RELOCATING+ __stack_top = . ; }
+ ${RELOCATING+ __stack = . ; }
+ ${RELOCATING+ . = . + (DEFINED(__STACK_SIZE) ? __STACK_SIZE : (DEFINED(__DEFAULT_STACK_SIZE) ? __DEFAULT_STACK_SIZE : 64k)) ; }
+ ${RELOCATING+ __stack_top = . ; }
}
/* Stabs debugging sections. */
test -z "${ALIGNMENT}" && ALIGNMENT="${ELFSIZE} / 8"
test "$LD_FLAG" = "N" && DATA_ADDR=.
-CTOR=".ctors ${CONSTRUCTING-0} :
+CTOR=".ctors ${CONSTRUCTING-0} :
{
${CONSTRUCTING+${CTOR_START}}
/* gcc uses crtbegin.o to find the start of
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
test -z "${LITTLE_OUTPUT_FORMAT}" && LITTLE_OUTPUT_FORMAT=${OUTPUT_FORMAT}
if [ -z "$MACHINE" ]; then OUTPUT_ARCH=${ARCH}; else OUTPUT_ARCH=${ARCH}:${MACHINE}; fi
test "$LD_FLAG" = "N" && DATA_ADDR=.
-INTERP=".interp ${RELOCATING-0} : { *(.interp) }"
-PLT=".plt ${RELOCATING-0} : { *(.plt) }"
+INTERP=".interp ${RELOCATING-0} : { *(.interp) }"
+PLT=".plt ${RELOCATING-0} : { *(.plt) }"
-CTOR=".ctors ${CONSTRUCTING-0} :
+CTOR=".ctors ${CONSTRUCTING-0} :
{
${CONSTRUCTING+${CTOR_START}}
/* gcc uses crtbegin.o to find the start of
There are other memory regions available on
the TS3 (eg ROM, FLASH, etc) but these are not
used by this script. */
-
+
INSN : org = 0x01000000, len = 256K
DATA : org = 0x02000000, len = 48K
/* This is a fake memory region at the top of the
on-chip RAM, used as the start of the
(descending) stack. */
-
+
STACK : org = 0x0200BFFC, len = 4
}
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
-CTOR=".ctors ${CONSTRUCTING-0} :
+CTOR=".ctors ${CONSTRUCTING-0} :
{
${CONSTRUCTING+ __CTOR_LIST__ = .; }
/* gcc uses crtbegin.o to find the start of
. $srcdir/scripttempl/DWARF.sc
-cat <<EOF
+cat <<EOF
PROVIDE (__stack = ${STACK_START_ADDR});
}
EOF
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
. $srcdir/scripttempl/DWARF.sc
-cat <<EOF
+cat <<EOF
${ATTRS_SECTIONS}
${OTHER_SECTIONS}
}
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
# .data section.
# OTHER_BSS_SYMBOLS - symbols that appear at the start of the
# .bss section besides __bss_start.
-# EMBEDDED - whether this is for an embedded system.
+# EMBEDDED - whether this is for an embedded system.
#
# When adding sections, do note that the names of some sections are used
# when specifying the start address of the next.
if [ -z "$MACHINE" ]; then OUTPUT_ARCH=${ARCH}; else OUTPUT_ARCH=${ARCH}:${MACHINE}; fi
test "$LD_FLAG" = "N" && DATA_ADDR=.
-CTOR=".ctors ${CONSTRUCTING-0} :
+CTOR=".ctors ${CONSTRUCTING-0} :
{
${CONSTRUCTING+ PROVIDE (__CTOR_LIST__ = .); }
${CONSTRUCTING+${CTOR_START}}
Bootstrap 0x00c0
Test 0xbfc0
- In general, the vectors address is 0xffc0. This can be overriden
+ In general, the vectors address is 0xffc0. This can be overriden
with the '-defsym vectors_addr=0xbfc0' ld option.
Note: for the bootstrap mode, the interrupt vectors are at 0xbfc0 but
${RELOCATING+*(.rela.gnu.linkonce.s.*)}
}
.rel.sbss ${RELOCATING-0} :
- {
+ {
*(.rel.sbss)
${RELOCATING+*(.rel.sbss.*)}
${RELOCATING+*(.rel.gnu.linkonce.sb.*)}
${RELOCATING+*(.rela.sbss.*)}
${RELOCATING+*(.rel.gnu.linkonce.sb.*)}
}
- .rel.bss ${RELOCATING-0} :
- {
+ .rel.bss ${RELOCATING-0} :
+ {
*(.rel.bss)
${RELOCATING+*(.rel.bss.*)}
${RELOCATING+*(.rel.gnu.linkonce.b.*)}
}
- .rela.bss ${RELOCATING-0} :
- {
+ .rela.bss ${RELOCATING-0} :
+ {
*(.rela.bss)
${RELOCATING+*(.rela.bss.*)}
${RELOCATING+*(.rela.gnu.linkonce.b.*)}
} ${RELOCATING+ > page0}
/* Start of text section. */
- .stext ${RELOCATING-0} :
+ .stext ${RELOCATING-0} :
{
*(.stext)
} ${RELOCATING+ > ${TEXT_MEMORY}}
.init ${RELOCATING-0} :
{
- *(.init)
+ *(.init)
} ${RELOCATING+=${NOP-0}}
${RELOCATING-${INSTALL_RELOC}}
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
# .data section.
# OTHER_BSS_SYMBOLS - symbols that appear at the start of the
# .bss section besides __bss_start.
-# EMBEDDED - whether this is for an embedded system.
+# EMBEDDED - whether this is for an embedded system.
#
# When adding sections, do note that the names of some sections are used
# when specifying the start address of the next.
if [ -z "$MACHINE" ]; then OUTPUT_ARCH=${ARCH}; else OUTPUT_ARCH=${ARCH}:${MACHINE}; fi
test "$LD_FLAG" = "N" && DATA_ADDR=.
-CTOR=".ctors ${CONSTRUCTING-0} :
+CTOR=".ctors ${CONSTRUCTING-0} :
{
${CONSTRUCTING+ PROVIDE (__CTOR_LIST__ = .); }
${CONSTRUCTING+${CTOR_START}}
Bootstrap 0x00c0
Test 0xbfc0
- In general, the vectors address is 0xffc0. This can be overriden
+ In general, the vectors address is 0xffc0. This can be overriden
with the '-defsym vectors_addr=0xbfc0' ld option.
Note: for the bootstrap mode, the interrupt vectors are at 0xbfc0 but
${RELOCATING+*(.rela.gnu.linkonce.s.*)}
}
.rel.sbss ${RELOCATING-0} :
- {
+ {
*(.rel.sbss)
${RELOCATING+*(.rel.sbss.*)}
${RELOCATING+*(.rel.gnu.linkonce.sb.*)}
${RELOCATING+*(.rela.sbss.*)}
${RELOCATING+*(.rel.gnu.linkonce.sb.*)}
}
- .rel.bss ${RELOCATING-0} :
- {
+ .rel.bss ${RELOCATING-0} :
+ {
*(.rel.bss)
${RELOCATING+*(.rel.bss.*)}
${RELOCATING+*(.rel.gnu.linkonce.b.*)}
}
- .rela.bss ${RELOCATING-0} :
- {
+ .rela.bss ${RELOCATING-0} :
+ {
*(.rela.bss)
${RELOCATING+*(.rela.bss.*)}
${RELOCATING+*(.rela.gnu.linkonce.b.*)}
} ${RELOCATING+ > page0}
/* Start of text section. */
- .stext ${RELOCATING-0} :
+ .stext ${RELOCATING-0} :
{
*(.stext)
} ${RELOCATING+ > ${TEXT_MEMORY}}
.init ${RELOCATING-0} :
{
- *(.init)
+ *(.init)
} ${RELOCATING+=${NOP-0}}
${RELOCATING-${INSTALL_RELOC}}
# Adapted from mips.sc
#
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
#test -z "$TEXT_START_ADDR" && TEXT_START_ADDR="0x0"
-CTOR=".ctors ${CONSTRUCTING-0} :
+CTOR=".ctors ${CONSTRUCTING-0} :
{
${CONSTRUCTING+${CTOR_START}}
/* gcc uses crtbegin.o to find the start of
${RELOCATING+ENTRY (${ENTRY})}
-_TEXT_START_ADDR = DEFINED(_TEXT_START_ADDR) ? _TEXT_START_ADDR : 0x50;
+_TEXT_START_ADDR = DEFINED(_TEXT_START_ADDR) ? _TEXT_START_ADDR : 0x50;
_HEAP_SIZE = DEFINED(_HEAP_SIZE) ? _HEAP_SIZE : 0x0;
_STACK_SIZE = DEFINED(_STACK_SIZE) ? _STACK_SIZE : 0x400;
}
${RELOCATING+. = ALIGN(4);}
.sbss2 : {
- ${RELOCATING+PROVIDE (__sbss2_start = .);}
+ ${RELOCATING+PROVIDE (__sbss2_start = .);}
${RELOCATING+*(.sbss2)}
${RELOCATING+*(.sbss2.*)}
${RELOCATING+*(.gnu.linkonce.sb2.*)}
${CONSTRUCTING+CONSTRUCTORS}; /* Is this needed? */
}
${RELOCATING+ _edata = . ;}
-
+
/* Added to handle pic code */
- .got : {
+ .got : {
${RELOCATING+*(.got)}
}
- .got1 : {
+ .got1 : {
${RELOCATING+*(.got1)}
}
- .got2 : {
+ .got2 : {
${RELOCATING+*(.got2)}
}
/* Added by Sathya to handle C++ exceptions */
- .eh_frame : {
+ .eh_frame : {
${RELOCATING+*(.eh_frame)}
}
-
- .jcr : {
+
+ .jcr : {
${RELOCATING+*(.jcr)}
}
- .gcc_except_table : {
+ .gcc_except_table : {
${RELOCATING+*(.gcc_except_table)}
}
}
${RELOCATING+. = ALIGN(4);}
.sbss : {
- ${RELOCATING+PROVIDE (__sbss_start = .);}
+ ${RELOCATING+PROVIDE (__sbss_start = .);}
${RELOCATING+*(.sbss)}
${RELOCATING+*(.sbss.*)}
${RELOCATING+*(.gnu.linkonce.sb.*)}
${RELOCATING+ . = ALIGN(4);}
${RELOCATING+ _fbss = .;}
.bss : {
- ${RELOCATING+PROVIDE (__bss_start = .);}
+ ${RELOCATING+PROVIDE (__bss_start = .);}
${RELOCATING+*(.bss)}
${RELOCATING+*(.bss.*)}
${RELOCATING+*(.gnu.linkonce.b.*)}
${RELOCATING+*(COMMON)}
${RELOCATING+. = ALIGN(. != 0 ? 4 : 1);}
-
+
${RELOCATING+PROVIDE (__bss_end = .);}
}
${RELOCATING+ _heap_start = .;}
${RELOCATING+ . += _HEAP_SIZE;}
${RELOCATING+ _heap_end = .;}
- }
+ }
${RELOCATING+ . = ALIGN(4);}
${RELOCATING+ _end = .;}
}
- .tdata : {
+ .tdata : {
${RELOCATING+*(.tdata)}
${RELOCATING+*(.tdata.*)}
${RELOCATING+*(.gnu.linkonce.td.*)}
}
- .tbss : {
+ .tbss : {
${RELOCATING+*(.tbss)}
${RELOCATING+*(.tbss.*)}
${RELOCATING+*(.gnu.linkonce.tb.*)}
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
# .data section.
# OTHER_BSS_SYMBOLS - symbols that appear at the start of the
# .bss section besides __bss_start.
-# EMBEDDED - whether this is for an embedded system.
+# EMBEDDED - whether this is for an embedded system.
#
# When adding sections, do note that the names of some sections are used
# when specifying the start address of the next.
if [ -z "$MACHINE" ]; then OUTPUT_ARCH=${ARCH}; else OUTPUT_ARCH=${ARCH}:${MACHINE}; fi
test "$LD_FLAG" = "N" && DATA_ADDR=.
-CTOR=".ctors ${CONSTRUCTING-0} :
+CTOR=".ctors ${CONSTRUCTING-0} :
{
${CONSTRUCTING+ PROVIDE (__CTOR_LIST__ = .); }
${CONSTRUCTING+${CTOR_START}}
Bootstrap 0x00c0
Test 0xbfc0
- In general, the vectors address is 0xffc0. This can be overriden
+ In general, the vectors address is 0xffc0. This can be overriden
with the '-defsym vectors_addr=0xbfc0' ld option.
Note: for the bootstrap mode, the interrupt vectors are at 0xbfc0 but
${RELOCATING+*(.rela.gnu.linkonce.s.*)}
}
.rel.sbss ${RELOCATING-0} :
- {
+ {
*(.rel.sbss)
${RELOCATING+*(.rel.sbss.*)}
${RELOCATING+*(.rel.gnu.linkonce.sb.*)}
${RELOCATING+*(.rela.sbss.*)}
${RELOCATING+*(.rel.gnu.linkonce.sb.*)}
}
- .rel.bss ${RELOCATING-0} :
- {
+ .rel.bss ${RELOCATING-0} :
+ {
*(.rel.bss)
${RELOCATING+*(.rel.bss.*)}
${RELOCATING+*(.rel.gnu.linkonce.b.*)}
}
- .rela.bss ${RELOCATING-0} :
- {
+ .rela.bss ${RELOCATING-0} :
+ {
*(.rela.bss)
${RELOCATING+*(.rela.bss.*)}
${RELOCATING+*(.rela.gnu.linkonce.b.*)}
} ${RELOCATING+ > page0}
/* Start of text section. */
- .stext ${RELOCATING-0} :
+ .stext ${RELOCATING-0} :
{
*(.stext)
} ${RELOCATING+ > ${TEXT_MEMORY}}
.init ${RELOCATING-0} :
{
- *(.init)
+ *(.init)
} ${RELOCATING+=${NOP-0}}
${RELOCATING-${INSTALL_RELOC}}
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
# NO_RELA_RELOCS - Don't include .rela.* sections in script
# NON_ALLOC_DYN - Place dynamic sections after data segment.
# TEXT_DYNAMIC - .dynamic in text segment, not data segment.
-# EMBEDDED - whether this is for an embedded system.
+# EMBEDDED - whether this is for an embedded system.
# SHLIB_TEXT_START_ADDR - if set, add to SIZEOF_HEADERS to set
# start address of shared library.
# INPUT_FILES - INPUT command of files to always include
# WRITABLE_RODATA - if set, the .rodata section should be writable
# INIT_START, INIT_END - statements just before and just after
-# combination of .init sections.
+# combination of .init sections.
# FINI_START, FINI_END - statements just before and just after
-# combination of .fini sections.
+# combination of .fini sections.
# STACK_ADDR - start of a .stack section.
# OTHER_SYMBOLS - symbols to place right at the end of the script.
# ETEXT_NAME - name of a symbol for the end of the text section,
#
# plus Xtensa-specific literal sections:
# .literal .gnu.linkonce.literal.foo
-# .lit4 .gnu.linkonce.lit4.foo
+# .lit4 .gnu.linkonce.lit4.foo
#
# plus Xtensa-specific "property table" sections:
# .xt.lit .gnu.linkonce.p.foo
SDATA="/* We want the small data sections together, so single-instruction offsets
can access them all, and initialized data all before uninitialized, so
we can shorten the on-disk segment size. */
- .sdata ${RELOCATING-0} :
+ .sdata ${RELOCATING-0} :
{
${RELOCATING+${SDATA_START_SYMBOLS}}
${CREATE_SHLIB+*(.sdata2 .sdata2.* .gnu.linkonce.s2.*)}
KEEP (*(.fini_array))
${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (${USER_LABEL_PREFIX}__fini_array_end = .);}}
}"
-CTOR=".ctors ${CONSTRUCTING-0} :
+CTOR=".ctors ${CONSTRUCTING-0} :
{
${CONSTRUCTING+${CTOR_START}}
/* gcc uses crtbegin.o to find the start of
.rel.dyn ${RELOCATING-0} :
{
EOF
-sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rela\./d;s/^.*: { *\(.*\)}$/ \1/' $COMBRELOC >> ldscripts/dyntmp.$$
+sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rela\./d;s/^.*: { *\(.*\)}$/ \1/' $COMBRELOC >> ldscripts/dyntmp.$$
cat >> ldscripts/dyntmp.$$ <<EOF
}
.rela.dyn ${RELOCATING-0} :
{
EOF
-sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rel\./d;s/^.*: { *\(.*\)}/ \1/' $COMBRELOC >> ldscripts/dyntmp.$$
+sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rel\./d;s/^.*: { *\(.*\)}/ \1/' $COMBRELOC >> ldscripts/dyntmp.$$
cat >> ldscripts/dyntmp.$$ <<EOF
}
EOF
cat ldscripts/dyntmp.$$
else
if test -z "${NO_REL_RELOCS}"; then
- sed -e '/^[ ]*\.rela\.[^}]*$/,/}/d' -e '/^[ ]*\.rela\./d' ldscripts/dyntmp.$$
+ sed -e '/^[ ]*\.rela\.[^}]*$/,/}/d' -e '/^[ ]*\.rela\./d' ldscripts/dyntmp.$$
fi
if test -z "${NO_RELA_RELOCS}"; then
- sed -e '/^[ ]*\.rel\.[^}]*$/,/}/d' -e '/^[ ]*\.rel\./d' ldscripts/dyntmp.$$
+ sed -e '/^[ ]*\.rel\.[^}]*$/,/}/d' -e '/^[ ]*\.rel\./d' ldscripts/dyntmp.$$
fi
fi
rm -f ldscripts/dyntmp.$$
cat ldscripts/dyntmp.$$
else
if test -z "${NO_REL_RELOCS}"; then
- sed -e '/^[ ]*\.rela\.[^}]*$/,/}/d' -e '/^[ ]*\.rela\./d' ldscripts/dyntmp.$$
+ sed -e '/^[ ]*\.rela\.[^}]*$/,/}/d' -e '/^[ ]*\.rela\./d' ldscripts/dyntmp.$$
fi
if test -z "${NO_RELA_RELOCS}"; then
- sed -e '/^[ ]*\.rel\.[^}]*$/,/}/d' -e '/^[ ]*\.rel\./d' ldscripts/dyntmp.$$
+ sed -e '/^[ ]*\.rel\.[^}]*$/,/}/d' -e '/^[ ]*\.rel\./d' ldscripts/dyntmp.$$
fi
fi
rm -f ldscripts/dyntmp.$$
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
# NO_RELA_RELOCS - Don't include .rela.* sections in script
# NON_ALLOC_DYN - Place dynamic sections after data segment.
# TEXT_DYNAMIC - .dynamic in text segment, not data segment.
-# EMBEDDED - whether this is for an embedded system.
+# EMBEDDED - whether this is for an embedded system.
# SHLIB_TEXT_START_ADDR - if set, add to SIZEOF_HEADERS to set
# start address of shared library.
# INPUT_FILES - INPUT command of files to always include
# WRITABLE_RODATA - if set, the .rodata section should be writable
# INIT_START, INIT_END - statements just before and just after
-# combination of .init sections.
+# combination of .init sections.
# FINI_START, FINI_END - statements just before and just after
-# combination of .fini sections.
+# combination of .fini sections.
# OTHER_SYMBOLS - symbols to place right at the end of the script.
# ETEXT_NAME - name of a symbol for the end of the text section,
# normally etext.
SDATA="/* We want the small data sections together, so single-instruction offsets
can access them all, and initialized data all before uninitialized, so
we can shorten the on-disk segment size. */
- .sdata ${RELOCATING-0} :
+ .sdata ${RELOCATING-0} :
{
${RELOCATING+${SDATA_START_SYMBOLS}}
${CREATE_SHLIB+*(.sdata2 .sdata2.* .gnu.linkonce.s2.*)}
*(.ldata${RELOCATING+ .ldata.* .gnu.linkonce.l.*})
${RELOCATING+. = ALIGN(. != 0 ? ${ALIGNMENT} : 1);}
}"
-CTOR=".ctors ADDR(.text) + SIZEOF(.text) ${CONSTRUCTING-0} :
+CTOR=".ctors ADDR(.text) + SIZEOF(.text) ${CONSTRUCTING-0} :
{
${CONSTRUCTING+${CTOR_START}}
/* gcc uses crtbegin.o to find the start of
KEEP (*(SORT(.ctors.*)))
KEEP (*(.ctors))
${CONSTRUCTING+${CTOR_END}}
- } /*> INTERNAL_RAM*/"
+ } /*> INTERNAL_RAM*/"
DTOR=".dtors ADDR(.ctors) + SIZEOF(.ctors) ${CONSTRUCTING-0} :
{
${CONSTRUCTING+${DTOR_START}}
MEMORY
{
- EXTERNAL_DRAM_0 (WXAI) : ORIGIN = 0x80000000, LENGTH = 0x1000000 /*.text, data, rodata, bss and .stack*/
+ EXTERNAL_DRAM_0 (WXAI) : ORIGIN = 0x80000000, LENGTH = 0x1000000 /*.text, data, rodata, bss and .stack*/
EXTERNAL_DRAM_1 (WXAI) : ORIGIN = 0x81000000, LENGTH = 0x1000000 /*.heap */
-
+
EXTERNAL_SRAM (WXAI) : ORIGIN = 0x92000000, LENGTH = 8K /* small external RAM, used for testing*/
-
+
/* run time lib and crt0*/
RESERVED_CRT0_RAM (WXAI) : ORIGIN = 0, LENGTH = 0x400
-
+
/* user program, per bank usage */
BANK0_SRAM (WXAI) : ORIGIN = LENGTH(RESERVED_CRT0_RAM), LENGTH = 8K - LENGTH(RESERVED_CRT0_RAM)
BANK1_SRAM (WXAI) : ORIGIN = 0x2000, LENGTH = 8K
BANK2_SRAM (WXAI) : ORIGIN = 0x4000, LENGTH = 8K
BANK3_SRAM (WXAI) : ORIGIN = 0x6000, LENGTH = 8K
-
+
/* user program, continious placement */
INTERNAL_RAM (WXAI) : ORIGIN = LENGTH(RESERVED_CRT0_RAM), LENGTH = 32K - LENGTH(RESERVED_CRT0_RAM)
-
- MMR (WAI) : ORIGIN = 0xF000, LENGTH = 32K
-
- /* multi cores space */
+
+ MMR (WAI) : ORIGIN = 0xF000, LENGTH = 32K
+
+ /* multi cores space */
CORE_0x20_0x24_INTERNAL_RAM : ORIGIN = 0x82400000+LENGTH(RESERVED_CRT0_RAM), LENGTH = 32K- LENGTH(RESERVED_CRT0_RAM)
CORE_0x20_0x25_INTERNAL_RAM : ORIGIN = 0x82500000+LENGTH(RESERVED_CRT0_RAM), LENGTH = 32K- LENGTH(RESERVED_CRT0_RAM)
CORE_0x20_0x26_INTERNAL_RAM : ORIGIN = 0x82600000+LENGTH(RESERVED_CRT0_RAM), LENGTH = 32K- LENGTH(RESERVED_CRT0_RAM)
CORE_0x23_0x26_INTERNAL_RAM : ORIGIN = 0x8e600000+LENGTH(RESERVED_CRT0_RAM), LENGTH = 32K- LENGTH(RESERVED_CRT0_RAM)
CORE_0x23_0x27_INTERNAL_RAM : ORIGIN = 0x8e700000+LENGTH(RESERVED_CRT0_RAM), LENGTH = 32K- LENGTH(RESERVED_CRT0_RAM)
CORE_0x24_0x24_INTERNAL_RAM : ORIGIN = 0x82000000+LENGTH(RESERVED_CRT0_RAM), LENGTH = 32K- LENGTH(RESERVED_CRT0_RAM)
-
+
}
IVT 0 : {*.o(IVT) } > RESERVED_CRT0_RAM
RESERVED_CRT0 : {*.o(RESERVED_CRT0) } > RESERVED_CRT0_RAM
RESERVED_CRT0 : {*.o(reserved_crt0) } > RESERVED_CRT0_RAM
-
+
CORE_RAM_0 : {*.o(core_ram_0) } > BANK0_SRAM
CORE_RAM_1 : {*.o(core_ram_1) } > BANK1_SRAM
CORE_RAM_2 : {*.o(core_ram_2) } > BANK2_SRAM
CORE_RAM_3 : {*.o(core_ram_3) } > BANK3_SRAM
-
+
SRAM_SOUTH : {*.o(sram) } > EXTERNAL_SRAM
DRAM_WEST : {*.o(dram) } > EXTERNAL_DRAM_1
-
+
CORE_INTERNAL : {*.o(core_ram_internal) } /*> INTERNAL_RAM*/
-
+
/* the newlib (libc and libm) library is maped to the dedicated section */
-
+
__new_lib_start_external_ = ( ORIGIN(EXTERNAL_DRAM_0) + __PROG_SIZE_FOR_CORE__ *__CORE_NUM_ );
__new_lib_start_ = DEFINED(__USE_INTERNAL_MEM_FOR_NEW_LIB_) ? ORIGIN(BANK1_SRAM) : __new_lib_start_external_ ;
-
+
NEW_LIB_RO ${RELOCATING+__new_lib_start_} : { lib_a-*.o(.text .rodata ) *.o(libgloss_epiphany) } /* > INTERNAL_RAM*/
- GNU_C_BUILTIN_LIB_RO ADDR(NEW_LIB_RO) + SIZEOF(NEW_LIB_RO) : {
- *mulsi3.o(.text .rodata) *modsi3.o(.text .rodata)
- *divsi3.o(.text .rodata) *udivsi3.o(.text .rodata)
- *umodsi3.o(.text .rodata) _*.o(.text .rodata)
- }
-
- NEW_LIB_WR ADDR(GNU_C_BUILTIN_LIB_RO) + SIZEOF(GNU_C_BUILTIN_LIB_RO) : { lib_a-*.o(.data ) } /* > INTERNAL_RAM*/
-
-
- __init_start = DEFINED(__USE_INTERNAL_MEM_) ? ORIGIN(BANK1_SRAM) : (ADDR(NEW_LIB_WR) + SIZEOF(NEW_LIB_WR) ) ;
+ GNU_C_BUILTIN_LIB_RO ADDR(NEW_LIB_RO) + SIZEOF(NEW_LIB_RO) : {
+ *mulsi3.o(.text .rodata) *modsi3.o(.text .rodata)
+ *divsi3.o(.text .rodata) *udivsi3.o(.text .rodata)
+ *umodsi3.o(.text .rodata) _*.o(.text .rodata)
+ }
+
+ NEW_LIB_WR ADDR(GNU_C_BUILTIN_LIB_RO) + SIZEOF(GNU_C_BUILTIN_LIB_RO) : { lib_a-*.o(.data ) } /* > INTERNAL_RAM*/
+
+
+ __init_start = DEFINED(__USE_INTERNAL_MEM_) ? ORIGIN(BANK1_SRAM) : (ADDR(NEW_LIB_WR) + SIZEOF(NEW_LIB_WR) ) ;
__init_start = DEFINED(__USE_INTERNAL_MEM_FOR_NEW_LIB_) ? ADDR(NEW_LIB_WR) + SIZEOF(NEW_LIB_WR) : __init_start;
-
+
/* Read-only sections, merged into text segment: */
/*${CREATE_SHLIB-${CREATE_PIE-${RELOCATING+PROVIDE (__executable_start = ${TEXT_START_ADDR}); . = ${TEXT_BASE_ADDRESS};}}}*/
.rel.dyn ${RELOCATING-0} :
{
EOF
-sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rela\./d;s/^.*: { *\(.*\)}$/ \1/' $COMBRELOC >> ldscripts/dyntmp.$$
+sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rela\./d;s/^.*: { *\(.*\)}$/ \1/' $COMBRELOC >> ldscripts/dyntmp.$$
cat >> ldscripts/dyntmp.$$ <<EOF
}
.rela.dyn ${RELOCATING-0} :
{
EOF
-sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rel\./d;s/^.*: { *\(.*\)}/ \1/' $COMBRELOC >> ldscripts/dyntmp.$$
+sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rel\./d;s/^.*: { *\(.*\)}/ \1/' $COMBRELOC >> ldscripts/dyntmp.$$
cat >> ldscripts/dyntmp.$$ <<EOF
}
EOF
cat ldscripts/dyntmp.$$
else
if test -z "${NO_REL_RELOCS}"; then
- sed -e '/^[ ]*\.rela\.[^}]*$/,/}/d' -e '/^[ ]*\.rela\./d' ldscripts/dyntmp.$$
+ sed -e '/^[ ]*\.rela\.[^}]*$/,/}/d' -e '/^[ ]*\.rela\./d' ldscripts/dyntmp.$$
fi
if test -z "${NO_RELA_RELOCS}"; then
- sed -e '/^[ ]*\.rel\.[^}]*$/,/}/d' -e '/^[ ]*\.rel\./d' ldscripts/dyntmp.$$
+ sed -e '/^[ ]*\.rel\.[^}]*$/,/}/d' -e '/^[ ]*\.rel\./d' ldscripts/dyntmp.$$
fi
fi
rm -f ldscripts/dyntmp.$$
fi
cat <<EOF
-
- .init __init_start :
- {
+
+ .init __init_start :
+ {
${RELOCATING+${INIT_START}}
KEEP (*(.init))
${RELOCATING+${INIT_END}}
${TEXT_PLT+${PLT}}
${TINY_READONLY_SECTION}
-
+
.fini ${RELOCATING+ADDR(.init)+SIZEOF(.init)} ${RELOCATING-0} :
{
${RELOCATING+${FINI_START}}
KEEP (*(.fini))
${RELOCATING+${FINI_END}}
} /*> INTERNAL_RAM*/ =${NOP-0}
-
+
.text ${RELOCATING+ADDR(.fini)+SIZEOF(.fini)} ${RELOCATING-0} :
{
${RELOCATING+${TEXT_START_SYMBOLS}}
${RELOCATING+PROVIDE (_${ETEXT_NAME} = .);}
${RELOCATING+PROVIDE (${ETEXT_NAME} = .);}
${WRITABLE_RODATA-${RODATA}}
- .rodata1 ${RELOCATING-0} : { *(.rodata1) }
+ .rodata1 ${RELOCATING-0} : { *(.rodata1) }
${CREATE_SHLIB-${SDATA2}}
${CREATE_SHLIB-${SBSS2}}
${OTHER_READONLY_SECTIONS}
${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (${USER_LABEL_PREFIX}__preinit_array_start = .);}}
KEEP (*(.preinit_array))
${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (${USER_LABEL_PREFIX}__preinit_array_end = .);}}
- }
+ }
.init_array ${RELOCATING-0} :
{
${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (${USER_LABEL_PREFIX}__init_array_start = .);}}
KEEP (*(SORT(.init_array.*)))
KEEP (*(.init_array))
${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (${USER_LABEL_PREFIX}__init_array_end = .);}}
- }
+ }
.fini_array ${RELOCATING-0} :
{
${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (${USER_LABEL_PREFIX}__fini_array_start = .);}}
KEEP (*(.fini_array))
KEEP (*(SORT(.fini_array.*)))
${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (${USER_LABEL_PREFIX}__fini_array_end = .);}}
- }
+ }
${SMALL_DATA_CTOR-${RELOCATING+${CTOR}}}
${SMALL_DATA_DTOR-${RELOCATING+${DTOR}}}
.jcr ${RELOCATING-0} : { KEEP (*(.jcr)) }
*(.data${RELOCATING+ .data.* .gnu.linkonce.d.*})
${CONSTRUCTING+SORT(CONSTRUCTORS)}
} /*> INTERNAL_RAM*/
- .data1 ${RELOCATING-0} : { *(.data1) }
+ .data1 ${RELOCATING-0} : { *(.data1) }
${WRITABLE_RODATA+${RODATA}}
${OTHER_READWRITE_SECTIONS}
${SMALL_DATA_CTOR+${RELOCATING+${CTOR}}}
cat ldscripts/dyntmp.$$
else
if test -z "${NO_REL_RELOCS}"; then
- sed -e '/^[ ]*\.rela\.[^}]*$/,/}/d' -e '/^[ ]*\.rela\./d' ldscripts/dyntmp.$$
+ sed -e '/^[ ]*\.rela\.[^}]*$/,/}/d' -e '/^[ ]*\.rela\./d' ldscripts/dyntmp.$$
fi
if test -z "${NO_RELA_RELOCS}"; then
- sed -e '/^[ ]*\.rel\.[^}]*$/,/}/d' -e '/^[ ]*\.rel\./d' ldscripts/dyntmp.$$
+ sed -e '/^[ ]*\.rel\.[^}]*$/,/}/d' -e '/^[ ]*\.rel\./d' ldscripts/dyntmp.$$
fi
fi
rm -f ldscripts/dyntmp.$$
# Linker script for PE.
#
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
SECTIONS
{
- .text ${RELOCATING+ __image_base__ + __section_alignment__ } :
+ .text ${RELOCATING+ __image_base__ + __section_alignment__ } :
{
${RELOCATING+ *(.init)}
*(.text)
*(.glue_7t)
*(.glue_7)
${RELOCATING+ *(.text.*)}
- ${CONSTRUCTING+ ___CTOR_LIST__ = .; __CTOR_LIST__ = . ;
+ ${CONSTRUCTING+ ___CTOR_LIST__ = .; __CTOR_LIST__ = . ;
LONG (-1); *(.ctors); *(.ctor); LONG (0); }
- ${CONSTRUCTING+ ___DTOR_LIST__ = .; __DTOR_LIST__ = . ;
+ ${CONSTRUCTING+ ___DTOR_LIST__ = .; __DTOR_LIST__ = . ;
LONG (-1); *(.dtors); *(.dtor); LONG (0); }
${RELOCATING+ *(.fini)}
/* ??? Why is .gcc_exc here? */
breaks building the cygwin32 dll. Instead, we name the section
".data_cygwin_nocopy" and explicitly include it after __data_end__. */
- .data ${RELOCATING+BLOCK(__section_alignment__)} :
+ .data ${RELOCATING+BLOCK(__section_alignment__)} :
{
${RELOCATING+__data_start__ = . ;}
*(.data)
See pe.em:sort_sections. */
${R_IDATA}
}
-
+
.CRT ${RELOCATING+BLOCK(__section_alignment__)} :
- {
+ {
${R_CRT}
}
}
.reloc ${RELOCATING+BLOCK(__section_alignment__)} :
- {
+ {
*(.reloc)
}
.rsrc ${RELOCATING+BLOCK(__section_alignment__)} :
- {
+ {
*(.rsrc)
${R_RSRC}
}
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
} ${RELOCATING+ > vectors}
.init :
- {
+ {
*(.init)
} ${RELOCATING+ > ram}
*(.text)
*(.text.*)
*(.strings)
- ${RELOCATING+ _etext = . ; }
+ ${RELOCATING+ _etext = . ; }
} ${RELOCATING+ > ram}
${CONSTRUCTING+${TORS}}
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
*(.rodata)
*(.text)
*(.strings)
- ${RELOCATING+ _etext = . ; }
+ ${RELOCATING+ _etext = . ; }
} ${RELOCATING+ > ram}
${CONSTRUCTING+${TORS}}
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
*(.rodata)
*(.text)
*(.strings)
- ${RELOCATING+ _etext = . ; }
+ ${RELOCATING+ _etext = . ; }
} ${RELOCATING+ > ram}
${CONSTRUCTING+${TORS}}
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
*(.rodata)
*(.text)
*(.strings)
- ${RELOCATING+ _etext = . ; }
+ ${RELOCATING+ _etext = . ; }
} ${RELOCATING+ > ram}
${CONSTRUCTING+${TORS}}
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
*(.rodata)
*(.text)
*(.strings)
- ${RELOCATING+ _etext = . ; }
+ ${RELOCATING+ _etext = . ; }
} ${RELOCATING+ > ram}
${CONSTRUCTING+${TORS}}
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
*(.rodata)
*(.text)
*(.strings)
- ${RELOCATING+ _etext = . ; }
+ ${RELOCATING+ _etext = . ; }
} ${RELOCATING+ > ram}
${CONSTRUCTING+${TORS}}
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
*(.rodata)
*(.text)
*(.strings)
- ${RELOCATING+ _etext = . ; }
+ ${RELOCATING+ _etext = . ; }
} ${RELOCATING+ > ram}
${CONSTRUCTING+${TORS}}
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
# Linker script for PE.
#
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
${RELOCATING+__ldused = .;}
SECTIONS
{
- .text ${RELOCATING+ __image_base__ + __section_alignment__ } :
+ .text ${RELOCATING+ __image_base__ + __section_alignment__ } :
{
${RELOCATING+ __text_start__ = . ;}
${RELOCATING+ *(.init)}
${R_TEXT}
*(.glue_7t)
*(.glue_7)
- ${CONSTRUCTING+ ___CTOR_LIST__ = .; __CTOR_LIST__ = . ;
+ ${CONSTRUCTING+ ___CTOR_LIST__ = .; __CTOR_LIST__ = . ;
LONG (-1); *(.ctors); *(.ctor); LONG (0); }
- ${CONSTRUCTING+ ___DTOR_LIST__ = .; __DTOR_LIST__ = . ;
+ ${CONSTRUCTING+ ___DTOR_LIST__ = .; __DTOR_LIST__ = . ;
LONG (-1); *(.dtors); *(.dtor); LONG (0); }
${RELOCATING+ *(.fini)}
/* ??? Why is .gcc_exc here? */
breaks building the cygwin32 dll. Instead, we name the section
".data_cygwin_nocopy" and explicitly include it after __data_end__. */
- .data ${RELOCATING+BLOCK(__section_alignment__)} :
+ .data ${RELOCATING+BLOCK(__section_alignment__)} :
{
${RELOCATING+__data_start__ = . ;}
*(.data)
${R_IDATA}
}
.CRT ${RELOCATING+BLOCK(__section_alignment__)} :
- {
+ {
${R_CRT}
}
}
.reloc ${RELOCATING+BLOCK(__section_alignment__)} :
- {
+ {
*(.reloc)
}
.rsrc ${RELOCATING+BLOCK(__section_alignment__)} :
- {
+ {
*(.rsrc)
${R_RSRC}
}
.exc ${RELOCATING+BLOCK(__section_alignment__)} :
- {
+ {
*(.exc)
${R_EXC}
}
# Ian Taylor <ian@cygnus.com>.
#
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
${RELOCATING+ edata = .};
}
.bss ${RELOCATING+ SIZEOF(.data) + ADDR(.data)} :
- {
+ {
*(.bss)
*(COMMON)
${RELOCATING+ end = .};
}
${RELOCATING- ${INIT}}
${RELOCATING- ${FINI}}
- .stab 0 ${RELOCATING+(NOLOAD)} :
+ .stab 0 ${RELOCATING+(NOLOAD)} :
{
[ .stab ]
}
# Linker script for i386 go32 (DJGPP)
#
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
${CONSTRUCTING+${RELOCATING-$CTOR}}
${CONSTRUCTING+${RELOCATING-$DTOR}}
.bss ${RELOCATING+ SIZEOF(.data) + ADDR(.data)} :
- {
+ {
*(.bss${RELOCATING+ .bss.* .gnu.linkonce.b.*})
*(COMMON)
${RELOCATING+ end = . ; PROVIDE(_end = .) ;}
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
OUTPUT_FORMAT("${OUTPUT_FORMAT}")
${LIB_SEARCH_DIRS}
-PROVIDE (__stack = 0);
+PROVIDE (__stack = 0);
SECTIONS
{
.text ${RELOCATING+ 0x1000000} : {
*(.data)
${RELOCATING+ edata = .};
}
- .bss : {
+ .bss : {
${RELOCATING+ __bss_start = .};
*(.bss)
*(COMMON)
${RELOCATING+ end = ALIGN(0x8)};
${RELOCATING+ _end = ALIGN(0x8)};
}
- .stab 0 ${RELOCATING+(NOLOAD)} :
+ .stab 0 ${RELOCATING+(NOLOAD)} :
{
[ .stab ]
}
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
notice and this notice are preserved. */
SECTIONS
-{
- .text :
- {
+{
+ .text :
+ {
${GLD_STYLE+ CREATE_OBJECT_SYMBOLS}
- *(.text)
+ *(.text)
${RELOCATING+ _etext = .};
${CONSTRUCTING+${COFF_CTORS}}
- }
+ }
.data :
- {
- *(.data)
+ {
+ *(.data)
${CONSTRUCTING+CONSTRUCTORS}
${RELOCATING+ _edata = .};
- }
+ }
.bss :
- {
+ {
${RELOCATING+ _bss_start = .};
- *(.bss)
- *(COMMON)
+ *(.bss)
+ *(COMMON)
${RELOCATING+ _end = .};
- }
-}
+ }
+}
EOF
# Tristan Gingold <gingold@adacore.com>.
#
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
. $srcdir/scripttempl/DWARF.sc
-cat <<EOF
+cat <<EOF
.note : { *(.vms.note) }
/DISCARD/ : { *(.note) *(.vms_display_name_info) }
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
MEMORY
{
D_GPR : org = 0x01000080, len = 128
- D_RAM : org = 0x01000100, len = 4K - 256
- P_RAM : org = 0x02000000, len = 16K
- P_ROM : org = 0x02010000, len = 64K - 32
- P_RESET : org = 0x0201FFE0, len = 32
- P_CONFIG : org = 0x02020000, len = 128
+ D_RAM : org = 0x01000100, len = 4K - 256
+ P_RAM : org = 0x02000000, len = 16K
+ P_ROM : org = 0x02010000, len = 64K - 32
+ P_RESET : org = 0x0201FFE0, len = 32
+ P_CONFIG : org = 0x02020000, len = 128
}
SECTIONS
/* PRAM overlay code. */
__pram_overlay_run_start = (__pram_end + 1) & 0xFFFFFFFE;
- __pram_overlay_load_start = (__flash_end + 1) & 0xFFFFFFFE;
+ __pram_overlay_load_start = (__flash_end + 1) & 0xFFFFFFFE;
OVERLAY __pram_overlay_run_start : AT (__pram_overlay_load_start)
{
.pram1 { */overlay1/* (.pram); * (.pram1) }
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
# DATA_PLT - .plt should be in data segment, not text segment.
# BSS_PLT - .plt should be in bss segment
# TEXT_DYNAMIC - .dynamic in text segment, not data segment.
-# EMBEDDED - whether this is for an embedded system.
+# EMBEDDED - whether this is for an embedded system.
# SHLIB_TEXT_START_ADDR - if set, add to SIZEOF_HEADERS to set
# start address of shared library.
# INPUT_FILES - INPUT command of files to always include
# WRITABLE_RODATA - if set, the .rodata section should be writable
# INIT_START, INIT_END - statements just before and just after
-# combination of .init sections.
+# combination of .init sections.
# FINI_START, FINI_END - statements just before and just after
-# combination of .fini sections.
+# combination of .fini sections.
#
# When adding sections, do note that the names of some sections are used
# when specifying the start address of the next.
test -z "${ELFSIZE}" && ELFSIZE=32
test -z "${ALIGNMENT}" && ALIGNMENT="${ELFSIZE} / 8"
test "$LD_FLAG" = "N" && DATA_ADDR=.
-INTERP=".interp ${RELOCATING-0} : { *(.interp) }"
+INTERP=".interp ${RELOCATING-0} : { *(.interp) }"
PLT=".plt ${RELOCATING-0} : { *(.plt) }"
DYNAMIC=".dynamic ${RELOCATING-0} : { *(.dynamic) }"
RODATA=".rodata ${RELOCATING-0} : { *(.rodata) ${RELOCATING+*(.rodata.*)} ${RELOCATING+*(.gnu.linkonce.r.*)} }"
SBSS2=".sbss2 ${RELOCATING-0} : { *(.sbss2) ${RELOCATING+*(.sbss2.*)} ${RELOCATING+*(.gnu.linkonce.sb2.*)} }"
SDATA2=".sdata2 ${RELOCATING-0} : { *(.sdata2) ${RELOCATING+*(.sdata2.*)} ${RELOCATING+*(.gnu.linkonce.s2.*)} }"
-CTOR=".ctors ${CONSTRUCTING-0} :
+CTOR=".ctors ${CONSTRUCTING-0} :
{
${CONSTRUCTING+${CTOR_START}}
/* gcc uses crtbegin.o to find the start of
${RELOCATING+*(.rela.gnu.linkonce.s.*)}
}
.rel.sbss ${RELOCATING-0} :
- {
+ {
*(.rel.sbss)
${RELOCATING+*(.rel.sbss.*)}
${RELOCATING+*(.rel.gnu.linkonce.sb.*)}
${RELOCATING+*(.rela.sbss.*)}
${RELOCATING+*(.rela.gnu.linkonce.sb.*)}
}
- .rel.sdata2 ${RELOCATING-0} :
- {
+ .rel.sdata2 ${RELOCATING-0} :
+ {
*(.rel.sdata2)
${RELOCATING+*(.rel.sdata2.*)}
${RELOCATING+*(.rel.gnu.linkonce.s2.*)}
}
- .rela.sdata2 ${RELOCATING-0} :
+ .rela.sdata2 ${RELOCATING-0} :
{
*(.rela.sdata2)
${RELOCATING+*(.rela.sdata2.*)}
${RELOCATING+*(.rela.gnu.linkonce.s2.*)}
}
- .rel.sbss2 ${RELOCATING-0} :
- {
- *(.rel.sbss2)
+ .rel.sbss2 ${RELOCATING-0} :
+ {
+ *(.rel.sbss2)
${RELOCATING+*(.rel.sbss2.*)}
${RELOCATING+*(.rel.gnu.linkonce.sb2.*)}
}
- .rela.sbss2 ${RELOCATING-0} :
- {
- *(.rela.sbss2)
+ .rela.sbss2 ${RELOCATING-0} :
+ {
+ *(.rela.sbss2)
${RELOCATING+*(.rela.sbss2.*)}
${RELOCATING+*(.rela.gnu.linkonce.sb2.*)}
}
- .rel.bss ${RELOCATING-0} :
- {
+ .rel.bss ${RELOCATING-0} :
+ {
*(.rel.bss)
${RELOCATING+*(.rel.bss.*)}
${RELOCATING+*(.rel.gnu.linkonce.b.*)}
}
- .rela.bss ${RELOCATING-0} :
- {
+ .rela.bss ${RELOCATING-0} :
+ {
*(.rela.bss)
${RELOCATING+*(.rela.bss.*)}
${RELOCATING+*(.rela.gnu.linkonce.b.*)}
.rel.dyn :
{
EOF
-sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rela\./d;s/^.*: { *\(.*\)}$/ \1/' $COMBRELOC
+sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rela\./d;s/^.*: { *\(.*\)}$/ \1/' $COMBRELOC
cat <<EOF
}
.rela.dyn :
{
EOF
-sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rel\./d;s/^.*: { *\(.*\)}/ \1/' $COMBRELOC
+sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rel\./d;s/^.*: { *\(.*\)}/ \1/' $COMBRELOC
cat <<EOF
}
EOF
.rela.plt ${RELOCATING-0} : { *(.rela.plt) }
${OTHER_PLT_RELOC_SECTIONS}
- .init ${RELOCATING-0} :
- {
+ .init ${RELOCATING-0} :
+ {
${RELOCATING+${INIT_START}}
KEEP (*(.init))
${RELOCATING+${INIT_END}}
${CONSTRUCTING+SORT(CONSTRUCTORS)}
}
.data1 ${RELOCATING-0} : { *(.data1) }
- .eh_frame ${RELOCATING-0} :
- {
+ .eh_frame ${RELOCATING-0} :
+ {
${RELOCATING+PROVIDE (__eh_frame_begin = .);}
- *(.eh_frame)
+ *(.eh_frame)
LONG (0);
${RELOCATING+PROVIDE (__eh_frame_end = .);}
} ${RELOCATING+}
/* We want the small data sections together, so single-instruction offsets
can access them all, and initialized data all before uninitialized, so
we can shorten the on-disk segment size. */
- .sdata ${RELOCATING-0} :
+ .sdata ${RELOCATING-0} :
{
${RELOCATING+${SDATA_START_SYMBOLS}}
- *(.sdata)
+ *(.sdata)
${RELOCATING+*(.sdata.*)}
${RELOCATING+*(.gnu.linkonce.s.*)}
}
# Linker script for A/UX.
#
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
OUTPUT_FORMAT("${OUTPUT_FORMAT}")
${LIB_SEARCH_DIRS}
-PROVIDE (__stack = 0);
+PROVIDE (__stack = 0);
SECTIONS
{
.text ${RELOCATING+ 0x1000000} : {
*(.data)
${RELOCATING+ edata = .};
}
- .bss : {
+ .bss : {
${RELOCATING+ __bss_start = .};
*(.bss)
*(COMMON)
${RELOCATING+ end = ALIGN(0x8)};
${RELOCATING+ _end = ALIGN(0x8)};
}
- .stab 0 ${RELOCATING+(NOLOAD)} :
+ .stab 0 ${RELOCATING+(NOLOAD)} :
{
[ .stab ]
}
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
${RELOCATING+ENTRY (__start)}
${RELOCATING+${LIB_SEARCH_DIRS}}
-SECTIONS
-{
+SECTIONS
+{
.text ${RELOCATING+ (0x20007 + SIZEOF_HEADERS) &~ 7} :
{
${RELOCATING+ __.text.start = .};
${RELOCATING+ __.init.start = .};
${RELOCATING+ *(.init)}
${RELOCATING+ __.init.end = .};
- *(.text)
+ *(.text)
${RELOCATING+ __.tdesc_start = .};
${RELOCATING+ *(.tdesc)}
${RELOCATING+ __.text_end = .} ;
${RELOCATING+ *(.fini) }
${RELOCATING+ __.fini_end = .};
${RELOCATING+_etext = .};
- }
+ }
.data ${RELOCATING+ NEXT (0x400000) + ((SIZEOF(.text) + ADDR(.text)) % 0x2000)} :
- {
+ {
*(.data)
${RELOCATING+_edata = .};
- }
+ }
.bss ${RELOCATING+ SIZEOF(.data) + ADDR(.data)} :
- {
- *(.bss)
- *(COMMON)
+ {
+ *(.bss)
+ *(COMMON)
${RELOCATING+ _end = .};
${RELOCATING+ __end = .};
}
${RELOCATING- ${INIT}}
${RELOCATING- ${FINI}}
- .comment 0 ${RELOCATING+(NOLOAD)} :
+ .comment 0 ${RELOCATING+(NOLOAD)} :
{
*(.comment)
}
# Linker script for MCore PE.
#
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
# because bash 2.x will lose the doublequotes.
cat <<EOF
OUTPUT_FORMAT("${OUTPUT_FORMAT}", "${BIG_OUTPUT_FORMAT}",
- "${LITTLE_OUTPUT_FORMAT}")
+ "${LITTLE_OUTPUT_FORMAT}")
EOF
fi
SECTIONS
{
- .text ${RELOCATING+ __image_base__ + __section_alignment__ } :
+ .text ${RELOCATING+ __image_base__ + __section_alignment__ } :
{
${RELOCATING+ *(.init)}
*(.text)
${RELOCATING+ *(.text.*)}
*(.glue_7t)
*(.glue_7)
- ${CONSTRUCTING+ ___CTOR_LIST__ = .; __CTOR_LIST__ = . ;
+ ${CONSTRUCTING+ ___CTOR_LIST__ = .; __CTOR_LIST__ = . ;
LONG (-1); *(.ctors); *(.ctor); LONG (0); }
- ${CONSTRUCTING+ ___DTOR_LIST__ = .; __DTOR_LIST__ = . ;
+ ${CONSTRUCTING+ ___DTOR_LIST__ = .; __DTOR_LIST__ = . ;
LONG (-1); *(.dtors); *(.dtor); LONG (0); }
${RELOCATING+ *(.fini)}
/* ??? Why is .gcc_exc here? */
breaks building the cygwin32 dll. Instead, we name the section
".data_cygwin_nocopy" and explicitly include it after __data_end__. */
- .data ${RELOCATING+BLOCK(__section_alignment__)} :
+ .data ${RELOCATING+BLOCK(__section_alignment__)} :
{
${RELOCATING+__data_start__ = . ;}
*(.data)
${R_IDATA}
}
.CRT ${RELOCATING+BLOCK(__section_alignment__)} :
- {
+ {
${R_CRT}
}
}
.reloc ${RELOCATING+BLOCK(__section_alignment__)} :
- {
+ {
*(.reloc)
}
.rsrc ${RELOCATING+BLOCK(__section_alignment__)} :
- {
+ {
*(.rsrc)
${R_RSRC}
}
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
# PLT_BEFORE_GOT - .plt just before .got when .plt is in data segement.
# BSS_PLT - .plt should be in bss segment
# TEXT_DYNAMIC - .dynamic in text segment, not data segment.
-# EMBEDDED - whether this is for an embedded system.
+# EMBEDDED - whether this is for an embedded system.
# SHLIB_TEXT_START_ADDR - if set, add to SIZEOF_HEADERS to set
# start address of shared library.
# INPUT_FILES - INPUT command of files to always include
# WRITABLE_RODATA - if set, the .rodata section should be writable
# INIT_START, INIT_END - statements just before and just after
-# combination of .init sections.
+# combination of .init sections.
# FINI_START, FINI_END - statements just before and just after
-# combination of .fini sections.
+# combination of .fini sections.
# STACK_ADDR - start of a .stack section.
# OTHER_END_SYMBOLS - symbols to place right at the end of the script.
# SEPARATE_GOTPLT - if set, .got.plt should be separate output section,
SDATA="/* We want the small data sections together, so single-instruction offsets
can access them all, and initialized data all before uninitialized, so
we can shorten the on-disk segment size. */
- .sdata ${RELOCATING-0} :
+ .sdata ${RELOCATING-0} :
{
${RELOCATING+${SDATA_START_SYMBOLS}}
${CREATE_SHLIB+*(.sdata2 .sdata2.* .gnu.linkonce.s2.*)}
NO_SMALL_DATA=" "
fi
test -n "$SEPARATE_GOTPLT" && SEPARATE_GOTPLT=" "
-CTOR=".ctors ${CONSTRUCTING-0} :
+CTOR=".ctors ${CONSTRUCTING-0} :
{
${CONSTRUCTING+${CTOR_START}}
/* gcc uses crtbegin.o to find the start of
.rel.dyn ${RELOCATING-0} :
{
EOF
-sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rela\./d;s/^.*: { *\(.*\)}$/ \1/' $COMBRELOC
+sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rela\./d;s/^.*: { *\(.*\)}$/ \1/' $COMBRELOC
cat <<EOF
}
.rela.dyn ${RELOCATING-0} :
{
EOF
-sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rel\./d;s/^.*: { *\(.*\)}/ \1/' $COMBRELOC
+sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rel\./d;s/^.*: { *\(.*\)}/ \1/' $COMBRELOC
cat <<EOF
}
EOF
.rela.plt ${RELOCATING-0} : { *(.rela.plt) }
${OTHER_PLT_RELOC_SECTIONS}
- .init ${RELOCATING-0} :
- {
+ .init ${RELOCATING-0} :
+ {
${RELOCATING+${INIT_START}}
KEEP (*(.init))
${RELOCATING+${INIT_END}}
# Ian Lance Taylor <ian@cygnus.com>.
#
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
.rel.dyn ${RELOCATING-0} :
{
EOF
-sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rela\./d;/__rela_iplt_/d;s/^.*: { *\(.*\)}$/ \1/' $COMBRELOC >> ldscripts/dyntmp.$$
+sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rela\./d;/__rela_iplt_/d;s/^.*: { *\(.*\)}$/ \1/' $COMBRELOC >> ldscripts/dyntmp.$$
cat >> ldscripts/dyntmp.$$ <<EOF
}
.rela.dyn ${RELOCATING-0} :
{
EOF
-sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rel\./d;/__rel_iplt_/d;s/^.*: { *\(.*\)}/ \1/' $COMBRELOC >> ldscripts/dyntmp.$$
+sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rel\./d;/__rel_iplt_/d;s/^.*: { *\(.*\)}/ \1/' $COMBRELOC >> ldscripts/dyntmp.$$
cat >> ldscripts/dyntmp.$$ <<EOF
}
EOF
cat ldscripts/dyntmp.$$
else
if test -z "${NO_REL_RELOCS}"; then
- sed -e '/^[ ]*\.rela\.[^}]*$/,/}/d;/^[ ]*\.rela\./d;/__rela_iplt_/d' ldscripts/dyntmp.$$
+ sed -e '/^[ ]*\.rela\.[^}]*$/,/}/d;/^[ ]*\.rela\./d;/__rela_iplt_/d' ldscripts/dyntmp.$$
fi
if test -z "${NO_RELA_RELOCS}"; then
- sed -e '/^[ ]*\.rel\.[^}]*$/,/}/d;/^[ ]*\.rel\./d;/__rel_iplt_/d' ldscripts/dyntmp.$$
+ sed -e '/^[ ]*\.rel\.[^}]*$/,/}/d;/^[ ]*\.rel\./d;/__rel_iplt_/d' ldscripts/dyntmp.$$
fi
fi
rm -f ldscripts/dyntmp.$$
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
test -z "${BIG_OUTPUT_FORMAT}" && BIG_OUTPUT_FORMAT=${OUTPUT_FORMAT}
test -z "${LITTLE_OUTPUT_FORMAT}" && LITTLE_OUTPUT_FORMAT=${OUTPUT_FORMAT}
test "$LD_FLAG" = "N" && DATA_ADDR=.
-INTERP=".interp ${RELOCATING-0} : { *(.interp) }"
-PLT=".plt ${RELOCATING-0} : { *(.plt) }"
+INTERP=".interp ${RELOCATING-0} : { *(.interp) }"
+PLT=".plt ${RELOCATING-0} : { *(.plt) }"
cat <<EOF
/* Copyright (C) 2014-2017 Free Software Foundation, Inc.
.dynsym ${RELOCATING-0} : { *(.dynsym) }
.dynstr ${RELOCATING-0} : { *(.dynstr) }
.rel.text ${RELOCATING-0} : { *(.rel.text) }
- .rela.text ${RELOCATING-0} : { *(.rela.text) }
+ .rela.text ${RELOCATING-0} : { *(.rela.text) }
.rel.data ${RELOCATING-0} : { *(.rel.data) }
- .rela.data ${RELOCATING-0} : { *(.rela.data) }
- .rel.rodata ${RELOCATING-0} : { *(.rel.rodata) }
- .rela.rodata ${RELOCATING-0} : { *(.rela.rodata) }
+ .rela.data ${RELOCATING-0} : { *(.rela.data) }
+ .rel.rodata ${RELOCATING-0} : { *(.rel.rodata) }
+ .rela.rodata ${RELOCATING-0} : { *(.rela.rodata) }
.rel.got ${RELOCATING-0} : { *(.rel.got) }
.rela.got ${RELOCATING-0} : { *(.rela.got) }
.rel.ctors ${RELOCATING-0} : { *(.rel.ctors) }
# Linker script for PE.
#
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
R_TEXT='*(SORT(.text$*))'
if test "x$LD_FLAG" = "xauto_import" ; then
R_DATA='*(SORT(.data$*))
- *(.rdata)
+ *(.rdata)
*(SORT(.rdata$*))'
R_RDATA=''
else
R_DATA='*(SORT(.data$*))'
R_RDATA='*(.rdata)
- *(SORT(.rdata$*))'
+ *(SORT(.rdata$*))'
fi
R_IDATA234='
KEEP (SORT(*)(.idata$2))
${R_IDATA67}
}
.CRT ${RELOCATING+BLOCK(__section_alignment__)} :
- {
+ {
${RELOCATING+___crt_xc_start__ = . ;}
${R_CRT_XC}
${RELOCATING+___crt_xc_end__ = . ;}
be at the beginning of the section to enable SECREL32 relocations with TLS
data. */
.tls ${RELOCATING+BLOCK(__section_alignment__)} :
- {
+ {
${RELOCATING+___tls_start__ = . ;}
${R_TLS}
${RELOCATING+___tls_end__ = . ;}
# Linker script for PE.
#
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
R_TEXT='*(SORT(.text$*))'
if test "x$LD_FLAG" = "xauto_import" ; then
R_DATA='*(SORT(.data$*))
- *(.rdata)
+ *(.rdata)
*(SORT(.rdata$*))'
R_RDATA=''
else
R_DATA='*(SORT(.data$*))'
R_RDATA='*(.rdata)
- *(SORT(.rdata$*))'
+ *(SORT(.rdata$*))'
fi
R_IDATA234='
KEEP (SORT(*)(.idata$2))
${R_IDATA67}
}
.CRT ${RELOCATING+BLOCK(__section_alignment__)} :
- {
+ {
${RELOCATING+___crt_xc_start__ = . ;}
${R_CRT_XC}
${RELOCATING+___crt_xc_end__ = . ;}
be at the beginning of the section to enable SECREL32 relocations with TLS
data. */
.tls ${RELOCATING+BLOCK(__section_alignment__)} :
- {
+ {
${RELOCATING+___tls_start__ = . ;}
${R_TLS}
${RELOCATING+___tls_end__ = . ;}
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
# All new mistakes should be credited to Kim Knuttila (krk@cygnus.com)
#
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
/* Much of this layout was determined by delving into .exe files for
the box generated by other compilers/linkers/etc. This means that
- if a particular feature did not happen to appear in one of the
+ if a particular feature did not happen to appear in one of the
subject files, then it may not be yet supported.
*/
/* It's "mainCRTStartup", not "_mainCRTStartup", and it's located in
one of the two .lib files (libc.lib and kernel32.lib) that currently
- must be present on the link line. This means that you must use
+ must be present on the link line. This means that you must use
"-u mainCRTStartup" to make sure it gets included in the link.
*/
{
/* text - the usual meaning */
- .text ${RELOCATING+ __image_base__ + __section_alignment__ } :
+ .text ${RELOCATING+ __image_base__ + __section_alignment__ } :
{
${RELOCATING+ *(.init);}
*(.text)
${RELOCATING+ *(.text.*)}
*(.gcc_except_table)
- ${CONSTRUCTING+ ___CTOR_LIST__ = .; __CTOR_LIST__ = . ;
- LONG (-1); *(.ctors); *(.ctor); LONG (0); }
- ${CONSTRUCTING+ ___DTOR_LIST__ = .; __DTOR_LIST__ = . ;
- LONG (-1); *(.dtors); *(.dtor); LONG (0); }
+ ${CONSTRUCTING+ ___CTOR_LIST__ = .; __CTOR_LIST__ = . ;
+ LONG (-1); *(.ctors); *(.ctor); LONG (0); }
+ ${CONSTRUCTING+ ___DTOR_LIST__ = .; __DTOR_LIST__ = . ;
+ LONG (-1); *(.dtors); *(.dtor); LONG (0); }
${RELOCATING+ *(.fini);}
- ${RELOCATING+ etext = .};
+ ${RELOCATING+ etext = .};
}
/* rdata - Read Only Runtime Data
- CTR sections: All of the CRT (read only C runtime data) sections
- appear at the start of the .rdata (read only runtime data)
+ CTR sections: All of the CRT (read only C runtime data) sections
+ appear at the start of the .rdata (read only runtime data)
section, in the following order. Don't know if it matters or not.
Not all sections are always present either.
.rdata: compiler generated read only data
.edata BLOCK(__section_alignment__) :
{
- *(.edata);
+ *(.edata);
}
/* data - initialized data
section, as opposed to being given a section of it's own.
COMMON:
*/
- .data BLOCK(__section_alignment__) :
+ .data BLOCK(__section_alignment__) :
{
- __data_start__ = . ;
+ __data_start__ = . ;
*(.ydata);
*(.data);
*(.data2);
*(COMMON);
__bss_end__ = . ;
${RELOCATING+ end = .};
- __data_end__ = . ;
+ __data_end__ = . ;
}
/* The exception handling table. A sequence of 5 word entries. Section
address and extent are placed in the DataDirectory.
*/
.pdata BLOCK(__section_alignment__) :
- {
+ {
*(.pdata)
- ;
+ ;
}
- /* The idata section is chock full of magic bits.
+ /* The idata section is chock full of magic bits.
1. Boundaries around various idata parts are used to initialize
some of the fields of the DataDirectory. In particular, the
magic for 2, 4 and 5 are known to be used. Some compilers
The ".private.toc" sections are generated by the ppc bfd. The
.toc variable is generated by gas, and resolved here. It is
used to initialized function descriptors (and anyone else who
- needs the address of the module's toc). The only thing
+ needs the address of the module's toc). The only thing
interesting about it at all? Most ppc instructions using it
have a 16bit displacement field. The convention for addressing
is to initialize the .toc value to 32K past the start of the
on this number or you get pretty stupid results.
*/
.idata BLOCK(__section_alignment__) :
- {
+ {
__idata2_magic__ = .;
*(.idata\$2);
__idata3_magic__ = .;
/* reldata -- data that requires relocation
*/
.reldata BLOCK(__section_alignment__) :
- {
+ {
*(.reldata)
- ;
+ ;
}
/* Resources */
.rsrc BLOCK(__section_alignment__) :
- {
+ {
*(.rsrc\$01)
*(.rsrc\$02)
;
}
- .stab BLOCK(__section_alignment__) ${RELOCATING+(NOLOAD)} :
+ .stab BLOCK(__section_alignment__) ${RELOCATING+(NOLOAD)} :
{
[ .stab ]
}
[ .stabstr ]
}
- /* The .reloc section is currently generated by the dlltool from Steve
+ /* The .reloc section is currently generated by the dlltool from Steve
Chamberlain in a second pass of linking. Section address and extent
are placed in the DataDirectory.
*/
.reloc BLOCK(__section_alignment__) :
- {
+ {
*(.reloc)
;
}
/* We don't do anything useful with codeview debugger support or the
- directive section (yet). Hopefully, we junk them correctly.
+ directive section (yet). Hopefully, we junk them correctly.
*/
- /DISCARD/ BLOCK(__section_alignment__) :
+ /DISCARD/ BLOCK(__section_alignment__) :
{
- *(.debug\$S)
- *(.debug\$T)
- *(.debug\$F)
- *(.drectve)
- ;
- }
+ *(.debug\$S)
+ *(.debug\$T)
+ *(.debug\$F)
+ *(.drectve)
+ ;
+ }
}
EOF
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
${RELOCATING+ PROVIDE(_edata = .);}
}
.bss ${RELOCATING:-0} :
- {
+ {
${RELOCATING+ PROVIDE(__bss = .);}
*(.bss);
*(zerovars);
${RELOCATING+ PROVIDE(_end = .);}
${RELOCATING+ PROVIDE(_FreeMemStart = .);}
}
- .stab 0 ${RELOCATING+(NOLOAD)} :
+ .stab 0 ${RELOCATING+(NOLOAD)} :
{
*(.stab);
}
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
# Based on i386coff.sc by Ian Taylor <ian@cygnus.com>.
#
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
${RELOCATING+ edata = .};
}
.bss ${RELOCATING+ SIZEOF(.data) + ADDR(.data)} :
- {
+ {
*(.bss)
*(COMMON)
${RELOCATING+ end = .};
}
- .stab 0 ${RELOCATING+(NOLOAD)} :
+ .stab 0 ${RELOCATING+(NOLOAD)} :
{
[ .stab ]
}
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
OUTPUT_FORMAT("${OUTPUT_FORMAT}")
OUTPUT_ARCH(${ARCH})
-SECTIONS
-{
+SECTIONS
+{
.text :
- {
- *(.text)
+ {
+ *(.text)
*(.strings)
- _etext = .;
+ _etext = .;
*(.data)
_edata = .;
*(.bss)
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
ramblk1 : ORIGIN = 0x02027000, LENGTH = 0x1000
}
-SECTIONS
-{
+SECTIONS
+{
.vectors 0x00000000 :
{
*(vectors)
}
- .text :
+ .text :
{
*(.text)
} > rom
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
# 6. EXT_ROM EXT_RAM (mpmode,extram,extrom)
# 7. EXT_RAM EXT_RAM (mpmode,extram)
#
-# In MC mode, TEXT and DATA are copied into RAM by the bootloader.
+# In MC mode, TEXT and DATA are copied into RAM by the bootloader.
#
# In MP mode with external ROM, DATA needs to be copied into RAM at boot time.
#
-# If there is external RAM it is better to use that and reserve the internal RAM
+# If there is external RAM it is better to use that and reserve the internal RAM
# for data buffers. However, the address of the external RAM needs to be specified.
#
# This emulation assumes config 7.
} ${RELOCATING+ > ${TEXT_MEMORY}}
/* Global initialised variables. */
.data :
- {
+ {
${RELOCATING+ __data = .;}
*(.data)
${RELOCATING+ __edata = .;}
} ${RELOCATING+ > ${DATA_MEMORY}}
/* Global uninitialised variables. */
.bss : {
- ${RELOCATING+ __bss = .;}
+ ${RELOCATING+ __bss = .;}
*(.bss)
*(COMMON)
${RELOCATING+ __end = .;}
} ${RELOCATING+ > ${DATA_MEMORY}}
/* Heap. */
.heap :
- {
- ${RELOCATING+ __heap = .;}
+ {
+ ${RELOCATING+ __heap = .;}
${RELOCATING+ . += __HEAP_SIZE};
} ${RELOCATING+ > ${DATA_MEMORY}}
/* Stack (grows upward). */
.stack :
- {
- ${RELOCATING+ __stack = .;}
+ {
+ ${RELOCATING+ __stack = .;}
*(.stack)
- ${RELOCATING+ . = . + __STACK_SIZE};
+ ${RELOCATING+ . = . + __STACK_SIZE};
} ${RELOCATING+ > ${DATA_MEMORY}}
- .stab 0 ${RELOCATING+(NOLOAD)} :
+ .stab 0 ${RELOCATING+(NOLOAD)} :
{
[ .stab ]
}
# patterned after description in TI Assembler Tools PDF, SPRU102C, 7-53
#
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
${RELOCATING+ENTRY (${ENTRY})}
-SECTIONS
-{
- .text :
+SECTIONS
+{
+ .text :
{
___text__ = .;
*(.text)
etext = .;
___etext__ = .;
} > prog
- .data :
+ .data :
{
___data__ = .;
__data = .;
___edata__ = .;
} > prog
/* all other initialized sections should be allocated here */
- .cinit :
+ .cinit :
{
*(.cinit)
} > prog
- .bss :
+ .bss :
{
___bss__ = .;
__bss = .;
# Linker script for TI TMS320C80 (tic80) COFF.
#
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
*(.data)
${RELOCATING+ __edata = .};
}
- .bss : {
+ .bss : {
${RELOCATING+ __bss_start = .};
*(.bss)
*(COMMON)
${RELOCATING+ _end = ALIGN(0x8)};
${RELOCATING+ __end = ALIGN(0x8)};
}
- .stab 0 ${RELOCATING+(NOLOAD)} :
+ .stab 0 ${RELOCATING+(NOLOAD)} :
{
[ .stab ]
}
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
{
*(.text)
${RELOCATING+*(.text.*)}
-
+
/* .gnu.warning sections are handled specially by elf32.em. */
*(.gnu.warning)
*(.gnu.linkonce.t*)
${RELOCATING+PROVIDE(__ctbp = .);}
*(.call_table_data)
} = 0xff /* Fill gaps with 0xff. */
-
+
.call_table_text :
{
*(.call_table_text)
/* We want the small data sections together, so single-instruction offsets
can access them all, and initialized data all before uninitialized, so
we can shorten the on-disk segment size. */
-
+
.sdata ${SDATA_START_ADDR} :
{
${RELOCATING+PROVIDE (__gp = . + 0x8000);}
it can directly precede the .bss section. This allows runtime startup
code to initialise all the zero-data sections by simply taking the
value of '_edata' and zeroing until it reaches '_end'. */
-
+
.sbss :
{
${RELOCATING+__sbss_start = .;}
${RELOCATING+PROVIDE (end = .);}
${RELOCATING+PROVIDE (_heap_start = .);}
- .note.renesas 0 : { KEEP(*(.note.renesas)) }
+ .note.renesas 0 : { KEEP(*(.note.renesas)) }
/* Stabs debugging sections. */
.stab 0 : { *(.stab) }
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
{
*(.text)
${RELOCATING+*(.text.*)}
-
+
/* .gnu.warning sections are handled specially by elf32.em. */
*(.gnu.warning)
*(.gnu.linkonce.t*)
${RELOCATING+PROVIDE(__ctbp = .);}
*(.call_table_data)
} = 0xff /* Fill gaps with 0xff. */
-
+
.call_table_text :
{
*(.call_table_text)
/* We want the small data sections together, so single-instruction offsets
can access them all, and initialized data all before uninitialized, so
we can shorten the on-disk segment size. */
-
+
.sdata ${SDATA_START_ADDR} :
{
${RELOCATING+PROVIDE (__gp = . + 0x8000);}
it can directly precede the .bss section. This allows runtime startup
code to initialise all the zero-data sections by simply taking the
value of '_edata' and zeroing until it reaches '_end'. */
-
+
.sbss :
{
${RELOCATING+__sbss_start = .;}
${RELOCATING+PROVIDE (end = .);}
${RELOCATING+PROVIDE (_heap_start = .);}
- .note.renesas 0 : { KEEP(*(.note.renesas)) }
+ .note.renesas 0 : { KEEP(*(.note.renesas)) }
/* Stabs debugging sections. */
.stab 0 : { *(.stab) }
# Nothing to do.
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
${RELOCATING+ . = ALIGN(4);}
${RELOCATING+ _edata = .;}
} ${RELOCATING+ > ram}
- .bss ${RELOCATING-0} : {
+ .bss ${RELOCATING-0} : {
${RELOCATING+ . = ALIGN(4);}
${RELOCATING+ __bss_start = .;}
*(.bss)
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
ram : o = 0x1000, l = 512k
}
-SECTIONS
-{
+SECTIONS
+{
.text :
- {
- *(.text)
+ {
+ *(.text)
*(.strings)
- ${RELOCATING+ _etext = . ; }
+ ${RELOCATING+ _etext = . ; }
} ${RELOCATING+ > ram}
${CONSTRUCTING+${TORS}}
*(.data)
${RELOCATING+ _edata = . ; }
} ${RELOCATING+ > ram}
-
+
.bss :
{
${RELOCATING+ _bss_start = . ; }
*(COMMON)
${RELOCATING+ _end = . ; }
} ${RELOCATING+ >ram}
-
+
.stack ${RELOCATING+ 0x30000 } :
{
${RELOCATING+ _stack = . ; }
*(.stack)
} ${RELOCATING+ > ram}
-
+
.stab . (NOLOAD) :
{
[ .stab ]
}
-
+
.stabstr . (NOLOAD) :
{
[ .stabstr ]
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
# .bss section besides __bss_start.
# INPUT_FILES - INPUT command of files to always include
# INIT_START, INIT_END - statements just before and just after
-# combination of .init sections.
+# combination of .init sections.
# FINI_START, FINI_END - statements just before and just after
-# combination of .fini sections.
+# combination of .fini sections.
#
# When adding sections, do note that the names of some sections are used
# when specifying the start address of the next.
if [ -z "$MACHINE" ]; then OUTPUT_ARCH=${ARCH}; else OUTPUT_ARCH=${ARCH}:${MACHINE}; fi
test -z "${ELFSIZE}" && ELFSIZE=32
test -z "${ALIGNMENT}" && ALIGNMENT="${ELFSIZE} / 8"
-CTOR=".ctors ${CONSTRUCTING-0} :
+CTOR=".ctors ${CONSTRUCTING-0} :
{
${CONSTRUCTING+${CTOR_START}}
/* gcc uses crtbegin.o to find the start of
/* There are two memory regions we care about, one from 0 through 0x7F00
that is RAM and one from 0x8000 up which is ROM. */
-MEMORY
+MEMORY
{
RAM (w) : ORIGIN = 0, LENGTH = 0x7F00
ROM (!w) : ORIGIN = 0x8000, LENGTH = 0xFF8000
${RELOCATING+*(.gnu.linkonce.t.*)}
${RELOCATING+${OTHER_TEXT_SECTIONS}}
} ${RELOCATING+> ROM =${NOP-0}}
- .init ${RELOCATING-0} :
- {
+ .init ${RELOCATING-0} :
+ {
${RELOCATING+${INIT_START}}
KEEP (*(.init))
${RELOCATING+${INIT_END}}
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
__Ltext = .;
ENTRY (__Ltext)
EOF
-else
+else
echo "OUTPUT_FORMAT(\"${OUTPUT_FORMAT}\")"
fi
cat <<EOF
# Copyright (C) 2014-2017 Free Software Foundation, Inc.
-#
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
OUTPUT_ARCH("${OUTPUT_ARCH}")
${RELOCATING+ENTRY (_start)}
-SECTIONS
-{
+SECTIONS
+{
.text ${BIG+ ${RELOCATING+ 0x0000000}} :
- {
- *(.text)
+ {
+ *(.text)
*(.strings)
*(.rdata)
}
-.ctors ${BIG+ ${RELOCATING+ 0x2000000}} :
+.ctors ${BIG+ ${RELOCATING+ 0x2000000}} :
{
${CONSTRUCTING+ ___ctors = . ; }
*(.ctors);
___dtors = . ;
*(.dtors);
${CONSTRUCTING+ ___dtors_end = . ; }
- }
+ }
.data ${BIG+ ${RELOCATING+ 0x3000000}} :
{
*(.data)
}
-.bss ${BIG+ ${RELOCATING+ 0x4000000}} :
+.bss ${BIG+ ${RELOCATING+ 0x4000000}} :
{
${RELOCATING+ __start_bss = . ; }
*(.bss);
${RELOCATING+ __start_heap = . ; }
${RELOCATING+ . = . + 20k ; }
${RELOCATING+ __end_heap = . ; }
- }
+ }
-.stack ${RELOCATING+ 0xf000 } :
+.stack ${RELOCATING+ 0xf000 } :
{
${RELOCATING+ _stack = . ; }
*(.stack)