ld whitespace fixes

* 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.
This commit is contained in:
Alan Modra 2017-10-12 21:28:30 +10:30
parent 1d75a8e26e
commit 6c19b93bcd
133 changed files with 1228 additions and 1231 deletions

View File

@ -1,7 +1,7 @@
-*- text -*- -*- text -*-
* Add -z globalaudit command line option to force audit libraries to be run * 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 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 * 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 of SORT_BY_ALIGNMENT and SORT_BY_INIT_PRIORITY on filenames. These would

2
ld/configure vendored
View File

@ -15419,7 +15419,7 @@ fi
if test "${enable_targets+set}" = set; then : if test "${enable_targets+set}" = set; then :
enableval=$enable_targets; case "${enableval}" in enableval=$enable_targets; case "${enableval}" in
yes | "") as_fn_error "enable-targets option must specify target names or 'all'" "$LINENO" 5 yes | "") as_fn_error "enable-targets option must specify target names or 'all'" "$LINENO" 5
;; ;;
no) enable_targets= ;; no) enable_targets= ;;
*) enable_targets=$enableval ;; *) enable_targets=$enableval ;;
esac esac

View File

@ -44,7 +44,7 @@ AC_ARG_ENABLE(targets,
[ --enable-targets alternative target configurations], [ --enable-targets alternative target configurations],
[case "${enableval}" in [case "${enableval}" in
yes | "") AC_MSG_ERROR(enable-targets option must specify target names or 'all') yes | "") AC_MSG_ERROR(enable-targets option must specify target names or 'all')
;; ;;
no) enable_targets= ;; no) enable_targets= ;;
*) enable_targets=$enableval ;; *) enable_targets=$enableval ;;
esac])dnl esac])dnl
@ -120,7 +120,7 @@ AC_SUBST(installed_linker)
AC_ARG_ENABLE([got], AC_ARG_ENABLE([got],
AS_HELP_STRING([--enable-got=<type>], AS_HELP_STRING([--enable-got=<type>],
[GOT handling scheme (target, single, negative, multigot)]), [GOT handling scheme (target, single, negative, multigot)]),
[case "${enableval}" in [case "${enableval}" in
target | single | negative | multigot) got_handling=$enableval ;; target | single | negative | multigot) got_handling=$enableval ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-got option) ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-got option) ;;
@ -130,16 +130,16 @@ esac],
case "${got_handling}" in case "${got_handling}" in
target) target)
AC_DEFINE([GOT_HANDLING_DEFAULT], [GOT_HANDLING_TARGET_DEFAULT], AC_DEFINE([GOT_HANDLING_DEFAULT], [GOT_HANDLING_TARGET_DEFAULT],
[Define to choose default GOT handling scheme]) ;; [Define to choose default GOT handling scheme]) ;;
single) single)
AC_DEFINE([GOT_HANDLING_DEFAULT], [GOT_HANDLING_SINGLE], AC_DEFINE([GOT_HANDLING_DEFAULT], [GOT_HANDLING_SINGLE],
[Define to choose default GOT handling scheme]) ;; [Define to choose default GOT handling scheme]) ;;
negative) negative)
AC_DEFINE([GOT_HANDLING_DEFAULT], [GOT_HANDLING_NEGATIVE], AC_DEFINE([GOT_HANDLING_DEFAULT], [GOT_HANDLING_NEGATIVE],
[Define to choose default GOT handling scheme]) ;; [Define to choose default GOT handling scheme]) ;;
multigot) multigot)
AC_DEFINE([GOT_HANDLING_DEFAULT], [GOT_HANDLING_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) ;; *) AC_MSG_ERROR(bad value ${got_handling} for --enable-got option) ;;
esac esac

View File

@ -28,9 +28,9 @@
# targ_extra_libpath additional linker emulations using LIB_PATH # targ_extra_libpath additional linker emulations using LIB_PATH
# targ_extra_ofiles additional host-compiled objects needed by the emulation # targ_extra_ofiles additional host-compiled objects needed by the emulation
# targ64_extra_emuls additional linker emulations to provide if # 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 # 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 # NATIVE_LIB_DIRS library directories to search on this host
# (if we are a native or sysrooted linker) # (if we are a native or sysrooted linker)
@ -71,7 +71,7 @@ aarch64-*-linux*) targ_emul=aarch64linux
targ_extra_libpath="aarch64linuxb aarch64linux32 aarch64linux32b armelfb_linux_eabi armelf_linux_eabi" targ_extra_libpath="aarch64linuxb aarch64linux32 aarch64linux32b armelfb_linux_eabi armelf_linux_eabi"
targ_extra_emuls="aarch64elf aarch64elf32 aarch64elf32b aarch64elfb armelf armelfb $targ_extra_libpath" ;; targ_extra_emuls="aarch64elf aarch64elf32 aarch64elf32b aarch64elfb armelf armelfb $targ_extra_libpath" ;;
alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu) alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu)
targ_emul=elf64alpha_fbsd targ_emul=elf64alpha_fbsd
targ_extra_emuls="elf64alpha alpha" targ_extra_emuls="elf64alpha alpha"
tdir_alpha=`echo ${targ_alias} | sed -e 's/freebsd/freebsdecoff/'` ;; tdir_alpha=`echo ${targ_alias} | sed -e 's/freebsd/freebsdecoff/'` ;;
alpha*-*-linux*ecoff*) targ_emul=alpha targ_extra_emuls=elf64alpha alpha*-*-linux*ecoff*) targ_emul=alpha targ_extra_emuls=elf64alpha
@ -87,7 +87,7 @@ alpha*-*-*vms*) targ_emul=alphavms
;; ;;
arc*-*-elf*) targ_emul=arcelf arc*-*-elf*) targ_emul=arcelf
targ_extra_emuls="arcelf_prof arclinux arclinux_nps arclinux_prof arcv2elf arcv2elfx" targ_extra_emuls="arcelf_prof arclinux arclinux_nps arclinux_prof arcv2elf arcv2elfx"
;; ;;
arc*-*-linux*) case "${with_cpu}" in arc*-*-linux*) case "${with_cpu}" in
nps400) targ_emul=arclinux_nps nps400) targ_emul=arclinux_nps
targ_extra_emuls=arclinux targ_extra_emuls=arclinux
@ -110,22 +110,22 @@ arm-*-coff) targ_emul=armcoff ;;
arm*b-*-freebsd*) targ_emul=armelfb_fbsd arm*b-*-freebsd*) targ_emul=armelfb_fbsd
targ_extra_emuls="armelf_fbsd armelf" ;; targ_extra_emuls="armelf_fbsd armelf" ;;
arm*-*-freebsd* | arm-*-kfreebsd*-gnu) arm*-*-freebsd* | arm-*-kfreebsd*-gnu)
targ_emul=armelf_fbsd targ_emul=armelf_fbsd
targ_extra_emuls="armelfb_fbsd armelf" ;; targ_extra_emuls="armelfb_fbsd armelf" ;;
armeb-*-netbsdelf*) targ_emul=armelfb_nbsd; armeb-*-netbsdelf*) targ_emul=armelfb_nbsd;
targ_extra_emuls="armelf_nbsd armelf armnbsd" ;; targ_extra_emuls="armelf_nbsd armelf armnbsd" ;;
arm-*-netbsdelf*) targ_emul=armelf_nbsd; arm-*-netbsdelf*) targ_emul=armelf_nbsd;
targ_extra_emuls="armelfb_nbsd armelf armnbsd" ;; targ_extra_emuls="armelfb_nbsd armelf armnbsd" ;;
arm-*-netbsd*) targ_emul=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-*-nto*) targ_emul=armnto ;;
arm-*-openbsd*) targ_emul=armnbsd ;; arm-*-openbsd*) targ_emul=armnbsd ;;
arm-*-phoenix*) targ_emul=armelf ;; arm-*-phoenix*) targ_emul=armelf ;;
armeb-*-elf | armeb-*-eabi*) armeb-*-elf | armeb-*-eabi*)
targ_emul=armelfb ;; targ_emul=armelfb ;;
arm-*-elf | arm*-*-eabi* | arm-*-rtems*) arm-*-elf | arm*-*-eabi* | arm-*-rtems*)
targ_emul=armelf ;; targ_emul=armelf ;;
arm*-*-symbianelf*) targ_emul=armsymbian;; arm*-*-symbianelf*) targ_emul=armsymbian;;
arm-*-kaos*) targ_emul=armelf ;; arm-*-kaos*) targ_emul=armelf ;;
arm9e-*-elf) targ_emul=armelf ;; arm9e-*-elf) targ_emul=armelf ;;
arm*b-*-linux-*eabi*) targ_emul=armelfb_linux_eabi arm*b-*-linux-*eabi*) targ_emul=armelfb_linux_eabi
@ -140,7 +140,7 @@ arm*-*-linux-*eabi*) targ_emul=armelf_linux_eabi
targ_extra_emuls=armelfb_linux_eabi targ_extra_emuls=armelfb_linux_eabi
targ_extra_libpath=$targ_extra_emuls 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_emuls="armelf armelfb armelfb_linux"
targ_extra_libpath="armelfb_linux" targ_extra_libpath="armelfb_linux"
;; ;;
@ -185,8 +185,8 @@ bfin-*-linux-uclibc*) targ_emul=elf32bfinfd;
targ_extra_emuls="elf32bfin" targ_extra_emuls="elf32bfin"
targ_extra_libpath=$targ_extra_emuls targ_extra_libpath=$targ_extra_emuls
;; ;;
cr16-*-elf*) targ_emul=elf32cr16 ;; cr16-*-elf*) targ_emul=elf32cr16 ;;
cr16c-*-elf*) targ_emul=elf32cr16c cr16c-*-elf*) targ_emul=elf32cr16c
;; ;;
cris-*-*aout*) targ_emul=crisaout cris-*-*aout*) targ_emul=crisaout
targ_extra_emuls="criself crislinux" targ_extra_emuls="criself crislinux"
@ -284,15 +284,15 @@ x86_64-*-linux-*) targ_emul=elf_x86_64
tdir_i386linux=`echo ${targ_alias}aout | sed -e 's/x86_64/i386/'` tdir_i386linux=`echo ${targ_alias}aout | sed -e 's/x86_64/i386/'`
tdir_elf_i386=`echo ${targ_alias} | 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 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 x86_64-*-redox*) targ_emul=elf_x86_64
targ_extra_emuls=elf_i386 ;; targ_extra_emuls=elf_i386 ;;
i[3-7]86-*-sysv[45]*) targ_emul=elf_i386 i[3-7]86-*-sysv[45]*) targ_emul=elf_i386
targ_extra_emuls=elf_iamcu ;; targ_extra_emuls=elf_iamcu ;;
i[3-7]86-*-solaris2*) targ_emul=elf_i386_sol2 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 targ_extra_libpath=$targ_extra_emuls
;; ;;
x86_64-*-solaris2*) x86_64-*-solaris2*)
targ_emul=elf_x86_64_sol2 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" targ_extra_emuls="elf_x86_64 elf_i386_sol2 elf_i386_ldso elf_i386 elf_iamcu elf_l1om elf_k1om"
@ -301,9 +301,9 @@ x86_64-*-solaris2*)
i[3-7]86-*-unixware) targ_emul=elf_i386 i[3-7]86-*-unixware) targ_emul=elf_i386
targ_extra_emuls=elf_iamcu ;; targ_extra_emuls=elf_iamcu ;;
i[3-7]86-*-solaris*) targ_emul=elf_i386_ldso 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 targ_extra_libpath=$targ_extra_emuls
;; ;;
i[3-7]86-*-netbsdelf* | \ i[3-7]86-*-netbsdelf* | \
i[3-7]86-*-netbsd*-gnu* | \ i[3-7]86-*-netbsd*-gnu* | \
i[3-7]86-*-knetbsd*-gnu) i[3-7]86-*-knetbsd*-gnu)
@ -320,14 +320,14 @@ x86_64-*-netbsd*) targ_emul=elf_x86_64
case "${tdir_elf_iamcu}" in case "${tdir_elf_iamcu}" in
*-netbsdelf*) ;; *-netbsdelf*) ;;
*) tdir_elf_iamcu=`echo ${tdir_elf_iamcu} | \ *) tdir_elf_iamcu=`echo ${tdir_elf_iamcu} | \
sed -e 's/netbsd/netbsdelf/'`;; sed -e 's/netbsd/netbsdelf/'`;;
esac esac
tdir_elf_i386=`echo ${targ_alias} | \ tdir_elf_i386=`echo ${targ_alias} | \
sed -e 's/x86_64/i386/'` sed -e 's/x86_64/i386/'`
case "${tdir_elf_i386}" in case "${tdir_elf_i386}" in
*-netbsdelf*) ;; *-netbsdelf*) ;;
*) tdir_elf_i386=`echo ${tdir_elf_i386} | \ *) tdir_elf_i386=`echo ${tdir_elf_i386} | \
sed -e 's/netbsd/netbsdelf/'`;; sed -e 's/netbsd/netbsdelf/'`;;
esac ;; esac ;;
i[3-7]86-*-netware) targ_emul=i386nw ;; i[3-7]86-*-netware) targ_emul=i386nw ;;
i[3-7]86-*-elfiamcu) targ_emul=elf_iamcu i[3-7]86-*-elfiamcu) targ_emul=elf_iamcu
@ -349,7 +349,7 @@ i[3-7]86-*-dragonfly*) targ_emul=elf_i386
x86_64-*-dragonfly*) targ_emul=elf_x86_64 x86_64-*-dragonfly*) targ_emul=elf_x86_64
targ_extra_emuls="elf_i386 elf_iamcu elf_l1om elf_k1om" ;; targ_extra_emuls="elf_i386 elf_iamcu elf_l1om elf_k1om" ;;
i[3-7]86-*-freebsd* | i[3-7]86-*-kfreebsd*-gnu) 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" ;; targ_extra_emuls="elf_i386 elf_iamcu i386bsd" ;;
x86_64-*-freebsd* | x86_64-*-kfreebsd*-gnu) x86_64-*-freebsd* | x86_64-*-kfreebsd*-gnu)
targ_emul=elf_x86_64_fbsd targ_emul=elf_x86_64_fbsd
@ -388,7 +388,7 @@ x86_64-*-mingw*) targ_emul=i386pep ;
targ_extra_emuls=i386pe targ_extra_emuls=i386pe
targ_extra_ofiles="deffilep.o pep-dll.o pe-dll.o" ;; targ_extra_ofiles="deffilep.o pep-dll.o pe-dll.o" ;;
i[3-7]86-*-interix*) targ_emul=i386pe_posix; 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-*-beospe*) targ_emul=i386beos ;;
i[3-7]86-*-beos*) targ_emul=elf_i386_be ;; i[3-7]86-*-beos*) targ_emul=elf_i386_be ;;
i[3-7]86-*-vxworks*) targ_emul=elf_i386_vxworks ;; i[3-7]86-*-vxworks*) targ_emul=elf_i386_vxworks ;;
@ -419,7 +419,7 @@ i960-*-elf*) targ_emul=elf32_i960
ia16-*-elf*) targ_emul=elf_i386 targ_extra_emuls=i386msdos ;; ia16-*-elf*) targ_emul=elf_i386 targ_extra_emuls=i386msdos ;;
ia64-*-elf*) targ_emul=elf64_ia64 ;; ia64-*-elf*) targ_emul=elf64_ia64 ;;
ia64-*-freebsd* | ia64-*-kfreebsd*-gnu) ia64-*-freebsd* | ia64-*-kfreebsd*-gnu)
targ_emul=elf64_ia64_fbsd targ_emul=elf64_ia64_fbsd
targ_extra_emuls="elf64_ia64" ;; targ_extra_emuls="elf64_ia64" ;;
ia64-*-netbsd*) targ_emul=elf64_ia64 ;; ia64-*-netbsd*) targ_emul=elf64_ia64 ;;
ia64-*-linux*) targ_emul=elf64_ia64 ;; ia64-*-linux*) targ_emul=elf64_ia64 ;;
@ -428,19 +428,19 @@ ia64-*-aix*) targ_emul=elf64_aix
;; ;;
ip2k-*-elf) targ_emul=elf32ip2k 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*) m32c-*-elf | m32c-*-rtems*)
targ_emul=elf32m32c targ_emul=elf32m32c
;; ;;
m32r*le-*-elf*) targ_emul=m32rlelf ;; m32r*le-*-elf*) targ_emul=m32rlelf ;;
m32r*-*-elf* | m32r*-*-rtems*) m32r*-*-elf* | m32r*-*-rtems*)
targ_emul=m32relf ;; targ_emul=m32relf ;;
m32r*le-*-linux-*) targ_emul=m32rlelf_linux ;; m32r*le-*-linux-*) targ_emul=m32rlelf_linux ;;
m32r*-*-linux-*) targ_emul=m32relf_linux m32r*-*-linux-*) targ_emul=m32relf_linux
;; ;;
m68hc11-*-*|m6811-*-*) targ_emul=m68hc11elf m68hc11-*-*|m6811-*-*) targ_emul=m68hc11elf
targ_extra_emuls="m68hc11elfb m68hc12elf m68hc12elfb" ;; targ_extra_emuls="m68hc11elfb m68hc12elf m68hc12elfb" ;;
@ -461,7 +461,7 @@ m68*-*-hpux*) targ_emul=hp3hpux ;;
m68k-*-linux*aout*) targ_emul=m68klinux m68k-*-linux*aout*) targ_emul=m68klinux
targ_extra_emuls=m68kelf targ_extra_emuls=m68kelf
tdir_m68kelf=`echo ${targ_alias} | sed -e 's/aout//'` ;; tdir_m68kelf=`echo ${targ_alias} | sed -e 's/aout//'` ;;
m68k-*-linux-*) targ_emul=m68kelf m68k-*-linux-*) targ_emul=m68kelf
targ_extra_emuls=m68klinux targ_extra_emuls=m68klinux
tdir_m68klinux=`echo ${targ_alias} | sed -e 's/linux/linuxaout/'` ;; tdir_m68klinux=`echo ${targ_alias} | sed -e 's/linux/linuxaout/'` ;;
m68k-*-uclinux*) targ_emul=m68kelf ;; m68k-*-uclinux*) targ_emul=m68kelf ;;
@ -496,14 +496,14 @@ microblaze*) targ_emul=elf32microblaze
;; ;;
mips*-sgi-irix5*) targ_emul=elf32bsmip ;; mips*-sgi-irix5*) targ_emul=elf32bsmip ;;
mips*-sgi-irix6*) targ_emul=elf32bmipn32 mips*-sgi-irix6*) targ_emul=elf32bmipn32
targ_extra_emuls="elf32bsmip elf64bmip" targ_extra_emuls="elf32bsmip elf64bmip"
targ_extra_libpath=$targ_extra_emuls ;; targ_extra_libpath=$targ_extra_emuls ;;
mips*el-*-netbsd*) targ_emul=elf32ltsmip mips*el-*-netbsd*) targ_emul=elf32ltsmip
targ_extra_emuls="elf32btsmip elf64ltsmip elf64btsmip" targ_extra_emuls="elf32btsmip elf64ltsmip elf64btsmip"
;; ;;
mips*-*-netbsd*) targ_emul=elf32btsmip mips*-*-netbsd*) targ_emul=elf32btsmip
targ_extra_emuls="elf32ltsmip elf64btsmip elf64ltsmip" targ_extra_emuls="elf32ltsmip elf64btsmip elf64ltsmip"
;; ;;
mips64el-*-openbsd*) targ_emul=elf64ltsmip mips64el-*-openbsd*) targ_emul=elf64ltsmip
targ_extra_emuls=elf64btsmip targ_extra_emuls=elf64btsmip
;; ;;
@ -534,7 +534,7 @@ mips*-*-elf* | mips*-*-rtems*)
mips*el-*-vxworks*) targ_emul=elf32elmipvxworks mips*el-*-vxworks*) targ_emul=elf32elmipvxworks
targ_extra_emuls="elf32ebmipvxworks" ;; targ_extra_emuls="elf32ebmipvxworks" ;;
mips*-*-vxworks*) targ_emul=elf32ebmipvxworks mips*-*-vxworks*) targ_emul=elf32ebmipvxworks
targ_extra_emuls="elf32elmipvxworks" ;; targ_extra_emuls="elf32elmipvxworks" ;;
mips*-*-windiss) targ_emul=elf32mipswindiss ;; mips*-*-windiss) targ_emul=elf32mipswindiss ;;
mips64*el-*-linux-*) targ_emul=elf32ltsmipn32 mips64*el-*-linux-*) targ_emul=elf32ltsmipn32
targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip" targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip"
@ -564,7 +564,7 @@ mips*-*-freebsd* | mips*-*-kfreebsd*-gnu)
targ_emul=elf32btsmip_fbsd 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_emuls="elf32ltsmip elf32btsmip elf32ltsmipn32 elf32btsmipn32 elf64ltsmip elf64btsmip elf32ltsmip_fbsd elf32btsmipn32_fbsd elf32ltsmipn32_fbsd elf64ltsmip_fbsd elf64btsmip_fbsd"
targ_extra_libpath=$targ_extra_emuls ;; targ_extra_libpath=$targ_extra_emuls ;;
mips*-*-sysv4*) targ_emul=elf32btsmip mips*-*-sysv4*) targ_emul=elf32btsmip
;; ;;
mmix-*-*) targ_emul=mmo mmix-*-*) targ_emul=mmo
targ_extra_emuls=elf64mmix targ_extra_emuls=elf64mmix
@ -573,9 +573,9 @@ am33_2.0-*-linux*) targ_emul=elf32am33lin ;;
mn10200-*-*) targ_emul=mn10200 ;; mn10200-*-*) targ_emul=mn10200 ;;
mn10300-*-*) targ_emul=mn10300 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" targ_extra_emuls="msp430X"
;; ;;
nds32*le-*-elf*) targ_emul=nds32elf nds32*le-*-elf*) targ_emul=nds32elf
@ -596,9 +596,9 @@ or1k-*-elf | or1knd-*-elf | or1k-*-rtems* | or1knd-*-rtems*)
or1k-*-linux* | or1knd-*-linux*) targ_emul=elf32or1k_linux ;; or1k-*-linux* | or1knd-*-linux*) targ_emul=elf32or1k_linux ;;
pdp11-*-*) targ_emul=pdp11 pdp11-*-*) targ_emul=pdp11
;; ;;
pjl*-*-*) targ_emul=pjlelf pjl*-*-*) targ_emul=pjlelf
targ_extra_emuls="elf_i386 elf_iamcu" ;; targ_extra_emuls="elf_i386 elf_iamcu" ;;
pj*-*-*) targ_emul=pjelf pj*-*-*) targ_emul=pjelf
;; ;;
powerpc-*-freebsd* | powerpc-*-kfreebsd*-gnu) powerpc-*-freebsd* | powerpc-*-kfreebsd*-gnu)
targ_emul=elf32ppc_fbsd targ_emul=elf32ppc_fbsd
@ -689,8 +689,8 @@ powerpc*-*-elf* | powerpc*-*-eabi* | powerpc*-*-sysv* \
eval test -n \"\$${td}sim\" || eval ${td}sim="${ta32}" eval test -n \"\$${td}sim\" || eval ${td}sim="${ta32}"
eval test -n \"\$${td64}\" || eval ${td64}="${ta64}" eval test -n \"\$${td64}\" || eval ${td64}="${ta64}"
;; ;;
powerpc-*-nto*) targ_emul=elf32ppcnto ;; powerpc-*-nto*) targ_emul=elf32ppcnto ;;
powerpcle-*-nto*) targ_emul=elf32lppcnto ;; powerpcle-*-nto*) targ_emul=elf32lppcnto ;;
powerpc-*-macos*) targ_emul=ppcmacos ;; powerpc-*-macos*) targ_emul=ppcmacos ;;
powerpc-*-netware*) targ_emul=ppcnw ;; powerpc-*-netware*) targ_emul=ppcnw ;;
powerpcle-*-pe | powerpcle-*-winnt* | powerpcle-*-cygwin*) powerpcle-*-pe | powerpcle-*-winnt* | powerpcle-*-cygwin*)
@ -713,18 +713,18 @@ rs6000-*-aix*) targ_emul=aixrs6
;; ;;
rl78-*-*) targ_emul=elf32rl78 ;; rl78-*-*) targ_emul=elf32rl78 ;;
rx-*-*) targ_emul=elf32rx ;; rx-*-*) targ_emul=elf32rx ;;
s390x-*-linux*) targ_emul=elf64_s390 s390x-*-linux*) targ_emul=elf64_s390
targ_extra_emuls=elf_s390 targ_extra_emuls=elf_s390
targ_extra_libpath=$targ_extra_emuls targ_extra_libpath=$targ_extra_emuls
tdir_elf_s390=`echo ${targ_alias} | sed -e 's/s390x/s390/'` ;; tdir_elf_s390=`echo ${targ_alias} | sed -e 's/s390x/s390/'` ;;
s390x-*-tpf*) targ_emul=elf64_s390 s390x-*-tpf*) targ_emul=elf64_s390
tdir_elf_s390=`echo ${targ_alias} | sed -e 's/s390x/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_emuls=elf64_s390
targ64_extra_libpath=elf64_s390 targ64_extra_libpath=elf64_s390
tdir_elf64_s390=`echo ${targ_alias} | sed -e 's/s390/s390x/'` 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 ;; targ_extra_emuls=score3_elf ;;
sh-*-linux*) targ_emul=shlelf_linux sh-*-linux*) targ_emul=shlelf_linux
targ_extra_emuls="shelf_linux shlelf_fd shelf_fd" targ_extra_emuls="shelf_linux shlelf_fd shelf_fd"
@ -776,7 +776,7 @@ sh64-*-elf*) targ_emul=shelf
sparc64-*-aout*) targ_emul=sparcaout ;; sparc64-*-aout*) targ_emul=sparcaout ;;
sparc64-*-elf* | sparc64-*-rtems*) sparc64-*-elf* | sparc64-*-rtems*)
targ_emul=elf64_sparc ;; targ_emul=elf64_sparc ;;
sparc-sun-sunos4*) targ_emul=sun4 ;; sparc-sun-sunos4*) targ_emul=sun4 ;;
sparclite*-*-elf) targ_emul=elf32_sparc ;; sparclite*-*-elf) targ_emul=elf32_sparc ;;
sparclite*-*-coff) targ_emul=coff_sparc ;; sparclite*-*-coff) targ_emul=coff_sparc ;;
sparclite*-fujitsu-*) targ_emul=sparcaout ;; sparclite*-fujitsu-*) targ_emul=sparcaout ;;
@ -829,7 +829,7 @@ sparc*-wrs-vxworks*) targ_emul=sparcaout ;;
spu-*-elf*) targ_emul=elf32_spu ;; spu-*-elf*) targ_emul=elf32_spu ;;
tic30-*-*aout*) targ_emul=tic30aout ;; tic30-*-*aout*) targ_emul=tic30aout ;;
tic30-*-*coff*) targ_emul=tic30coff ;; 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 ;; tic54x-*-* | c54x*-*-*) targ_emul=tic54xcoff ;;
tic6x-*-elf) targ_emul=elf32_tic6x_elf_le tic6x-*-elf) targ_emul=elf32_tic6x_elf_le
targ_extra_emuls="elf32_tic6x_elf_be elf32_tic6x_le elf32_tic6x_be" targ_extra_emuls="elf32_tic6x_elf_be elf32_tic6x_le elf32_tic6x_be"
@ -859,24 +859,24 @@ vax-*-netbsdelf*) targ_emul=elf32vax
vax-*-netbsdaout* | vax-*-netbsd*) vax-*-netbsdaout* | vax-*-netbsd*)
targ_emul=vaxnbsd targ_emul=vaxnbsd
targ_extra_emuls=elf32vax ;; targ_extra_emuls=elf32vax ;;
vax-*-linux-*) targ_emul=elf32vax vax-*-linux-*) targ_emul=elf32vax
;; ;;
visium-*-elf) targ_emul=elf32visium visium-*-elf) targ_emul=elf32visium
;; ;;
w65-*-*) targ_emul=w65 w65-*-*) targ_emul=w65
;; ;;
xc16x-*-elf) targ_emul=elf32xc16x xc16x-*-elf) targ_emul=elf32xc16x
targ_extra_emuls="elf32xc16xl elf32xc16xs" targ_extra_emuls="elf32xc16xl elf32xc16xs"
;; ;;
xstormy16-*-*) targ_emul=elf32xstormy16 xstormy16-*-*) targ_emul=elf32xstormy16
;; ;;
xtensa*-*-*) targ_emul=elf32xtensa xtensa*-*-*) targ_emul=elf32xtensa
;; ;;
xgate-*-*) targ_emul=xgateelf xgate-*-*) targ_emul=xgateelf
;; ;;
z80-*-coff) targ_emul=z80 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 *-*-ieee*) targ_emul=vanilla
;; ;;

View File

@ -193,18 +193,18 @@ implist:
; ;
impline: impline:
ID '=' ID '.' ID '.' ID opt_equalequal_name ID '=' ID '.' ID '.' ID opt_equalequal_name
{ def_import ($1, $3, $5, $7, -1, $8); } { def_import ($1, $3, $5, $7, -1, $8); }
| ID '=' ID '.' ID '.' NUMBER opt_equalequal_name | ID '=' ID '.' ID '.' NUMBER opt_equalequal_name
{ def_import ($1, $3, $5, 0, $7, $8); } { def_import ($1, $3, $5, 0, $7, $8); }
| ID '=' ID '.' ID opt_equalequal_name | 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 | 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 | 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 | ID '.' ID opt_equalequal_name
{ def_import ( 0, $1, 0, $3, -1, $4); } { def_import ( 0, $1, 0, $3, -1, $4); }
; ;
seclist: seclist:
@ -309,8 +309,8 @@ opt_ordinal:
; ;
opt_equal_name: opt_equal_name:
'=' opt_name2 { $$ = $2; } '=' opt_name2 { $$ = $2; }
| { $$ = 0; } | { $$ = 0; }
; ;
opt_base: BASE '=' VMA { $$ = $3;} opt_base: BASE '=' VMA { $$ = $3;}
@ -636,7 +636,7 @@ find_export_in_list (def_file_export *b, int max,
if ((e = cmp_export_elem (b, ex_name, in_name, its_name, ord)) <= 0) if ((e = cmp_export_elem (b, ex_name, in_name, its_name, ord)) <= 0)
{ {
if (!e) if (!e)
*is_ident = 1; *is_ident = 1;
return 0; return 0;
} }
if (max == 1) if (max == 1)
@ -655,14 +655,14 @@ find_export_in_list (def_file_export *b, int max,
p = (l + r) / 2; p = (l + r) / 2;
e = cmp_export_elem (b + p, ex_name, in_name, its_name, ord); e = cmp_export_elem (b + p, ex_name, in_name, its_name, ord);
if (!e) if (!e)
{ {
*is_ident = 1; *is_ident = 1;
return p; return p;
} }
else if (e < 0) else if (e < 0)
r = p - 1; r = p - 1;
else if (e > 0) 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) if ((e = cmp_export_elem (b + l, ex_name, in_name, its_name, ord)) > 0)
++l; ++l;
@ -781,7 +781,7 @@ find_import_in_list (def_file_import *b, int max,
if ((e = cmp_import_elem (b, ex_name, in_name, module, ord)) <= 0) if ((e = cmp_import_elem (b, ex_name, in_name, module, ord)) <= 0)
{ {
if (!e) if (!e)
*is_ident = 1; *is_ident = 1;
return 0; return 0;
} }
if (max == 1) if (max == 1)
@ -791,7 +791,7 @@ find_import_in_list (def_file_import *b, int max,
else if (!e || max == 2) else if (!e || max == 2)
{ {
if (!e) if (!e)
*is_ident = 1; *is_ident = 1;
return max - 1; return max - 1;
} }
l = 0; r = max - 1; l = 0; r = max - 1;
@ -800,14 +800,14 @@ find_import_in_list (def_file_import *b, int max,
p = (l + r) / 2; p = (l + r) / 2;
e = cmp_import_elem (b + p, ex_name, in_name, module, ord); e = cmp_import_elem (b + p, ex_name, in_name, module, ord);
if (!e) if (!e)
{ {
*is_ident = 1; *is_ident = 1;
return p; return p;
} }
else if (e < 0) else if (e < 0)
r = p - 1; r = p - 1;
else if (e > 0) else if (e > 0)
l = p + 1; l = p + 1;
} }
if ((e = cmp_import_elem (b + l, ex_name, in_name, module, ord)) > 0) if ((e = cmp_import_elem (b + l, ex_name, in_name, module, ord)) > 0)
++l; ++l;
@ -902,10 +902,10 @@ def_file_add_directive (def_file *my_def, const char *param, int len)
break; break;
/* Scan forward until we encounter any of: /* Scan forward until we encounter any of:
- the end of the buffer - the end of the buffer
- the start of a new option - the start of a new option
- a newline separating options - a newline separating options
- a NUL separating options. */ - a NUL separating options. */
for (tend = (char *) (param + 1); for (tend = (char *) (param + 1);
(tend < pend (tend < pend
&& !(ISSPACE (tend[-1]) && *tend == '-') && !(ISSPACE (tend[-1]) && *tend == '-')
@ -981,7 +981,7 @@ def_image_name (const char *name, bfd_vma base, int is_dll)
def->name = xmalloc (strlen (image_name) + strlen (suffix) + 1); def->name = xmalloc (strlen (image_name) + strlen (suffix) + 1);
sprintf (def->name, "%s%s", image_name, suffix); sprintf (def->name, "%s%s", image_name, suffix);
} }
else else
def->name = xstrdup (image_name); def->name = xstrdup (image_name);
} }
@ -1176,7 +1176,7 @@ def_aligncomm (char *str, int align)
return; return;
} }
if (e > 0) if (e > 0)
break; break;
c = (p = c)->next; c = (p = c)->next;
} }
@ -1367,12 +1367,12 @@ def_lex (void)
if (q == '@') if (q == '@')
{ {
if (ISBLANK (c) ) /* '@' followed by whitespace. */ if (ISBLANK (c) ) /* '@' followed by whitespace. */
return (q); return (q);
else if (ISDIGIT (c)) /* '@' followed by digit. */ else if (ISDIGIT (c)) /* '@' followed by digit. */
{ {
def_ungetc (c); def_ungetc (c);
return (q); return (q);
} }
#if TRACE #if TRACE
printf ("lex: @ returns itself\n"); printf ("lex: @ returns itself\n");
@ -1388,7 +1388,7 @@ def_lex (void)
def_ungetc (c); def_ungetc (c);
if (ISALPHA (q)) /* Check for tokens. */ 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 (strcmp (tokens[i].name, buffer) == 0)
{ {
#if TRACE #if TRACE
@ -1426,12 +1426,12 @@ def_lex (void)
{ {
c = def_getc (); c = def_getc ();
if (c == '=') if (c == '=')
{ {
#if TRACE #if TRACE
printf ("lex: `==' returns EQUAL\n"); printf ("lex: `==' returns EQUAL\n");
#endif #endif
return EQUAL; return EQUAL;
} }
def_ungetc (c); def_ungetc (c);
#if TRACE #if TRACE
printf ("lex: `=' returns itself\n"); printf ("lex: `=' returns itself\n");

View File

@ -3,9 +3,9 @@
# '*' pattern is for. # '*' pattern is for.
case ${target} in case ${target} in
arceb-*) arceb-*)
ARC_ENDIAN="big" ARC_ENDIAN="big"
;; ;;
arc-* | * ) arc-* | * )
ARC_ENDIAN="little" ARC_ENDIAN="little"
;; ;;
esac esac

View File

@ -41,11 +41,11 @@ case "$target" in
x86_64*-linux*|i[3-7]86-*-linux-*) x86_64*-linux*|i[3-7]86-*-linux-*)
case "$EMULATION_NAME" in case "$EMULATION_NAME" in
*32*) *32*)
LIBPATH_SUFFIX=x32 LIBPATH_SUFFIX=x32
LIBPATH_SUFFIX_SKIP=64 LIBPATH_SUFFIX_SKIP=64
;; ;;
*64*) *64*)
LIBPATH_SUFFIX=64 LIBPATH_SUFFIX=64
;; ;;
esac esac
;; ;;

View File

@ -40,7 +40,7 @@ EXTRA_EM_FILE=mmixelf
OTHER_TEXT_SECTIONS=" OTHER_TEXT_SECTIONS="
${RELOCATING+ ${RELOCATING+
_start. = (DEFINED (_start) ? _start _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.)); PROVIDE (Main = DEFINED (Main) ? Main : (DEFINED (_start) ? _start : _start.));
}" }"

View File

@ -41,7 +41,7 @@ case "$target" in
x86_64*-linux*|i[3-7]86-*-linux-*) x86_64*-linux*|i[3-7]86-*-linux-*)
case "$EMULATION_NAME" in case "$EMULATION_NAME" in
*64*) *64*)
LIBPATH_SUFFIX=64 LIBPATH_SUFFIX=64
PARSE_AND_LIST_OPTIONS_BNDPLT=' PARSE_AND_LIST_OPTIONS_BNDPLT='
fprintf (file, _("\ fprintf (file, _("\
-z bndplt Always generate BND prefix in PLT entries\n")); -z bndplt Always generate BND prefix in PLT entries\n"));
@ -52,7 +52,7 @@ case "$target" in
' '
PARSE_AND_LIST_OPTIONS="$PARSE_AND_LIST_OPTIONS $PARSE_AND_LIST_OPTIONS_BNDPLT" 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" PARSE_AND_LIST_ARGS_CASE_Z="$PARSE_AND_LIST_ARGS_CASE_Z $PARSE_AND_LIST_ARGS_CASE_Z_BNDPLT"
;; ;;
esac esac
;; ;;
*-*-solaris2*) *-*-solaris2*)

View File

@ -18,7 +18,7 @@ TINY_READONLY_SECTION=".tinyrodata :
TINY_DATA_SECTION=".tinydata ${RELOCATING+0xff8000} : TINY_DATA_SECTION=".tinydata ${RELOCATING+0xff8000} :
{ {
*(.tinydata) *(.tinydata)
${RELOCATING+ _tinydata = .; } ${RELOCATING+ _tinydata = .; }
}" }"
TINY_BSS_SECTION=".tinybss : ${RELOCATING+AT (_tinydata)} TINY_BSS_SECTION=".tinybss : ${RELOCATING+AT (_tinydata)}
{ {

View File

@ -18,7 +18,7 @@ TINY_READONLY_SECTION=".tinyrodata :
TINY_DATA_SECTION=".tinydata ${RELOCATING+0xff8000} : TINY_DATA_SECTION=".tinydata ${RELOCATING+0xff8000} :
{ {
*(.tinydata) *(.tinydata)
${RELOCATING+ _tinydata = .; } ${RELOCATING+ _tinydata = .; }
}" }"
TINY_BSS_SECTION=".tinybss : ${RELOCATING+AT (_tinydata)} TINY_BSS_SECTION=".tinybss : ${RELOCATING+AT (_tinydata)}
{ {

View File

@ -9,18 +9,18 @@
# be last. The other sections should be sorted, but the current linker script # 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. # parse does not seem to allow that with the SORT keyword in this context.
INIT_START='_init = .; INIT_START='_init = .;
KEEP (*(.init$00)); KEEP (*(.init$00));
KEEP (*(.init$0[1-9])); KEEP (*(.init$0[1-9]));
KEEP (*(.init$[1-8][0-9])); KEEP (*(.init$[1-8][0-9]));
KEEP (*(.init$9[0-8]));' KEEP (*(.init$9[0-8]));'
INIT_END='KEEP (*(.init$99));' INIT_END='KEEP (*(.init$99));'
FINI_START='_fini = .; FINI_START='_fini = .;
KEEP (*(.fini$00)); KEEP (*(.fini$00));
KEEP (*(.fini$0[1-9])); KEEP (*(.fini$0[1-9]));
KEEP (*(.fini$[1-8][0-9])); KEEP (*(.fini$[1-8][0-9]));
KEEP (*(.fini$9[0-8]));' KEEP (*(.fini$9[0-8]));'
FINI_END="KEEP (*(.fini\$99)); FINI_END="KEEP (*(.fini\$99));
PROVIDE (${SYMPREFIX}_etext = .);" PROVIDE (${SYMPREFIX}_etext = .);"
OTHER_READWRITE_SECTIONS=".tls_data ${RELOCATING-0} : {${RELOCATING+ OTHER_READWRITE_SECTIONS=".tls_data ${RELOCATING-0} : {${RELOCATING+
__wrs_rtp_tls_data_start = .; __wrs_rtp_tls_data_start = .;

View File

@ -55,10 +55,10 @@ aarch64_elf_before_allocation (void)
{ {
/* Here we rummage through the found bfds to collect information. */ /* Here we rummage through the found bfds to collect information. */
LANG_FOR_EACH_INPUT_STATEMENT (is) LANG_FOR_EACH_INPUT_STATEMENT (is)
{ {
/* Initialise mapping tables for code/data. */ /* Initialise mapping tables for code/data. */
bfd_elf${ELFSIZE}_aarch64_init_maps (is->the_bfd); bfd_elf${ELFSIZE}_aarch64_init_maps (is->the_bfd);
} }
} }
/* Call the standard elf routine. */ /* Call the standard elf routine. */
@ -357,7 +357,7 @@ EOF
PARSE_AND_LIST_PROLOGUE=' PARSE_AND_LIST_PROLOGUE='
#define OPTION_NO_ENUM_SIZE_WARNING 309 #define OPTION_NO_ENUM_SIZE_WARNING 309
#define OPTION_PIC_VENEER 310 #define OPTION_PIC_VENEER 310
#define OPTION_STUBGROUP_SIZE 311 #define OPTION_STUBGROUP_SIZE 311
#define OPTION_NO_WCHAR_SIZE_WARNING 312 #define OPTION_NO_WCHAR_SIZE_WARNING 312
#define OPTION_FIX_ERRATUM_835769 313 #define OPTION_FIX_ERRATUM_835769 313
#define OPTION_FIX_ERRATUM_843419 314 #define OPTION_FIX_ERRATUM_843419 314
@ -430,8 +430,8 @@ PARSE_AND_LIST_ARGS_CASES='
{ {
const char *end; const char *end;
group_size = bfd_scan_vma (optarg, &end, 0); group_size = bfd_scan_vma (optarg, &end, 0);
if (*end) if (*end)
einfo (_("%P%F: invalid number `%s'\''\n"), optarg); einfo (_("%P%F: invalid number `%s'\''\n"), optarg);
} }
break; break;

View File

@ -345,23 +345,23 @@ read_file_list (const char *filename)
{ {
/* Skip empty lines. */ /* Skip empty lines. */
while (*b == '\n' || *b == '\r') while (*b == '\n' || *b == '\r')
b++; b++;
/* Stop if end of buffer. */ /* Stop if end of buffer. */
if (b == buffer + len) if (b == buffer + len)
break; break;
/* Eat any byte until end of line. */ /* Eat any byte until end of line. */
for (e = b; *e != '\0'; e++) for (e = b; *e != '\0'; e++)
if (*e == '\n' || *e == '\r') if (*e == '\n' || *e == '\r')
break; break;
/* Replace end of line by nul. */ /* Replace end of line by nul. */
if (*e != '\0') if (*e != '\0')
*e++ = '\0'; *e++ = '\0';
if (b != e) 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; b = e;
} }
return; return;
@ -388,7 +388,7 @@ gld${EMULATION_NAME}_handle_option (int optc)
case 'f': case 'f':
/* This overrides --auxiliary. This option specifies a file containing /* This overrides --auxiliary. This option specifies a file containing
a list of input files. */ a list of input files. */
read_file_list (optarg); read_file_list (optarg);
break; break;

View File

@ -101,8 +101,8 @@ arm_elf_before_allocation (void)
/* Here we rummage through the found bfds to collect glue information. */ /* Here we rummage through the found bfds to collect glue information. */
LANG_FOR_EACH_INPUT_STATEMENT (is) LANG_FOR_EACH_INPUT_STATEMENT (is)
{ {
/* Initialise mapping tables for code/data. */ /* Initialise mapping tables for code/data. */
bfd_elf32_arm_init_maps (is->the_bfd); bfd_elf32_arm_init_maps (is->the_bfd);
if (!bfd_elf32_arm_process_before_allocation (is->the_bfd, if (!bfd_elf32_arm_process_before_allocation (is->the_bfd,
&link_info) &link_info)
@ -422,9 +422,9 @@ gld${EMULATION_NAME}_finish (void)
{ {
LANG_FOR_EACH_INPUT_STATEMENT (is) LANG_FOR_EACH_INPUT_STATEMENT (is)
{ {
/* Figure out where VFP11 erratum veneers (and the labels returning /* Figure out where VFP11 erratum veneers (and the labels returning
from same) have been placed. */ from same) have been placed. */
bfd_elf32_arm_vfp11_fix_veneer_locations (is->the_bfd, &link_info); bfd_elf32_arm_vfp11_fix_veneer_locations (is->the_bfd, &link_info);
/* Figure out where STM32L4XX erratum veneers (and the labels returning /* Figure out where STM32L4XX erratum veneers (and the labels returning
from them) have been placed. */ from them) have been placed. */
@ -531,13 +531,13 @@ arm_elf_create_output_section_statements (void)
bfd_elf32_arm_set_target_params (link_info.output_bfd, &link_info, &params); bfd_elf32_arm_set_target_params (link_info.output_bfd, &link_info, &params);
stub_file = lang_add_input_file ("linker stubs", stub_file = lang_add_input_file ("linker stubs",
lang_input_file_is_fake_enum, lang_input_file_is_fake_enum,
NULL); NULL);
stub_file->the_bfd = bfd_create ("linker stubs", link_info.output_bfd); stub_file->the_bfd = bfd_create ("linker stubs", link_info.output_bfd);
if (stub_file->the_bfd == NULL if (stub_file->the_bfd == NULL
|| ! bfd_set_arch_mach (stub_file->the_bfd, || ! bfd_set_arch_mach (stub_file->the_bfd,
bfd_get_arch (link_info.output_bfd), bfd_get_arch (link_info.output_bfd),
bfd_get_mach (link_info.output_bfd))) bfd_get_mach (link_info.output_bfd)))
{ {
einfo (_("%X%P: can not create BFD %E\n")); einfo (_("%X%P: can not create BFD %E\n"));
return; return;
@ -704,26 +704,26 @@ PARSE_AND_LIST_ARGS_CASES='
case OPTION_VFP11_DENORM_FIX: case OPTION_VFP11_DENORM_FIX:
if (strcmp (optarg, "none") == 0) 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) 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) 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 else
einfo (_("Unrecognized VFP11 fix type '\''%s'\''.\n"), optarg); einfo (_("Unrecognized VFP11 fix type '\''%s'\''.\n"), optarg);
break; break;
case OPTION_STM32L4XX_FIX: case OPTION_STM32L4XX_FIX:
if (!optarg) if (!optarg)
params.stm32l4xx_fix = BFD_ARM_STM32L4XX_FIX_DEFAULT; params.stm32l4xx_fix = BFD_ARM_STM32L4XX_FIX_DEFAULT;
else if (strcmp (optarg, "none") == 0) 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) 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) else if (strcmp (optarg, "all") == 0)
params.stm32l4xx_fix = BFD_ARM_STM32L4XX_FIX_ALL; params.stm32l4xx_fix = BFD_ARM_STM32L4XX_FIX_ALL;
else else
einfo (_("Unrecognized STM32L4XX fix type '\''%s'\''.\n"), optarg); einfo (_("Unrecognized STM32L4XX fix type '\''%s'\''.\n"), optarg);
break; break;
case OPTION_NO_ENUM_SIZE_WARNING: case OPTION_NO_ENUM_SIZE_WARNING:
@ -742,8 +742,8 @@ PARSE_AND_LIST_ARGS_CASES='
{ {
const char *end; const char *end;
group_size = bfd_scan_vma (optarg, &end, 0); group_size = bfd_scan_vma (optarg, &end, 0);
if (*end) if (*end)
einfo (_("%P%F: invalid number `%s'\''\n"), optarg); einfo (_("%P%F: invalid number `%s'\''\n"), optarg);
} }
break; break;

View File

@ -51,13 +51,13 @@ static void
avr_elf_set_global_bfd_parameters (void) avr_elf_set_global_bfd_parameters (void)
{ {
elf32_avr_setup_params (& link_info, elf32_avr_setup_params (& link_info,
stub_file->the_bfd, stub_file->the_bfd,
avr_stub_section, avr_stub_section,
avr_no_stubs, avr_no_stubs,
avr_debug_stubs, avr_debug_stubs,
avr_debug_relax, avr_debug_relax,
avr_pc_wrap_around, avr_pc_wrap_around,
avr_replace_call_ret_sequences); avr_replace_call_ret_sequences);
} }
@ -122,14 +122,14 @@ avr_elf_create_output_section_statements (void)
} }
stub_file = lang_add_input_file ("linker stubs", stub_file = lang_add_input_file ("linker stubs",
lang_input_file_is_fake_enum, lang_input_file_is_fake_enum,
NULL); NULL);
stub_file->the_bfd = bfd_create ("linker stubs", link_info.output_bfd); stub_file->the_bfd = bfd_create ("linker stubs", link_info.output_bfd);
if (stub_file->the_bfd == NULL if (stub_file->the_bfd == NULL
|| !bfd_set_arch_mach (stub_file->the_bfd, || !bfd_set_arch_mach (stub_file->the_bfd,
bfd_get_arch (link_info.output_bfd), bfd_get_arch (link_info.output_bfd),
bfd_get_mach (link_info.output_bfd))) bfd_get_mach (link_info.output_bfd)))
{ {
einfo (_("%X%P: can not create stub BFD %E\n")); einfo (_("%X%P: can not create stub BFD %E\n"));
return; return;
@ -138,7 +138,7 @@ avr_elf_create_output_section_statements (void)
/* Now we add the stub section. */ /* Now we add the stub section. */
flags = (SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_CODE 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, avr_stub_section = bfd_make_section_anyway_with_flags (stub_file->the_bfd,
".trampolines", ".trampolines",
flags); flags);
@ -151,9 +151,9 @@ avr_elf_create_output_section_statements (void)
return; return;
err_ret: err_ret:
einfo (_("%X%P: can not make stub section: %E\n")); einfo (_("%X%P: can not make stub section: %E\n"));
return; return;
} }
/* Re-calculates the size of the stubs so that we won't waste space. */ /* Re-calculates the size of the stubs so that we won't waste space. */
@ -199,17 +199,17 @@ avr_finish (void)
{ {
avr_link_relax = TRUE; avr_link_relax = TRUE;
for (abfd = link_info.input_bfds; abfd != NULL; abfd = abfd->link.next) for (abfd = link_info.input_bfds; abfd != NULL; abfd = abfd->link.next)
{ {
/* Don't let the linker stubs prevent the final object being /* Don't let the linker stubs prevent the final object being
marked as link-relax ready. */ marked as link-relax ready. */
if ((elf_elfheader (abfd)->e_flags if ((elf_elfheader (abfd)->e_flags
& EF_AVR_LINKRELAX_PREPARED) == 0 & EF_AVR_LINKRELAX_PREPARED) == 0
&& abfd != stub_file->the_bfd) && abfd != stub_file->the_bfd)
{ {
avr_link_relax = FALSE; avr_link_relax = FALSE;
break; break;
} }
} }
} }
else else
{ {
@ -234,15 +234,15 @@ EOF
PARSE_AND_LIST_PROLOGUE=' PARSE_AND_LIST_PROLOGUE='
#define OPTION_NO_CALL_RET_REPLACEMENT 301 #define OPTION_NO_CALL_RET_REPLACEMENT 301
#define OPTION_PMEM_WRAP_AROUND 302 #define OPTION_PMEM_WRAP_AROUND 302
#define OPTION_NO_STUBS 303 #define OPTION_NO_STUBS 303
#define OPTION_DEBUG_STUBS 304 #define OPTION_DEBUG_STUBS 304
#define OPTION_DEBUG_RELAX 305 #define OPTION_DEBUG_RELAX 305
' '
PARSE_AND_LIST_LONGOPTS=' PARSE_AND_LIST_LONGOPTS='
{ "no-call-ret-replacement", no_argument, { "no-call-ret-replacement", no_argument,
NULL, OPTION_NO_CALL_RET_REPLACEMENT}, NULL, OPTION_NO_CALL_RET_REPLACEMENT},
{ "pmem-wrap-around", required_argument, { "pmem-wrap-around", required_argument,
NULL, OPTION_PMEM_WRAP_AROUND}, NULL, OPTION_PMEM_WRAP_AROUND},
{ "no-stubs", no_argument, { "no-stubs", no_argument,
@ -286,17 +286,17 @@ PARSE_AND_LIST_ARGS_CASES='
case OPTION_PMEM_WRAP_AROUND: case OPTION_PMEM_WRAP_AROUND:
{ {
/* This variable is defined in the bfd library. */ /* This variable is defined in the bfd library. */
if ((!strcmp (optarg,"32k")) || (!strcmp (optarg,"32K"))) if ((!strcmp (optarg,"32k")) || (!strcmp (optarg,"32K")))
avr_pc_wrap_around = 32768; avr_pc_wrap_around = 32768;
else if ((!strcmp (optarg,"8k")) || (!strcmp (optarg,"8K"))) else if ((!strcmp (optarg,"8k")) || (!strcmp (optarg,"8K")))
avr_pc_wrap_around = 8192; avr_pc_wrap_around = 8192;
else if ((!strcmp (optarg,"16k")) || (!strcmp (optarg,"16K"))) else if ((!strcmp (optarg,"16k")) || (!strcmp (optarg,"16K")))
avr_pc_wrap_around = 16384; avr_pc_wrap_around = 16384;
else if ((!strcmp (optarg,"64k")) || (!strcmp (optarg,"64K"))) else if ((!strcmp (optarg,"64k")) || (!strcmp (optarg,"64K")))
avr_pc_wrap_around = 0x10000; avr_pc_wrap_around = 0x10000;
else else
return FALSE; return FALSE;
} }
break; break;
@ -314,8 +314,8 @@ PARSE_AND_LIST_ARGS_CASES='
case OPTION_NO_CALL_RET_REPLACEMENT: case OPTION_NO_CALL_RET_REPLACEMENT:
{ {
/* This variable is defined in the bfd library. */ /* This variable is defined in the bfd library. */
avr_replace_call_ret_sequences = FALSE; avr_replace_call_ret_sequences = FALSE;
} }
break; break;
' '

View File

@ -81,8 +81,8 @@ gld_${EMULATION_NAME}_before_parse (void)
#define OPTION_MINOR_OS_VERSION (OPTION_MINOR_IMAGE_VERSION + 1) #define OPTION_MINOR_OS_VERSION (OPTION_MINOR_IMAGE_VERSION + 1)
#define OPTION_MINOR_SUBSYSTEM_VERSION (OPTION_MINOR_OS_VERSION + 1) #define OPTION_MINOR_SUBSYSTEM_VERSION (OPTION_MINOR_OS_VERSION + 1)
#define OPTION_SECTION_ALIGNMENT (OPTION_MINOR_SUBSYSTEM_VERSION + 1) #define OPTION_SECTION_ALIGNMENT (OPTION_MINOR_SUBSYSTEM_VERSION + 1)
#define OPTION_STACK (OPTION_SECTION_ALIGNMENT + 1) #define OPTION_STACK (OPTION_SECTION_ALIGNMENT + 1)
#define OPTION_SUBSYSTEM (OPTION_STACK + 1) #define OPTION_SUBSYSTEM (OPTION_STACK + 1)
#define OPTION_HEAP (OPTION_SUBSYSTEM + 1) #define OPTION_HEAP (OPTION_SUBSYSTEM + 1)
static void static void

View File

@ -55,7 +55,7 @@ hppaelf_after_parse (void)
/* Enable this once we split millicode stuff from libgcc: /* Enable this once we split millicode stuff from libgcc:
lang_add_input_file ("milli", lang_add_input_file ("milli",
lang_input_file_is_l_enum, lang_input_file_is_l_enum,
NULL); NULL);
*/ */
@ -370,8 +370,8 @@ PARSE_AND_LIST_ARGS_CASES='
case OPTION_STUBGROUP_SIZE: case OPTION_STUBGROUP_SIZE:
{ {
const char *end; const char *end;
group_size = bfd_scan_vma (optarg, &end, 0); group_size = bfd_scan_vma (optarg, &end, 0);
if (*end) if (*end)
einfo (_("%P%F: invalid number `%s'\''\n"), optarg); einfo (_("%P%F: invalid number `%s'\''\n"), optarg);
} }
break; break;

View File

@ -72,7 +72,7 @@ gld${EMULATION_NAME}_after_open (void)
asection *datasec; asection *datasec;
/* As first-order business, make sure that each input BFD is COFF. It /* 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) if (bfd_get_flavour (abfd) != bfd_target_coff_flavour)
einfo (_("%F%B: all input objects must be COFF " einfo (_("%F%B: all input objects must be COFF "
"for --embedded-relocs\n")); "for --embedded-relocs\n"));
@ -80,12 +80,12 @@ gld${EMULATION_NAME}_after_open (void)
datasec = bfd_get_section_by_name (abfd, ".data"); datasec = bfd_get_section_by_name (abfd, ".data");
/* Note that we assume that the reloc_count field has already /* Note that we assume that the reloc_count field has already
been set up. We could call bfd_get_reloc_upper_bound, but been set up. We could call bfd_get_reloc_upper_bound, but
that returns the size of a memory buffer rather than a reloc that returns the size of a memory buffer rather than a reloc
count. We do not want to call bfd_canonicalize_reloc, count. We do not want to call bfd_canonicalize_reloc,
because although it would always work it would force us to because although it would always work it would force us to
read in the relocs into BFD canonical form, which would waste read in the relocs into BFD canonical form, which would waste
a significant amount of time and memory. */ a significant amount of time and memory. */
if (datasec != NULL && datasec->reloc_count > 0) if (datasec != NULL && datasec->reloc_count > 0)
{ {
asection *relsec; asection *relsec;
@ -103,7 +103,7 @@ gld${EMULATION_NAME}_after_open (void)
} }
/* Double check that all other data sections are empty, as is /* 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); bfd_map_over_sections (abfd, check_sections, datasec);
} }
} }

View File

@ -235,15 +235,15 @@ PARSE_AND_LIST_OPTIONS='
PARSE_AND_LIST_ARGS_CASES=' PARSE_AND_LIST_ARGS_CASES='
case OPTION_GOT: case OPTION_GOT:
if (strcmp (optarg, "target") == 0) if (strcmp (optarg, "target") == 0)
got_handling = GOT_HANDLING_TARGET_DEFAULT; got_handling = GOT_HANDLING_TARGET_DEFAULT;
else if (strcmp (optarg, "single") == 0) else if (strcmp (optarg, "single") == 0)
got_handling = 0; got_handling = 0;
else if (strcmp (optarg, "negative") == 0) else if (strcmp (optarg, "negative") == 0)
got_handling = 1; got_handling = 1;
else if (strcmp (optarg, "multigot") == 0) else if (strcmp (optarg, "multigot") == 0)
got_handling = 2; got_handling = 2;
else else
einfo (_("Unrecognized --got argument '\''%s'\''.\n"), optarg); einfo (_("Unrecognized --got argument '\''%s'\''.\n"), optarg);
break; break;
' '

View File

@ -328,8 +328,8 @@ PARSE_AND_LIST_ARGS_CASES='
case OPTION_STUBGROUP_SIZE: case OPTION_STUBGROUP_SIZE:
{ {
const char *end; const char *end;
group_size = bfd_scan_vma (optarg, &end, 0); group_size = bfd_scan_vma (optarg, &end, 0);
if (*end) if (*end)
einfo (_("%P%F: invalid number `%s'\''\n"), optarg); einfo (_("%P%F: invalid number `%s'\''\n"), optarg);
} }
break; break;

View File

@ -7,7 +7,7 @@ fragment <<EOF
Copyright (C) 2014-2017 Free Software Foundation, Inc. Copyright (C) 2014-2017 Free Software Foundation, Inc.
Written by Steve Chamberlain steve@cygnus.com Written by Steve Chamberlain steve@cygnus.com
Extended for the MSP430 by Nick Clifton nickc@redhat.com Extended for the MSP430 by Nick Clifton nickc@redhat.com
This file is part of the GNU Binutils. This file is part of the GNU Binutils.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
@ -197,7 +197,7 @@ scan_children (lang_statement_union_type * l)
break; break;
case lang_wild_statement_enum: case lang_wild_statement_enum:
amount += scan_children (l->wild_statement.children.head); amount += scan_children (l->wild_statement.children.head);
break; break;
case lang_data_statement_enum: case lang_data_statement_enum:
@ -214,7 +214,7 @@ scan_children (lang_statement_union_type * l)
return amount; return amount;
} }
/* Place an orphan section. We use this to put .either sections /* Place an orphan section. We use this to put .either sections
into either their lower or their upper equivalents. */ into either their lower or their upper equivalents. */
@ -258,7 +258,7 @@ gld${EMULATION_NAME}_place_orphan (asection * s,
} }
else else
name = (char *) secname; name = (char *) secname;
lower_name = concat (".lower", name, NULL); lower_name = concat (".lower", name, NULL);
upper_name = concat (".upper", name, NULL); upper_name = concat (".upper", name, NULL);

View File

@ -195,7 +195,7 @@ nds32_elf_after_allocation (void)
{ {
/* Initialize ex9 hash table. */ /* Initialize ex9 hash table. */
if (!nds32_elf_ex9_init ()) if (!nds32_elf_ex9_init ())
return; return;
} }
/* Call default after allocation callback. /* Call default after allocation callback.

View File

@ -242,9 +242,9 @@ fragment <<EOF
(OPTION_EXCLUDE_LIBS + 1) (OPTION_EXCLUDE_LIBS + 1)
#define OPTION_DLL_DISABLE_RUNTIME_PSEUDO_RELOC \ #define OPTION_DLL_DISABLE_RUNTIME_PSEUDO_RELOC \
(OPTION_DLL_ENABLE_RUNTIME_PSEUDO_RELOC + 1) (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 \ #define OPTION_DISABLE_LARGE_ADDRESS_AWARE \
(OPTION_LARGE_ADDRESS_AWARE + 1) (OPTION_LARGE_ADDRESS_AWARE + 1)
#define OPTION_DLL_ENABLE_RUNTIME_PSEUDO_RELOC_V1 \ #define OPTION_DLL_ENABLE_RUNTIME_PSEUDO_RELOC_V1 \
(OPTION_DISABLE_LARGE_ADDRESS_AWARE + 1) (OPTION_DISABLE_LARGE_ADDRESS_AWARE + 1)
#define OPTION_DLL_ENABLE_RUNTIME_PSEUDO_RELOC_V2 \ #define OPTION_DLL_ENABLE_RUNTIME_PSEUDO_RELOC_V2 \
@ -253,8 +253,8 @@ fragment <<EOF
(OPTION_DLL_ENABLE_RUNTIME_PSEUDO_RELOC_V2 + 1) (OPTION_DLL_ENABLE_RUNTIME_PSEUDO_RELOC_V2 + 1)
#define OPTION_USE_NUL_PREFIXED_IMPORT_TABLES \ #define OPTION_USE_NUL_PREFIXED_IMPORT_TABLES \
(OPTION_EXCLUDE_MODULES_FOR_IMPLIB + 1) (OPTION_EXCLUDE_MODULES_FOR_IMPLIB + 1)
#define OPTION_NO_LEADING_UNDERSCORE (OPTION_USE_NUL_PREFIXED_IMPORT_TABLES + 1) #define OPTION_NO_LEADING_UNDERSCORE (OPTION_USE_NUL_PREFIXED_IMPORT_TABLES + 1)
#define OPTION_LEADING_UNDERSCORE (OPTION_NO_LEADING_UNDERSCORE + 1) #define OPTION_LEADING_UNDERSCORE (OPTION_NO_LEADING_UNDERSCORE + 1)
#define OPTION_ENABLE_LONG_SECTION_NAMES \ #define OPTION_ENABLE_LONG_SECTION_NAMES \
(OPTION_LEADING_UNDERSCORE + 1) (OPTION_LEADING_UNDERSCORE + 1)
#define OPTION_DISABLE_LONG_SECTION_NAMES \ #define OPTION_DISABLE_LONG_SECTION_NAMES \
@ -531,10 +531,10 @@ set_entry_point (void)
int i; int i;
static const struct static const struct
{ {
const int value; const int value;
const char *entry; const char *entry;
} }
v[] = v[] =
{ {
{ 1, "NtProcessStartup" }, { 1, "NtProcessStartup" },
@ -560,14 +560,14 @@ set_entry_point (void)
else else
{ {
for (i = 0; v[i].entry; i++) for (i = 0; v[i].entry; i++)
if (v[i].value == pe_subsystem) if (v[i].value == pe_subsystem)
break; break;
/* If no match, use the default. */ /* If no match, use the default. */
if (v[i].entry != NULL) if (v[i].entry != NULL)
entry = v[i].entry; entry = v[i].entry;
else else
entry = default_entry; entry = default_entry;
} }
initial_symbol_char = (is_underscoring () != 0 ? "_" : ""); initial_symbol_char = (is_underscoring () != 0 ? "_" : "");
@ -1109,7 +1109,7 @@ pe_fixup_stdcalls (void)
if (lead_at) if (lead_at)
*cname = '_'; *cname = '_';
if (at) if (at)
* strchr (cname, '@') = 0; * strchr (cname, '@') = 0;
sym = bfd_link_hash_lookup (link_info.hash, cname, FALSE, FALSE, TRUE); sym = bfd_link_hash_lookup (link_info.hash, cname, FALSE, FALSE, TRUE);
@ -1290,9 +1290,9 @@ pecoff_checksum_contents (bfd *abfd,
status = bfd_bread (&b, (bfd_size_type) 1, abfd); status = bfd_bread (&b, (bfd_size_type) 1, abfd);
if (status < 1) if (status < 1)
{ {
break; break;
} }
(*process) (&b, 1, arg); (*process) (&b, 1, arg);
filepos += 1; filepos += 1;
@ -1317,25 +1317,25 @@ write_build_id (bfd *abfd)
{ {
struct bfd_link_order *l = NULL; struct bfd_link_order *l = NULL;
for (l = asec->map_head.link_order; l != NULL; l = l->next) for (l = asec->map_head.link_order; l != NULL; l = l->next)
{ {
if (l->type == bfd_indirect_link_order) if (l->type == bfd_indirect_link_order)
{ {
if (l->u.indirect.section == t->build_id.sec) if (l->u.indirect.section == t->build_id.sec)
{ {
link_order = l; link_order = l;
break; break;
} }
} }
} }
if (link_order) if (link_order)
break; break;
} }
if (!link_order) if (!link_order)
{ {
einfo (_("%P: warning: .buildid section discarded," einfo (_("%P: warning: .buildid section discarded,"
" --build-id ignored.\n")); " --build-id ignored.\n"));
return TRUE; return TRUE;
} }
@ -1947,7 +1947,7 @@ gld_${EMULATION_NAME}_unrecognized_file (lang_input_statement_type *entry ATTRIB
struct bfd_link_hash_entry *h; struct bfd_link_hash_entry *h;
sprintf (buf, "%s%s", U (""), 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); h = bfd_link_hash_lookup (link_info.hash, buf, TRUE, TRUE, TRUE);
if (h == (struct bfd_link_hash_entry *) NULL) if (h == (struct bfd_link_hash_entry *) NULL)
@ -2342,8 +2342,8 @@ gld_${EMULATION_NAME}_open_dynamic_archive
/* Alternate explicit import library for dll's. */ /* Alternate explicit import library for dll's. */
{ "%s.dll.a", FALSE }, { "%s.dll.a", FALSE },
/* "libfoo.a" could be either an import lib or a static lib. /* "libfoo.a" could be either an import lib or a static lib.
For backwards compatibility, libfoo.a needs to precede For backwards compatibility, libfoo.a needs to precede
libfoo.dll and foo.dll in the search. */ libfoo.dll and foo.dll in the search. */
{ "lib%s.a", FALSE }, { "lib%s.a", FALSE },
/* The 'native' spelling of an import lib name is "foo.lib". */ /* The 'native' spelling of an import lib name is "foo.lib". */
{ "%s.lib", FALSE }, { "%s.lib", FALSE },

View File

@ -493,10 +493,10 @@ set_entry_point (void)
int i; int i;
static const struct static const struct
{ {
const int value; const int value;
const char *entry; const char *entry;
} }
v[] = v[] =
{ {
{ 1, "NtProcessStartup" }, { 1, "NtProcessStartup" },
@ -518,14 +518,14 @@ set_entry_point (void)
else else
{ {
for (i = 0; v[i].entry; i++) for (i = 0; v[i].entry; i++)
if (v[i].value == pep_subsystem) if (v[i].value == pep_subsystem)
break; break;
/* If no match, use the default. */ /* If no match, use the default. */
if (v[i].entry != NULL) if (v[i].entry != NULL)
entry = v[i].entry; entry = v[i].entry;
else else
entry = default_entry; entry = default_entry;
} }
/* Now we check target's default for getting proper symbol_char. */ /* Now we check target's default for getting proper symbol_char. */
@ -1257,9 +1257,9 @@ pecoff_checksum_contents (bfd *abfd,
status = bfd_bread (&b, (bfd_size_type) 1, abfd); status = bfd_bread (&b, (bfd_size_type) 1, abfd);
if (status < 1) if (status < 1)
{ {
break; break;
} }
(*process) (&b, 1, arg); (*process) (&b, 1, arg);
filepos += 1; filepos += 1;
@ -1284,25 +1284,25 @@ write_build_id (bfd *abfd)
{ {
struct bfd_link_order *l = NULL; struct bfd_link_order *l = NULL;
for (l = asec->map_head.link_order; l != NULL; l = l->next) for (l = asec->map_head.link_order; l != NULL; l = l->next)
{ {
if (l->type == bfd_indirect_link_order) if (l->type == bfd_indirect_link_order)
{ {
if (l->u.indirect.section == t->build_id.sec) if (l->u.indirect.section == t->build_id.sec)
{ {
link_order = l; link_order = l;
break; break;
} }
} }
} }
if (link_order) if (link_order)
break; break;
} }
if (!link_order) if (!link_order)
{ {
einfo (_("%P: warning: .buildid section discarded," einfo (_("%P: warning: .buildid section discarded,"
" --build-id ignored.\n")); " --build-id ignored.\n"));
return TRUE; return TRUE;
} }
@ -2115,8 +2115,8 @@ gld_${EMULATION_NAME}_open_dynamic_archive
/* Alternate explicit import library for dll's. */ /* Alternate explicit import library for dll's. */
{ "%s.dll.a", FALSE }, { "%s.dll.a", FALSE },
/* "libfoo.a" could be either an import lib or a static lib. /* "libfoo.a" could be either an import lib or a static lib.
For backwards compatibility, libfoo.a needs to precede For backwards compatibility, libfoo.a needs to precede
libfoo.dll and foo.dll in the search. */ libfoo.dll and foo.dll in the search. */
{ "lib%s.a", FALSE }, { "lib%s.a", FALSE },
/* The 'native' spelling of an import lib name is "foo.lib". */ /* The 'native' spelling of an import lib name is "foo.lib". */
{ "%s.lib", FALSE }, { "%s.lib", FALSE },

View File

@ -826,8 +826,8 @@ PARSE_AND_LIST_ARGS_CASES=${PARSE_AND_LIST_ARGS_CASES}'
case OPTION_STUBGROUP_SIZE: case OPTION_STUBGROUP_SIZE:
{ {
const char *end; const char *end;
params.group_size = bfd_scan_vma (optarg, &end, 0); params.group_size = bfd_scan_vma (optarg, &end, 0);
if (*end) if (*end)
einfo (_("%P%F: invalid number `%s'\''\n"), optarg); einfo (_("%P%F: invalid number `%s'\''\n"), optarg);
} }
break; break;

View File

@ -170,7 +170,7 @@ sh64_elf_${EMULATION_NAME}_before_allocation (void)
break_1: break_1:
/* Check that all input sections have the same contents-type flags /* 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) LANG_FOR_EACH_INPUT_STATEMENT (f)
{ {
@ -302,7 +302,7 @@ sh64_elf_${EMULATION_NAME}_after_allocation (void)
break_1: break_1:
/* Check that all input sections have the same contents-type flags /* 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) LANG_FOR_EACH_INPUT_STATEMENT (f)
{ {

View File

@ -101,7 +101,7 @@
#define irq_stat save4 #define irq_stat save4
.text .text
.align 4 .align 4
.type __rv_pattern, @object .type __rv_pattern, @object
.size __rv_pattern, 16 .size __rv_pattern, 16
__rv_pattern: __rv_pattern:
@ -126,7 +126,7 @@ __ovly_current:
* Load the previous overlay and jump to the caller return address. * Load the previous overlay and jump to the caller return address.
* Updates __ovly_current. * Updates __ovly_current.
*/ */
.align 4 .align 4
.global __ovly_return .global __ovly_return
.type __ovly_return, @function .type __ovly_return, @function
__ovly_return: __ovly_return:
@ -446,7 +446,7 @@ __ovly_xfer_loop:
#endif #endif
andc oldvma, oldvma, pbit # 0,2 77 andc oldvma, oldvma, pbit # 0,2 77
lqd save1, -16($sp) # 1,6 77 lqd save1, -16($sp) # 1,6 77
nop # 0,0 78 nop # 0,0 78
#lnop #lnop
#nop #nop
stqx oldvma, tab5, off5 # 1,6 79 stqx oldvma, tab5, off5 # 1,6 79

View File

@ -421,7 +421,7 @@ gld${EMULATION_NAME}_finish (void)
if (is_spu_target ()) if (is_spu_target ())
{ {
if (params.local_store_lo < params.local_store_hi) if (params.local_store_lo < params.local_store_hi)
{ {
asection *s; asection *s;
s = spu_elf_check_vma (&link_info); s = spu_elf_check_vma (&link_info);

View File

@ -103,7 +103,7 @@ gld${EMULATION_NAME}_after_allocation (void)
the unwind table index. */ the unwind table index. */
unsigned int list_size = 10; unsigned int list_size = 10;
asection **sec_list = (asection **) asection **sec_list = (asection **)
xmalloc (list_size * sizeof (asection *)); xmalloc (list_size * sizeof (asection *));
unsigned int sec_count = 0; unsigned int sec_count = 0;
LANG_FOR_EACH_INPUT_STATEMENT (is) LANG_FOR_EACH_INPUT_STATEMENT (is)
@ -130,7 +130,7 @@ gld${EMULATION_NAME}_after_allocation (void)
{ {
list_size *= 2; list_size *= 2;
sec_list = (asection **) sec_list = (asection **)
xrealloc (sec_list, list_size * sizeof (asection *)); xrealloc (sec_list, list_size * sizeof (asection *));
} }
sec_list[sec_count++] = sec; sec_list[sec_count++] = sec;

View File

@ -78,17 +78,17 @@ gld${EMULATION_NAME}_handle_option (int optc)
case OPTION_COFF_FORMAT: case OPTION_COFF_FORMAT:
if ((*optarg == '0' || *optarg == '1' || *optarg == '2') if ((*optarg == '0' || *optarg == '1' || *optarg == '2')
&& optarg[1] == '\0') && optarg[1] == '\0')
{ {
static char buf[] = "coffX-${OUTPUT_FORMAT_TEMPLATE}"; static char buf[] = "coffX-${OUTPUT_FORMAT_TEMPLATE}";
coff_version = *optarg - '0'; coff_version = *optarg - '0';
buf[4] = *optarg; buf[4] = *optarg;
lang_add_output_format (buf, NULL, NULL, 0); lang_add_output_format (buf, NULL, NULL, 0);
} }
else else
{ {
einfo (_("%P%F: invalid COFF format version %s\n"), optarg); einfo (_("%P%F: invalid COFF format version %s\n"), optarg);
} }
break; break;
} }
return FALSE; return FALSE;

View File

@ -52,8 +52,8 @@ gld${EMULATION_NAME}_create_output_section_statements (void)
static bfd_boolean static bfd_boolean
gld${EMULATION_NAME}_open_dynamic_archive (const char *arch ATTRIBUTE_UNUSED, gld${EMULATION_NAME}_open_dynamic_archive (const char *arch ATTRIBUTE_UNUSED,
search_dirs_type *search, search_dirs_type *search,
lang_input_statement_type *entry) lang_input_statement_type *entry)
{ {
char *string; char *string;
@ -198,7 +198,7 @@ gld${EMULATION_NAME}_before_allocation (void)
if (elf_hash_table (&link_info)->dynamic_sections_created if (elf_hash_table (&link_info)->dynamic_sections_created
&& bed->elf_backend_size_dynamic_sections && bed->elf_backend_size_dynamic_sections
&& ! (*bed->elf_backend_size_dynamic_sections) (link_info.output_bfd, && ! (*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")); einfo (_("%P%F: failed to set dynamic section sizes: %E\n"));
before_allocation_default (); before_allocation_default ();

View File

@ -280,7 +280,7 @@ DEFAULT_DATA_ALIGNMENT="ALIGN(${SEGMENT_SIZE})"
( echo "/* Script for ld -r: link without relocation */" ( echo "/* Script for ld -r: link without relocation */"
. ${CUSTOMIZER_SCRIPT} . ${CUSTOMIZER_SCRIPT}
. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xr ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xr
LD_FLAG=u LD_FLAG=u
DATA_ALIGNMENT=${DATA_ALIGNMENT_u} DATA_ALIGNMENT=${DATA_ALIGNMENT_u}
@ -288,7 +288,7 @@ CONSTRUCTING=" "
( echo "/* Script for ld -Ur: link w/out relocation, do create constructors */" ( echo "/* Script for ld -Ur: link w/out relocation, do create constructors */"
. ${CUSTOMIZER_SCRIPT} . ${CUSTOMIZER_SCRIPT}
. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xu ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xu
LD_FLAG= LD_FLAG=
DATA_ALIGNMENT=${DATA_ALIGNMENT_} DATA_ALIGNMENT=${DATA_ALIGNMENT_}
@ -296,21 +296,21 @@ RELOCATING=" "
( echo "/* Default linker script, for normal executables */" ( echo "/* Default linker script, for normal executables */"
. ${CUSTOMIZER_SCRIPT} . ${CUSTOMIZER_SCRIPT}
. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.x ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.x
LD_FLAG=n LD_FLAG=n
DATA_ALIGNMENT=${DATA_ALIGNMENT_n} DATA_ALIGNMENT=${DATA_ALIGNMENT_n}
( echo "/* Script for -n: mix text and data on same page */" ( echo "/* Script for -n: mix text and data on same page */"
. ${CUSTOMIZER_SCRIPT} . ${CUSTOMIZER_SCRIPT}
. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xn ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xn
LD_FLAG=N LD_FLAG=N
DATA_ALIGNMENT=${DATA_ALIGNMENT_N} DATA_ALIGNMENT=${DATA_ALIGNMENT_N}
( echo "/* Script for -N: mix text and data on same page; don't align data */" ( echo "/* Script for -N: mix text and data on same page; don't align data */"
. ${CUSTOMIZER_SCRIPT} . ${CUSTOMIZER_SCRIPT}
. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc . ${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 if test -n "$GENERATE_COMBRELOC_SCRIPT"; then
DATA_ALIGNMENT=${DATA_ALIGNMENT_c-${DATA_ALIGNMENT_}} DATA_ALIGNMENT=${DATA_ALIGNMENT_c-${DATA_ALIGNMENT_}}
@ -319,7 +319,7 @@ if test -n "$GENERATE_COMBRELOC_SCRIPT"; then
( echo "/* Script for -z combreloc: combine and sort reloc sections */" ( echo "/* Script for -z combreloc: combine and sort reloc sections */"
. ${CUSTOMIZER_SCRIPT} . ${CUSTOMIZER_SCRIPT}
. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xc ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xc
rm -f ${COMBRELOC} rm -f ${COMBRELOC}
LD_FLAG=w LD_FLAG=w
RELRO_NOW=" " RELRO_NOW=" "
@ -327,7 +327,7 @@ if test -n "$GENERATE_COMBRELOC_SCRIPT"; then
( echo "/* Script for -z combreloc -z now -z relro: combine and sort reloc sections */" ( echo "/* Script for -z combreloc -z now -z relro: combine and sort reloc sections */"
. ${CUSTOMIZER_SCRIPT} . ${CUSTOMIZER_SCRIPT}
. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xw ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xw
rm -f ${COMBRELOC} rm -f ${COMBRELOC}
COMBRELOC= COMBRELOC=
unset RELRO_NOW unset RELRO_NOW
@ -341,7 +341,7 @@ if test -n "$GENERATE_SHLIB_SCRIPT"; then
echo "/* Script for ld --shared: link shared library */" echo "/* Script for ld --shared: link shared library */"
. ${CUSTOMIZER_SCRIPT} . ${CUSTOMIZER_SCRIPT}
. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc . ${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 if test -n "$GENERATE_COMBRELOC_SCRIPT"; then
LD_FLAG=cshared LD_FLAG=cshared
DATA_ALIGNMENT=${DATA_ALIGNMENT_sc-${DATA_ALIGNMENT}} DATA_ALIGNMENT=${DATA_ALIGNMENT_sc-${DATA_ALIGNMENT}}
@ -349,7 +349,7 @@ if test -n "$GENERATE_SHLIB_SCRIPT"; then
( echo "/* Script for --shared -z combreloc: shared library, combine & sort relocs */" ( echo "/* Script for --shared -z combreloc: shared library, combine & sort relocs */"
. ${CUSTOMIZER_SCRIPT} . ${CUSTOMIZER_SCRIPT}
. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xsc ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xsc
rm -f ${COMBRELOC} rm -f ${COMBRELOC}
LD_FLAG=wshared LD_FLAG=wshared
RELRO_NOW=" " RELRO_NOW=" "
@ -357,7 +357,7 @@ if test -n "$GENERATE_SHLIB_SCRIPT"; then
( echo "/* Script for --shared -z combreloc -z now -z relro: shared library, combine & sort relocs */" ( echo "/* Script for --shared -z combreloc -z now -z relro: shared library, combine & sort relocs */"
. ${CUSTOMIZER_SCRIPT} . ${CUSTOMIZER_SCRIPT}
. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xsw ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xsw
rm -f ${COMBRELOC} rm -f ${COMBRELOC}
COMBRELOC= COMBRELOC=
unset RELRO_NOW unset RELRO_NOW
@ -373,7 +373,7 @@ if test -n "$GENERATE_PIE_SCRIPT"; then
echo "/* Script for ld -pie: link position independent executable */" echo "/* Script for ld -pie: link position independent executable */"
. ${CUSTOMIZER_SCRIPT} . ${CUSTOMIZER_SCRIPT}
. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc . ${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 if test -n "$GENERATE_COMBRELOC_SCRIPT"; then
LD_FLAG=cpie LD_FLAG=cpie
DATA_ALIGNMENT=${DATA_ALIGNMENT_sc-${DATA_ALIGNMENT}} DATA_ALIGNMENT=${DATA_ALIGNMENT_sc-${DATA_ALIGNMENT}}
@ -381,7 +381,7 @@ if test -n "$GENERATE_PIE_SCRIPT"; then
( echo "/* Script for -pie -z combreloc: position independent executable, combine & sort relocs */" ( echo "/* Script for -pie -z combreloc: position independent executable, combine & sort relocs */"
. ${CUSTOMIZER_SCRIPT} . ${CUSTOMIZER_SCRIPT}
. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xdc ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xdc
rm -f ${COMBRELOC} rm -f ${COMBRELOC}
LD_FLAG=wpie LD_FLAG=wpie
RELRO_NOW=" " RELRO_NOW=" "
@ -389,7 +389,7 @@ if test -n "$GENERATE_PIE_SCRIPT"; then
( echo "/* Script for -pie -z combreloc -z now -z relro: position independent executable, combine & sort relocs */" ( echo "/* Script for -pie -z combreloc -z now -z relro: position independent executable, combine & sort relocs */"
. ${CUSTOMIZER_SCRIPT} . ${CUSTOMIZER_SCRIPT}
. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xdw ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xdw
rm -f ${COMBRELOC} rm -f ${COMBRELOC}
COMBRELOC= COMBRELOC=
unset RELRO_NOW unset RELRO_NOW
@ -404,7 +404,7 @@ if test -n "$GENERATE_AUTO_IMPORT_SCRIPT"; then
echo "/* Script for ld --enable-auto-import: Like the default script except read only data is placed into .data */" echo "/* Script for ld --enable-auto-import: Like the default script except read only data is placed into .data */"
. ${CUSTOMIZER_SCRIPT} . ${CUSTOMIZER_SCRIPT}
. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xa ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xa
fi fi
case "$COMPILE_IN: $EMULATION_LIBPATH " in case "$COMPILE_IN: $EMULATION_LIBPATH " in

View File

@ -846,7 +846,7 @@ from the place where the @command{ar}, @command{nm} and
those commands to make use of a compiler based plugin it must first be those commands to make use of a compiler based plugin it must first be
copied into the @file{$@{libdir@}/bfd-plugins} directory. All gcc copied into the @file{$@{libdir@}/bfd-plugins} directory. All gcc
based linker plugins are backward compatible, so it is sufficient to 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 @kindex --push-state
@cindex push state governing input file handling @cindex push state governing input file handling
@ -1142,7 +1142,7 @@ This option marks the executable as requiring global auditing by
setting the @code{DF_1_GLOBAUDIT} bit in the @code{DT_FLAGS_1} dynamic setting the @code{DF_1_GLOBAUDIT} bit in the @code{DT_FLAGS_1} dynamic
tag. Global auditing requires that any auditing library defined via tag. Global auditing requires that any auditing library defined via
the @option{--depaudit} or @option{-P} command line options be run for 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 @item initfirst
This option is only meaningful when building a shared object. This option is only meaningful when building a shared object.

View File

@ -199,27 +199,27 @@ mri_script_file:
mri_script_lines: mri_script_lines:
mri_script_lines mri_script_command NEWLINE mri_script_lines mri_script_command NEWLINE
| |
; ;
mri_script_command: mri_script_command:
CHIP exp CHIP exp
| CHIP exp ',' exp | CHIP exp ',' exp
| NAME { | NAME {
einfo(_("%P%F: unrecognised keyword in MRI style script '%s'\n"),$1); einfo(_("%P%F: unrecognised keyword in MRI style script '%s'\n"),$1);
} }
| LIST { | LIST {
config.map_filename = "-"; config.map_filename = "-";
} }
| ORDER ordernamelist | ORDER ordernamelist
| ENDWORD | ENDWORD
| PUBLIC NAME '=' exp | PUBLIC NAME '=' exp
{ mri_public($2, $4); } { mri_public($2, $4); }
| PUBLIC NAME ',' exp | PUBLIC NAME ',' exp
{ mri_public($2, $4); } { mri_public($2, $4); }
| PUBLIC NAME exp | PUBLIC NAME exp
{ mri_public($2, $3); } { mri_public($2, $3); }
| FORMAT NAME | FORMAT NAME
{ mri_format($2); } { mri_format($2); }
| SECT NAME ',' exp | SECT NAME ',' exp
{ mri_output_section($2, $4);} { mri_output_section($2, $4);}
@ -237,13 +237,13 @@ mri_script_command:
{ mri_alignmod($2,$4); } { mri_alignmod($2,$4); }
| ABSOLUTE mri_abs_name_list | ABSOLUTE mri_abs_name_list
| LOAD mri_load_name_list | LOAD mri_load_name_list
| NAMEWORD NAME | NAMEWORD NAME
{ mri_name($2); } { mri_name($2); }
| ALIAS NAME ',' NAME | ALIAS NAME ',' NAME
{ mri_alias($2,$4,0);} { mri_alias($2,$4,0);}
| ALIAS NAME ',' INT | ALIAS NAME ',' INT
{ mri_alias ($2, 0, (int) $4.integer); } { mri_alias ($2, 0, (int) $4.integer); }
| BASE exp | BASE exp
{ mri_base($2); } { mri_base($2); }
| TRUNCATE INT | TRUNCATE INT
{ mri_truncate ((unsigned int) $2.integer); } { mri_truncate ((unsigned int) $2.integer); }
@ -255,13 +255,13 @@ mri_script_command:
{ ldlex_popstate (); } { ldlex_popstate (); }
| START NAME | START NAME
{ lang_add_entry ($2, FALSE); } { lang_add_entry ($2, FALSE); }
| |
; ;
ordernamelist: ordernamelist:
ordernamelist ',' NAME { mri_order($3); } ordernamelist ',' NAME { mri_order($3); }
| ordernamelist NAME { mri_order($2); } | ordernamelist NAME { mri_order($2); }
| |
; ;
mri_load_name_list: mri_load_name_list:
@ -271,10 +271,10 @@ mri_load_name_list:
; ;
mri_abs_name_list: mri_abs_name_list:
NAME NAME
{ mri_only_load($1); } { mri_only_load($1); }
| mri_abs_name_list ',' NAME | mri_abs_name_list ',' NAME
{ mri_only_load($3); } { mri_only_load($3); }
; ;
casesymlist: casesymlist:
@ -302,11 +302,11 @@ script_file:
{ ldlex_both(); } { ldlex_both(); }
ifile_list ifile_list
{ ldlex_popstate(); } { ldlex_popstate(); }
; ;
ifile_list: ifile_list:
ifile_list ifile_p1 ifile_list ifile_p1
| |
; ;
@ -320,19 +320,19 @@ ifile_p1:
| floating_point_support | floating_point_support
| statement_anywhere | statement_anywhere
| version | version
| ';' | ';'
| TARGET_K '(' NAME ')' | TARGET_K '(' NAME ')'
{ lang_add_target($3); } { lang_add_target($3); }
| SEARCH_DIR '(' filename ')' | SEARCH_DIR '(' filename ')'
{ ldfile_add_library_path ($3, FALSE); } { ldfile_add_library_path ($3, FALSE); }
| OUTPUT '(' filename ')' | OUTPUT '(' filename ')'
{ lang_add_output($3, 1); } { lang_add_output($3, 1); }
| OUTPUT_FORMAT '(' NAME ')' | OUTPUT_FORMAT '(' NAME ')'
{ lang_add_output_format ($3, (char *) NULL, { lang_add_output_format ($3, (char *) NULL,
(char *) NULL, 1); } (char *) NULL, 1); }
| OUTPUT_FORMAT '(' NAME ',' NAME ',' NAME ')' | OUTPUT_FORMAT '(' NAME ',' NAME ',' NAME ')'
{ lang_add_output_format ($3, $5, $7, 1); } { lang_add_output_format ($3, $5, $7, 1); }
| OUTPUT_ARCH '(' NAME ')' | OUTPUT_ARCH '(' NAME ')'
{ ldfile_set_output_arch ($3, bfd_arch_unknown); } { ldfile_set_output_arch ($3, bfd_arch_unknown); }
| FORCE_COMMON_ALLOCATION | FORCE_COMMON_ALLOCATION
{ command_line.force_common_definition = TRUE ; } { command_line.force_common_definition = TRUE ; }
@ -345,7 +345,7 @@ ifile_p1:
{ lang_enter_group (); } { lang_enter_group (); }
'(' input_list ')' '(' input_list ')'
{ lang_leave_group (); } { lang_leave_group (); }
| MAP '(' filename ')' | MAP '(' filename ')'
{ lang_add_map($3); } { lang_add_map($3); }
| INCLUDE filename | INCLUDE filename
{ ldlex_script (); ldfile_open_command_file($2); } { ldlex_script (); ldfile_open_command_file($2); }
@ -455,7 +455,7 @@ wildcard_maybe_exclude:
$$.exclude_name_list = NULL; $$.exclude_name_list = NULL;
$$.section_flag_list = NULL; $$.section_flag_list = NULL;
} }
| EXCLUDE_FILE '(' exclude_name_list ')' wildcard_name | EXCLUDE_FILE '(' exclude_name_list ')' wildcard_name
{ {
$$.name = $5; $$.name = $5;
$$.sorted = none; $$.sorted = none;
@ -632,11 +632,11 @@ input_section_spec_no_keep:
tmp.section_flag_list = $1; tmp.section_flag_list = $1;
lang_add_wild (&tmp, NULL, ldgram_had_keep); lang_add_wild (&tmp, NULL, ldgram_had_keep);
} }
| '[' section_name_list ']' | '[' section_name_list ']'
{ {
lang_add_wild (NULL, $2, ldgram_had_keep); lang_add_wild (NULL, $2, ldgram_had_keep);
} }
| sect_flags '[' section_name_list ']' | sect_flags '[' section_name_list ']'
{ {
struct wildcard_spec tmp; struct wildcard_spec tmp;
tmp.name = NULL; tmp.name = NULL;
@ -665,13 +665,13 @@ input_section_spec:
; ;
statement: statement:
assignment end assignment end
| CREATE_OBJECT_SYMBOLS | CREATE_OBJECT_SYMBOLS
{ {
lang_add_attribute(lang_object_symbols_statement_enum); lang_add_attribute(lang_object_symbols_statement_enum);
} }
| ';' | ';'
| CONSTRUCTORS | CONSTRUCTORS
{ {
lang_add_attribute(lang_constructors_statement_enum); lang_add_attribute(lang_constructors_statement_enum);
@ -682,15 +682,15 @@ statement:
lang_add_attribute (lang_constructors_statement_enum); lang_add_attribute (lang_constructors_statement_enum);
} }
| input_section_spec | input_section_spec
| length '(' mustbe_exp ')' | length '(' mustbe_exp ')'
{ {
lang_add_data ((int) $1, $3); lang_add_data ((int) $1, $3);
} }
| FILL '(' fill_exp ')' | FILL '(' fill_exp ')'
{ {
lang_add_fill ($3); lang_add_fill ($3);
} }
| ASSERT_K {ldlex_expression ();} '(' exp ',' NAME ')' end | ASSERT_K {ldlex_expression ();} '(' exp ',' NAME ')' end
{ ldlex_popstate (); { ldlex_popstate ();
lang_add_assignment (exp_assert ($4, $6)); } lang_add_assignment (exp_assert ($4, $6)); }
@ -702,7 +702,7 @@ statement:
statement_list: statement_list:
statement_list statement statement_list statement
| statement | statement
; ;
statement_list_opt: statement_list_opt:
@ -717,7 +717,7 @@ length:
{ $$ = $1; } { $$ = $1; }
| LONG | LONG
{ $$ = $1; } { $$ = $1; }
| SHORT | SHORT
{ $$ = $1; } { $$ = $1; }
| BYTE | BYTE
{ $$ = $1; } { $$ = $1; }
@ -733,7 +733,7 @@ fill_exp:
fill_opt: fill_opt:
'=' fill_exp '=' fill_exp
{ $$ = $2; } { $$ = $2; }
| { $$ = (fill_type *) 0; } | { $$ = (fill_type *) 0; }
; ;
assign_op: assign_op:
@ -741,17 +741,17 @@ assign_op:
{ $$ = '+'; } { $$ = '+'; }
| MINUSEQ | MINUSEQ
{ $$ = '-'; } { $$ = '-'; }
| MULTEQ | MULTEQ
{ $$ = '*'; } { $$ = '*'; }
| DIVEQ | DIVEQ
{ $$ = '/'; } { $$ = '/'; }
| LSHIFTEQ | LSHIFTEQ
{ $$ = LSHIFT; } { $$ = LSHIFT; }
| RSHIFTEQ | RSHIFTEQ
{ $$ = RSHIFT; } { $$ = RSHIFT; }
| ANDEQ | ANDEQ
{ $$ = '&'; } { $$ = '&'; }
| OREQ | OREQ
{ $$ = '|'; } { $$ = '|'; }
; ;
@ -804,7 +804,7 @@ memory_spec_list:
; ;
memory_spec: NAME memory_spec: NAME
{ region = lang_memory_region_lookup ($1, TRUE); } { region = lang_memory_region_lookup ($1, TRUE); }
attributes_opt ':' attributes_opt ':'
origin_spec opt_comma length_spec origin_spec opt_comma length_spec
@ -824,7 +824,7 @@ origin_spec:
; ;
length_spec: length_spec:
LENGTH '=' mustbe_exp LENGTH '=' mustbe_exp
{ {
region->length_exp = $3; region->length_exp = $3;
} }
@ -946,7 +946,7 @@ exp :
{ $$ = exp_binop (NE , $1, $3); } { $$ = exp_binop (NE , $1, $3); }
| exp LE exp | exp LE exp
{ $$ = exp_binop (LE , $1, $3); } { $$ = exp_binop (LE , $1, $3); }
| exp GE exp | exp GE exp
{ $$ = exp_binop (GE , $1, $3); } { $$ = exp_binop (GE , $1, $3); }
| exp '<' exp | exp '<' exp
{ $$ = exp_binop ('<' , $1, $3); } { $$ = exp_binop ('<' , $1, $3); }
@ -968,7 +968,7 @@ exp :
{ $$ = exp_nameop (DEFINED, $3); } { $$ = exp_nameop (DEFINED, $3); }
| INT | INT
{ $$ = exp_bigintop ($1.integer, $1.str); } { $$ = exp_bigintop ($1.integer, $1.str); }
| SIZEOF_HEADERS | SIZEOF_HEADERS
{ $$ = exp_nameop (SIZEOF_HEADERS,0); } { $$ = exp_nameop (SIZEOF_HEADERS,0); }
| ALIGNOF '(' NAME ')' | ALIGNOF '(' NAME ')'
@ -993,8 +993,8 @@ exp :
{ $$ = exp_binop (DATA_SEGMENT_RELRO_END, $5, $3); } { $$ = exp_binop (DATA_SEGMENT_RELRO_END, $5, $3); }
| DATA_SEGMENT_END '(' exp ')' | DATA_SEGMENT_END '(' exp ')'
{ $$ = exp_unop (DATA_SEGMENT_END, $3); } { $$ = exp_unop (DATA_SEGMENT_END, $3); }
| SEGMENT_START '(' NAME ',' exp ')' | SEGMENT_START '(' NAME ',' exp ')'
{ /* The operands to the expression node are { /* The operands to the expression node are
placed in the opposite order from the way placed in the opposite order from the way
in which they appear in the script as in which they appear in the script as
that allows us to reuse more code in that allows us to reuse more code in
@ -1022,9 +1022,9 @@ exp :
memspec_at_opt: memspec_at_opt:
AT '>' NAME { $$ = $3; } AT '>' NAME { $$ = $3; }
| { $$ = 0; } | { $$ = 0; }
; ;
opt_at: opt_at:
AT '(' exp ')' { $$ = $3; } AT '(' exp ')' { $$ = $3; }
@ -1053,7 +1053,7 @@ sect_constraint:
| { $$ = 0; } | { $$ = 0; }
; ;
section: NAME { ldlex_expression(); } section: NAME { ldlex_expression(); }
opt_exp_with_type opt_exp_with_type
opt_at opt_at
opt_align opt_align
@ -1067,7 +1067,7 @@ section: NAME { ldlex_expression(); }
$5, $7, $4, $9, $6); $5, $7, $4, $9, $6);
} }
statement_list_opt statement_list_opt
'}' { ldlex_popstate (); ldlex_expression (); } '}' { ldlex_popstate (); ldlex_expression (); }
memspec_opt memspec_at_opt phdr_opt fill_opt memspec_opt memspec_at_opt phdr_opt fill_opt
{ {
ldlex_popstate (); ldlex_popstate ();
@ -1119,9 +1119,9 @@ type:
; ;
atype: atype:
'(' type ')' '(' type ')'
| /* EMPTY */ { sectype = normal_section; } | /* EMPTY */ { sectype = normal_section; }
| '(' ')' { sectype = normal_section; } | '(' ')' { sectype = normal_section; }
; ;
opt_exp_with_type: opt_exp_with_type:
@ -1402,7 +1402,7 @@ vers_defns:
{ {
$$ = lang_new_vers_pattern (NULL, $1, ldgram_vers_current_lang, FALSE); $$ = lang_new_vers_pattern (NULL, $1, ldgram_vers_current_lang, FALSE);
} }
| NAME | NAME
{ {
$$ = lang_new_vers_pattern (NULL, $1, ldgram_vers_current_lang, TRUE); $$ = lang_new_vers_pattern (NULL, $1, ldgram_vers_current_lang, TRUE);
} }

View File

@ -227,7 +227,7 @@ unique_section_p (const asection *sec,
static bfd_boolean static bfd_boolean
walk_wild_file_in_exclude_list (struct name_list *exclude_list, 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; struct name_list *list_tmp;
@ -2367,9 +2367,9 @@ lang_add_section (lang_statement_list_type *ptr,
if ((flags & (SEC_LINK_ONCE | SEC_GROUP)) == (SEC_LINK_ONCE | SEC_GROUP)) if ((flags & (SEC_LINK_ONCE | SEC_GROUP)) == (SEC_LINK_ONCE | SEC_GROUP))
{ {
if (link_info.resolve_section_groups) 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 else
flags &= ~(SEC_LINK_DUPLICATES | SEC_RELOC); flags &= ~(SEC_LINK_DUPLICATES | SEC_RELOC);
} }
else if (!bfd_link_relocatable (&link_info)) else if (!bfd_link_relocatable (&link_info))
flags &= ~(SEC_LINK_ONCE | SEC_LINK_DUPLICATES | SEC_RELOC); flags &= ~(SEC_LINK_ONCE | SEC_LINK_DUPLICATES | SEC_RELOC);
@ -4425,7 +4425,7 @@ print_wild_statement (lang_wild_statement_type *w,
name_list *tmp; name_list *tmp;
minfo ("EXCLUDE_FILE(%s", w->exclude_name_list->name); minfo ("EXCLUDE_FILE(%s", w->exclude_name_list->name);
for (tmp = w->exclude_name_list->next; tmp; tmp = tmp->next) for (tmp = w->exclude_name_list->next; tmp; tmp = tmp->next)
minfo (" %s", tmp->name); minfo (" %s", tmp->name);
minfo (") "); minfo (") ");
} }
@ -4444,40 +4444,40 @@ print_wild_statement (lang_wild_statement_type *w,
int closing_paren = 0; int closing_paren = 0;
switch (sec->spec.sorted) switch (sec->spec.sorted)
{ {
case none: case none:
break; break;
case by_name: case by_name:
minfo ("SORT_BY_NAME("); minfo ("SORT_BY_NAME(");
closing_paren = 1; closing_paren = 1;
break; break;
case by_alignment: case by_alignment:
minfo ("SORT_BY_ALIGNMENT("); minfo ("SORT_BY_ALIGNMENT(");
closing_paren = 1; closing_paren = 1;
break; break;
case by_name_alignment: case by_name_alignment:
minfo ("SORT_BY_NAME(SORT_BY_ALIGNMENT("); minfo ("SORT_BY_NAME(SORT_BY_ALIGNMENT(");
closing_paren = 2; closing_paren = 2;
break; break;
case by_alignment_name: case by_alignment_name:
minfo ("SORT_BY_ALIGNMENT(SORT_BY_NAME("); minfo ("SORT_BY_ALIGNMENT(SORT_BY_NAME(");
closing_paren = 2; closing_paren = 2;
break; break;
case by_none: case by_none:
minfo ("SORT_NONE("); minfo ("SORT_NONE(");
closing_paren = 1; closing_paren = 1;
break; break;
case by_init_priority: case by_init_priority:
minfo ("SORT_BY_INIT_PRIORITY("); minfo ("SORT_BY_INIT_PRIORITY(");
closing_paren = 1; closing_paren = 1;
break; break;
} }
if (sec->spec.exclude_name_list != NULL) if (sec->spec.exclude_name_list != NULL)
{ {
@ -4492,7 +4492,7 @@ print_wild_statement (lang_wild_statement_type *w,
else else
minfo ("*"); minfo ("*");
for (;closing_paren > 0; closing_paren--) for (;closing_paren > 0; closing_paren--)
minfo (")"); minfo (")");
if (sec->next) if (sec->next)
minfo (" "); minfo (" ");
} }

View File

@ -79,7 +79,7 @@ static void lex_warn_invalid (char *where, char *what);
INPUTLIST definitely in a script, a filename-list INPUTLIST definitely in a script, a filename-list
BOTH either EXPRESSION or SCRIPT BOTH either EXPRESSION or SCRIPT
DEFSYMEXP in an argument to -defsym DEFSYMEXP in an argument to -defsym
MRI in an MRI script MRI in an MRI script
VERS_START starting a Sun style mapfile VERS_START starting a Sun style mapfile
VERS_SCRIPT a Sun style mapfile VERS_SCRIPT a Sun style mapfile
VERS_NODE a node within a Sun style mapfile VERS_NODE a node within a Sun style mapfile
@ -135,13 +135,13 @@ V_IDENTIFIER [*?.$_a-zA-Z\[\]\-\!\^\\]([*?.$_a-zA-Z0-9\[\]\-\!\^\\]|::)*
<BOTH,SCRIPT,EXPRESSION,VERS_START,VERS_NODE,VERS_SCRIPT,INPUTLIST>"/*" { comment (); } <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>{SYMBOLNAMECHAR1}{SYMBOLCHARN}* { yylval.name = xstrdup (yytext); return NAME; }
<DEFSYMEXP>"=" { RTOKEN('='); } <DEFSYMEXP>"=" { RTOKEN('='); }
<MRI,EXPRESSION>"$"([0-9A-Fa-f])+ { <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; yylval.bigint.str = NULL;
return INT; return INT;
} }
@ -231,7 +231,7 @@ V_IDENTIFIER [*?.$_a-zA-Z\[\]\-\!\^\\]([*?.$_a-zA-Z0-9\[\]\-\!\^\\]|::)*
<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>"=" { 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(')');} <BOTH,SCRIPT,EXPRESSION,MRI,INPUTLIST>")" { RTOKEN(')');}
@ -327,42 +327,42 @@ V_IDENTIFIER [*?.$_a-zA-Z\[\]\-\!\^\\]([*?.$_a-zA-Z0-9\[\]\-\!\^\\]|::)*
<EXPRESSION,BOTH,SCRIPT>"EXCLUDE_FILE" { RTOKEN(EXCLUDE_FILE); } <EXPRESSION,BOTH,SCRIPT>"EXCLUDE_FILE" { RTOKEN(EXCLUDE_FILE); }
<EXPRESSION,BOTH,SCRIPT>"CONSTANT" { RTOKEN(CONSTANT);} <EXPRESSION,BOTH,SCRIPT>"CONSTANT" { RTOKEN(CONSTANT);}
<MRI>"#".*\n? { ++ lineno; } <MRI>"#".*\n? { ++ lineno; }
<MRI>"\n" { ++ lineno; RTOKEN(NEWLINE); } <MRI>"\n" { ++ lineno; RTOKEN(NEWLINE); }
<MRI>"*".* { /* Mri comment line */ } <MRI>"*".* { /* Mri comment line */ }
<MRI>";".* { /* Mri comment line */ } <MRI>";".* { /* Mri comment line */ }
<MRI>"END" { RTOKEN(ENDWORD); } <MRI>"END" { RTOKEN(ENDWORD); }
<MRI>"ALIGNMOD" { RTOKEN(ALIGNMOD);} <MRI>"ALIGNMOD" { RTOKEN(ALIGNMOD);}
<MRI>"ALIGN" { RTOKEN(ALIGN_K);} <MRI>"ALIGN" { RTOKEN(ALIGN_K);}
<MRI>"CHIP" { RTOKEN(CHIP); } <MRI>"CHIP" { RTOKEN(CHIP); }
<MRI>"BASE" { RTOKEN(BASE); } <MRI>"BASE" { RTOKEN(BASE); }
<MRI>"ALIAS" { RTOKEN(ALIAS); } <MRI>"ALIAS" { RTOKEN(ALIAS); }
<MRI>"TRUNCATE" { RTOKEN(TRUNCATE); } <MRI>"TRUNCATE" { RTOKEN(TRUNCATE); }
<MRI>"LOAD" { RTOKEN(LOAD); } <MRI>"LOAD" { RTOKEN(LOAD); }
<MRI>"PUBLIC" { RTOKEN(PUBLIC); } <MRI>"PUBLIC" { RTOKEN(PUBLIC); }
<MRI>"ORDER" { RTOKEN(ORDER); } <MRI>"ORDER" { RTOKEN(ORDER); }
<MRI>"NAME" { RTOKEN(NAMEWORD); } <MRI>"NAME" { RTOKEN(NAMEWORD); }
<MRI>"FORMAT" { RTOKEN(FORMAT); } <MRI>"FORMAT" { RTOKEN(FORMAT); }
<MRI>"CASE" { RTOKEN(CASE); } <MRI>"CASE" { RTOKEN(CASE); }
<MRI>"START" { RTOKEN(START); } <MRI>"START" { RTOKEN(START); }
<MRI>"LIST".* { RTOKEN(LIST); /* LIST and ignore to end of line */ } <MRI>"LIST".* { RTOKEN(LIST); /* LIST and ignore to end of line */ }
<MRI>"SECT" { RTOKEN(SECT); } <MRI>"SECT" { RTOKEN(SECT); }
<EXPRESSION,BOTH,SCRIPT,MRI>"ABSOLUTE" { RTOKEN(ABSOLUTE); } <EXPRESSION,BOTH,SCRIPT,MRI>"ABSOLUTE" { RTOKEN(ABSOLUTE); }
<MRI>"end" { RTOKEN(ENDWORD); } <MRI>"end" { RTOKEN(ENDWORD); }
<MRI>"alignmod" { RTOKEN(ALIGNMOD);} <MRI>"alignmod" { RTOKEN(ALIGNMOD);}
<MRI>"align" { RTOKEN(ALIGN_K);} <MRI>"align" { RTOKEN(ALIGN_K);}
<MRI>"chip" { RTOKEN(CHIP); } <MRI>"chip" { RTOKEN(CHIP); }
<MRI>"base" { RTOKEN(BASE); } <MRI>"base" { RTOKEN(BASE); }
<MRI>"alias" { RTOKEN(ALIAS); } <MRI>"alias" { RTOKEN(ALIAS); }
<MRI>"truncate" { RTOKEN(TRUNCATE); } <MRI>"truncate" { RTOKEN(TRUNCATE); }
<MRI>"load" { RTOKEN(LOAD); } <MRI>"load" { RTOKEN(LOAD); }
<MRI>"public" { RTOKEN(PUBLIC); } <MRI>"public" { RTOKEN(PUBLIC); }
<MRI>"order" { RTOKEN(ORDER); } <MRI>"order" { RTOKEN(ORDER); }
<MRI>"name" { RTOKEN(NAMEWORD); } <MRI>"name" { RTOKEN(NAMEWORD); }
<MRI>"format" { RTOKEN(FORMAT); } <MRI>"format" { RTOKEN(FORMAT); }
<MRI>"case" { RTOKEN(CASE); } <MRI>"case" { RTOKEN(CASE); }
<MRI>"extern" { RTOKEN(EXTERN); } <MRI>"extern" { RTOKEN(EXTERN); }
<MRI>"start" { RTOKEN(START); } <MRI>"start" { RTOKEN(START); }
<MRI>"list".* { RTOKEN(LIST); /* LIST and ignore to end of line */ } <MRI>"list".* { RTOKEN(LIST); /* LIST and ignore to end of line */ }
<MRI>"sect" { RTOKEN(SECT); } <MRI>"sect" { RTOKEN(SECT); }
<EXPRESSION,BOTH,SCRIPT,MRI>"absolute" { RTOKEN(ABSOLUTE); } <EXPRESSION,BOTH,SCRIPT,MRI>"absolute" { RTOKEN(ABSOLUTE); }
@ -463,7 +463,7 @@ V_IDENTIFIER [*?.$_a-zA-Z\[\]\-\!\^\\]([*?.$_a-zA-Z0-9\[\]\-\!\^\\]|::)*
<VERS_START,VERS_NODE,VERS_SCRIPT>#.* { /* Eat up comments */ } <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>> { <<EOF>> {
include_stack_ptr--; include_stack_ptr--;

View File

@ -770,9 +770,9 @@ parse_args (unsigned argc, char **argv)
case 'd': case 'd':
command_line.force_common_definition = TRUE; command_line.force_common_definition = TRUE;
break; break;
case OPTION_FORCE_GROUP_ALLOCATION: case OPTION_FORCE_GROUP_ALLOCATION:
command_line.force_group_allocation = TRUE; command_line.force_group_allocation = TRUE;
break; break;
case OPTION_DEFSYM: case OPTION_DEFSYM:
lex_string = optarg; lex_string = optarg;
lex_redirect (optarg, "--defsym", ++defsym_count); lex_redirect (optarg, "--defsym", ++defsym_count);
@ -828,7 +828,7 @@ parse_args (unsigned argc, char **argv)
if (command_line.auxiliary_filters == NULL) if (command_line.auxiliary_filters == NULL)
{ {
command_line.auxiliary_filters = (char **) command_line.auxiliary_filters = (char **)
xmalloc (2 * sizeof (char *)); xmalloc (2 * sizeof (char *));
command_line.auxiliary_filters[0] = optarg; command_line.auxiliary_filters[0] = optarg;
command_line.auxiliary_filters[1] = NULL; command_line.auxiliary_filters[1] = NULL;
} }
@ -841,8 +841,8 @@ parse_args (unsigned argc, char **argv)
for (p = command_line.auxiliary_filters; *p != NULL; p++) for (p = command_line.auxiliary_filters; *p != NULL; p++)
++c; ++c;
command_line.auxiliary_filters = (char **) command_line.auxiliary_filters = (char **)
xrealloc (command_line.auxiliary_filters, xrealloc (command_line.auxiliary_filters,
(c + 2) * sizeof (char *)); (c + 2) * sizeof (char *));
command_line.auxiliary_filters[c] = optarg; command_line.auxiliary_filters[c] = optarg;
command_line.auxiliary_filters[c + 1] = NULL; command_line.auxiliary_filters[c + 1] = NULL;
} }
@ -952,7 +952,7 @@ parse_args (unsigned argc, char **argv)
link_info.unresolved_syms_in_shared_libs link_info.unresolved_syms_in_shared_libs
= how_to_report_unresolved_symbols; = 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 link_info.unresolved_syms_in_objects
= how_to_report_unresolved_symbols; = how_to_report_unresolved_symbols;
@ -1130,8 +1130,8 @@ parse_args (unsigned argc, char **argv)
char *buf; char *buf;
buf = (char *) xmalloc (strlen (command_line.rpath_link) buf = (char *) xmalloc (strlen (command_line.rpath_link)
+ strlen (optarg) + strlen (optarg)
+ 2); + 2);
sprintf (buf, "%s%c%s", command_line.rpath_link, sprintf (buf, "%s%c%s", command_line.rpath_link,
config.rpath_separator, optarg); config.rpath_separator, optarg);
free (command_line.rpath_link); free (command_line.rpath_link);
@ -1198,8 +1198,8 @@ parse_args (unsigned argc, char **argv)
case OPTION_SORT_COMMON: case OPTION_SORT_COMMON:
if (optarg == NULL if (optarg == NULL
|| strcmp (optarg, N_("descending")) == 0) || strcmp (optarg, N_("descending")) == 0)
config.sort_common = sort_descending; config.sort_common = sort_descending;
else if (strcmp (optarg, N_("ascending")) == 0) else if (strcmp (optarg, N_("ascending")) == 0)
config.sort_common = sort_ascending; config.sort_common = sort_ascending;
else else
einfo (_("%P%F: invalid common section sorting option: %s\n"), einfo (_("%P%F: invalid common section sorting option: %s\n"),
@ -1308,8 +1308,8 @@ parse_args (unsigned argc, char **argv)
case 'u': case 'u':
ldlang_add_undef (optarg, TRUE); ldlang_add_undef (optarg, TRUE);
break; break;
case OPTION_REQUIRE_DEFINED_SYMBOL: case OPTION_REQUIRE_DEFINED_SYMBOL:
ldlang_add_require_defined (optarg); ldlang_add_require_defined (optarg);
break; break;
case OPTION_UNIQUE: case OPTION_UNIQUE:
if (optarg != NULL) if (optarg != NULL)
@ -1522,17 +1522,17 @@ parse_args (unsigned argc, char **argv)
config.hash_table_size = 1021; config.hash_table_size = 1021;
break; break;
case OPTION_HASH_SIZE: case OPTION_HASH_SIZE:
{ {
bfd_size_type new_size; bfd_size_type new_size;
new_size = strtoul (optarg, NULL, 0); new_size = strtoul (optarg, NULL, 0);
if (new_size) if (new_size)
config.hash_table_size = new_size; config.hash_table_size = new_size;
else else
einfo (_("%P%X: --hash-size needs a numeric argument\n")); einfo (_("%P%X: --hash-size needs a numeric argument\n"));
} }
break; break;
case OPTION_PUSH_STATE: case OPTION_PUSH_STATE:
input_flags.pushed = xmemdup (&input_flags, input_flags.pushed = xmemdup (&input_flags,

View File

@ -552,7 +552,7 @@ auto_export (bfd *abfd, def_file *d, const char *n)
/* Return false if n is in the d->exports table. */ /* Return false if n is in the d->exports table. */
if (bsearch (&key, d->exports, d->num_exports, 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; return 0;
if (pe_dll_do_default_excludes) if (pe_dll_do_default_excludes)
@ -692,9 +692,9 @@ process_def_file_and_drectve (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *
{ {
struct coff_link_hash_entry *sym_hash; struct coff_link_hash_entry *sym_hash;
sym_hash = coff_link_hash_lookup (coff_hash_table (info), 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 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; sym_hash->root.u.c.p->alignment_power = (unsigned) ac->alignment;
} }
@ -736,9 +736,9 @@ process_def_file_and_drectve (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *
&& ((symbols[j]->flags & BSF_GLOBAL) && ((symbols[j]->flags & BSF_GLOBAL)
|| (symbols[j]->flags == 0))); || (symbols[j]->flags == 0)));
if (link_info.version_info && would_export) if (link_info.version_info && would_export)
would_export would_export
= !bfd_hide_sym_by_version (link_info.version_info, = !bfd_hide_sym_by_version (link_info.version_info,
symbols[j]->name); symbols[j]->name);
if (would_export) if (would_export)
{ {
const char *sn = symbols[j]->name; const char *sn = symbols[j]->name;
@ -747,7 +747,7 @@ process_def_file_and_drectve (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *
{ {
char *name; char *name;
if (is_import (sn)) if (is_import (sn))
continue; continue;
name = xmalloc (strlen ("__imp_") + strlen (sn) + 1); name = xmalloc (strlen ("__imp_") + strlen (sn) + 1);
sprintf (name, "%s%s", "__imp_", sn); sprintf (name, "%s%s", "__imp_", sn);
@ -772,7 +772,7 @@ process_def_file_and_drectve (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *
NULL, &is_dup); NULL, &is_dup);
/* Fill data flag properly, from dlltool.c. */ /* Fill data flag properly, from dlltool.c. */
if (!is_dup) if (!is_dup)
p->flag_data = !(symbols[j]->flags & BSF_FUNCTION); p->flag_data = !(symbols[j]->flags & BSF_FUNCTION);
} }
} }
} }
@ -806,12 +806,12 @@ process_def_file_and_drectve (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *
char *tmp_at = strrchr (tmp, '@'); char *tmp_at = strrchr (tmp, '@');
if (tmp_at) if (tmp_at)
*tmp_at = 0; *tmp_at = 0;
else 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);
pe_def_file->exports[i].name = tmp; pe_def_file->exports[i].name = tmp;
resort_needed = TRUE; resort_needed = TRUE;
} }
} }
} }
@ -820,7 +820,7 @@ process_def_file_and_drectve (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *
by removing leading @. */ by removing leading @. */
if (resort_needed) if (resort_needed)
qsort (pe_def_file->exports, NE, sizeof (pe_def_file->exports[0]), qsort (pe_def_file->exports, NE, sizeof (pe_def_file->exports[0]),
pe_export_sort); pe_export_sort);
if (pe_dll_stdcall_aliases) if (pe_dll_stdcall_aliases)
{ {
@ -841,7 +841,7 @@ process_def_file_and_drectve (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *
pe_def_file->exports[i].internal_name, pe_def_file->exports[i].internal_name,
-1, NULL, &is_dup); -1, NULL, &is_dup);
if (is_dup) if (is_dup)
free (tmp); free (tmp);
} }
} }
} }
@ -953,7 +953,7 @@ process_def_file_and_drectve (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *
} }
} }
/* Check for forward exports. These are indicated in DEF files by an /* 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 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 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. */ for them here, after real defined symbols have already been matched. */
@ -1093,8 +1093,8 @@ generate_edata (bfd *abfd, struct bfd_link_info *info ATTRIBUTE_UNUSED)
/* Now we need to assign ordinals to those that don't have them. */ /* Now we need to assign ordinals to those that don't have them. */
for (i = 0; i < NE; i++) for (i = 0; i < NE; i++)
{ {
if (exported_symbol_sections[i] || if (exported_symbol_sections[i]
pe_def_file->exports[i].flag_forward) || pe_def_file->exports[i].flag_forward)
{ {
if (pe_def_file->exports[i].ordinal != -1) if (pe_def_file->exports[i].ordinal != -1)
{ {
@ -1126,9 +1126,9 @@ generate_edata (bfd *abfd, struct bfd_link_info *info ATTRIBUTE_UNUSED)
next_ordinal = min_ordinal; next_ordinal = min_ordinal;
for (i = 0; i < NE; i++) for (i = 0; i < NE; i++)
if ((exported_symbol_sections[i] || if ((exported_symbol_sections[i]
pe_def_file->exports[i].flag_forward) && || pe_def_file->exports[i].flag_forward)
pe_def_file->exports[i].ordinal == -1) && pe_def_file->exports[i].ordinal == -1)
{ {
while (exported_symbols[next_ordinal - min_ordinal] != -1) while (exported_symbols[next_ordinal - min_ordinal] != -1)
next_ordinal++; next_ordinal++;
@ -1166,7 +1166,7 @@ fill_exported_offsets (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *info)
name = xmalloc (strlen (pe_def_file->exports[i].internal_name) + 2); name = xmalloc (strlen (pe_def_file->exports[i].internal_name) + 2);
if (pe_details->underscored if (pe_details->underscored
&& *pe_def_file->exports[i].internal_name != '@') && *pe_def_file->exports[i].internal_name != '@')
{ {
*name = '_'; *name = '_';
strcpy (name + 1, pe_def_file->exports[i].internal_name); strcpy (name + 1, pe_def_file->exports[i].internal_name);
@ -1234,21 +1234,21 @@ fill_edata (bfd *abfd, struct bfd_link_info *info ATTRIBUTE_UNUSED)
Scan alphabetically - ie the ordering in the exports[] table, Scan alphabetically - ie the ordering in the exports[] table,
rather than by ordinal - the ordering in the exported_symbol[] rather than by ordinal - the ordering in the exported_symbol[]
table. See dlltool.c and: 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. */ for more information. */
hint = 0; hint = 0;
for (s = 0; s < NE; s++) for (s = 0; s < NE; s++)
{ {
struct bfd_section *ssec = exported_symbol_sections[s]; struct bfd_section *ssec = exported_symbol_sections[s];
if (pe_def_file->exports[s].ordinal != -1 && if (pe_def_file->exports[s].ordinal != -1
(pe_def_file->exports[s].flag_forward || ssec != NULL)) && (pe_def_file->exports[s].flag_forward || ssec != NULL))
{ {
int ord = pe_def_file->exports[s].ordinal; int ord = pe_def_file->exports[s].ordinal;
if (pe_def_file->exports[s].flag_forward) if (pe_def_file->exports[s].flag_forward)
{ {
bfd_put_32 (abfd, ERVA (enamestr), 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); strcpy (enamestr, pe_def_file->exports[s].internal_name);
enamestr += strlen (pe_def_file->exports[s].internal_name) + 1; enamestr += strlen (pe_def_file->exports[s].internal_name) + 1;
@ -1260,7 +1260,7 @@ fill_edata (bfd *abfd, struct bfd_link_info *info ATTRIBUTE_UNUSED)
+ ssec->output_offset); + ssec->output_offset);
bfd_put_32 (abfd, srva - image_base, 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) if (!pe_def_file->exports[s].flag_noname)
@ -1880,20 +1880,20 @@ save_relocs (asection *sec)
} }
/* .section .idata$2 /* .section .idata$2
.global __head_my_dll .global __head_my_dll
__head_my_dll: __head_my_dll:
.rva hname .rva hname
.long 0 .long 0
.long 0 .long 0
.rva __my_dll_iname .rva __my_dll_iname
.rva fthunk .rva fthunk
.section .idata$5 .section .idata$5
.long 0 .long 0
fthunk: fthunk:
.section .idata$4 .section .idata$4
.long 0 .long 0
hname: */ hname: */
static bfd * static bfd *
@ -1974,15 +1974,15 @@ make_head (bfd *parent)
} }
/* .section .idata$4 /* .section .idata$4
.long 0 .long 0
[.long 0] for PE+ [.long 0] for PE+
.section .idata$5 .section .idata$5
.long 0 .long 0
[.long 0] for PE+ [.long 0] for PE+
.section idata$7 .section idata$7
.global __my_dll_iname .global __my_dll_iname
__my_dll_iname: __my_dll_iname:
.asciz "my.dll" */ .asciz "my.dll" */
static bfd * static bfd *
make_tail (bfd *parent) make_tail (bfd *parent)
@ -2044,25 +2044,25 @@ make_tail (bfd *parent)
} }
/* .text /* .text
.global _function .global _function
.global ___imp_function .global ___imp_function
.global __imp__function .global __imp__function
_function: _function:
jmp *__imp__function: jmp *__imp__function:
.section idata$7 .section idata$7
.long __head_my_dll .long __head_my_dll
.section .idata$5 .section .idata$5
___imp_function: ___imp_function:
__imp__function: __imp__function:
iat? iat?
.section .idata$4 .section .idata$4
iat? iat?
.section .idata$6 .section .idata$6
ID<ordinal>: ID<ordinal>:
.short <hint> .short <hint>
.asciz "function" xlate? (add underscore, kill at) */ .asciz "function" xlate? (add underscore, kill at) */
static const unsigned char jmp_ix86_bytes[] = static const unsigned char jmp_ix86_bytes[] =
{ {
@ -2070,11 +2070,11 @@ static const unsigned char jmp_ix86_bytes[] =
}; };
/* _function: /* _function:
mov.l ip+8,r0 mov.l ip+8,r0
mov.l @r0,r0 mov.l @r0,r0
jmp @r0 jmp @r0
nop nop
.dw __imp_function */ .dw __imp_function */
static const unsigned char jmp_sh_bytes[] = static const unsigned char jmp_sh_bytes[] =
{ {
@ -2082,10 +2082,10 @@ static const unsigned char jmp_sh_bytes[] =
}; };
/* _function: /* _function:
lui $t0,<high:__imp_function> lui $t0,<high:__imp_function>
lw $t0,<low:__imp_function> lw $t0,<low:__imp_function>
jr $t0 jr $t0
nop */ nop */
static const unsigned char jmp_mips_bytes[] = static const unsigned char jmp_mips_bytes[] =
{ {
@ -2211,7 +2211,7 @@ make_one (def_file_export *exp, bfd *parent, bfd_boolean include_jmp_stub)
/* Mark this object as SAFESEH compatible. */ /* Mark this object as SAFESEH compatible. */
quick_symbol (abfd, "", "@feat.00", "", bfd_abs_section_ptr, quick_symbol (abfd, "", "@feat.00", "", bfd_abs_section_ptr,
BSF_LOCAL, 1); BSF_LOCAL, 1);
quick_reloc (abfd, 2, BFD_RELOC_32, 2); quick_reloc (abfd, 2, BFD_RELOC_32, 2);
#endif #endif
break; break;
case PE_ARCH_sh: case PE_ARCH_sh:
@ -2223,8 +2223,8 @@ make_one (def_file_export *exp, bfd *parent, bfd_boolean include_jmp_stub)
quick_reloc (abfd, 4, BFD_RELOC_LO16, 2); quick_reloc (abfd, 4, BFD_RELOC_LO16, 2);
break; break;
case PE_ARCH_arm: case PE_ARCH_arm:
case PE_ARCH_arm_epoc: case PE_ARCH_arm_epoc:
case PE_ARCH_arm_wince: case PE_ARCH_arm_wince:
quick_reloc (abfd, 8, BFD_RELOC_32, 2); quick_reloc (abfd, 8, BFD_RELOC_32, 2);
break; break;
default: default:
@ -2432,11 +2432,11 @@ make_import_fixup_mark (arelent *rel, char *name)
} }
/* .section .idata$2 /* .section .idata$2
.rva __nm_thnk_SYM (singleton thunk with name of func) .rva __nm_thnk_SYM (singleton thunk with name of func)
.long 0 .long 0
.long 0 .long 0
.rva __my_dll_iname (name of dll) .rva __my_dll_iname (name of dll)
.rva __fuNN_SYM (pointer to reference (address) in text) */ .rva __fuNN_SYM (pointer to reference (address) in text) */
static bfd * static bfd *
make_import_fixup_entry (const char *name, make_import_fixup_entry (const char *name,
@ -2492,8 +2492,8 @@ make_import_fixup_entry (const char *name,
} }
/* .section .rdata_runtime_pseudo_reloc /* .section .rdata_runtime_pseudo_reloc
.long addend .long addend
.rva __fuNN_SYM (pointer to reference (address) in text) */ .rva __fuNN_SYM (pointer to reference (address) in text) */
static bfd * static bfd *
make_runtime_pseudo_reloc (const char *name ATTRIBUTE_UNUSED, make_runtime_pseudo_reloc (const char *name ATTRIBUTE_UNUSED,
@ -2577,7 +2577,7 @@ make_runtime_pseudo_reloc (const char *name ATTRIBUTE_UNUSED,
} }
/* .section .rdata /* .section .rdata
.rva __pei386_runtime_relocator */ .rva __pei386_runtime_relocator */
static bfd * static bfd *
pe_create_runtime_relocator_reference (bfd *parent) pe_create_runtime_relocator_reference (bfd *parent)
@ -2655,16 +2655,16 @@ pe_create_import_fixup (arelent *rel, asection *s, bfd_vma addend, char *name)
add_bfd_to_link (b, b->filename, &link_info); add_bfd_to_link (b, b->filename, &link_info);
/* If we ever use autoimport, we have to cast text section writable. /* 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) if (link_info.pei386_runtime_pseudo_reloc != 2)
{ {
config.text_read_only = FALSE; config.text_read_only = FALSE;
link_info.output_bfd->flags &= ~WP_TEXT; link_info.output_bfd->flags &= ~WP_TEXT;
} }
if (link_info.pei386_runtime_pseudo_reloc == 2) if (link_info.pei386_runtime_pseudo_reloc == 2)
{ {
b = make_singleton_name_imp (name, link_info.output_bfd); 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);
} }
} }
@ -2679,27 +2679,27 @@ pe_create_import_fixup (arelent *rel, asection *s, bfd_vma addend, char *name)
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) if ((link_info.pei386_runtime_pseudo_reloc != 0 && addend != 0)
|| link_info.pei386_runtime_pseudo_reloc == 2) || link_info.pei386_runtime_pseudo_reloc == 2)
{ {
if (pe_dll_extra_pe_debug) if (pe_dll_extra_pe_debug)
printf ("creating runtime pseudo-reloc entry for %s (addend=%d)\n", printf ("creating runtime pseudo-reloc entry for %s (addend=%d)\n",
fixup_name, (int) addend); fixup_name, (int) addend);
b = make_runtime_pseudo_reloc (name, fixup_name, addend, rel->howto->bitsize, b = make_runtime_pseudo_reloc (name, fixup_name, addend, rel->howto->bitsize,
link_info.output_bfd); link_info.output_bfd);
add_bfd_to_link (b, b->filename, &link_info); add_bfd_to_link (b, b->filename, &link_info);
if (runtime_pseudo_relocs_created == 0) if (runtime_pseudo_relocs_created == 0)
{ {
b = pe_create_runtime_relocator_reference (link_info.output_bfd); b = pe_create_runtime_relocator_reference (link_info.output_bfd);
add_bfd_to_link (b, b->filename, &link_info); add_bfd_to_link (b, b->filename, &link_info);
} }
runtime_pseudo_relocs_created++; runtime_pseudo_relocs_created++;
} }
else if (addend != 0) 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"), 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); s->owner, s, rel->address, sym->name);
} }
@ -2753,8 +2753,8 @@ pe_dll_generate_implib (def_file *def, const char *impfilename, struct bfd_link_
found = (filename_cmp (ex->string, ibfd->filename) == 0); found = (filename_cmp (ex->string, ibfd->filename) == 0);
} }
/* If it matched, we must open a fresh BFD for it (the original /* 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 input BFD is still needed for the DLL's final link) and add
it into the archive member chain. */ it into the archive member chain. */
if (found) if (found)
{ {
bfd *newbfd = bfd_openr (ibfd->my_archive bfd *newbfd = bfd_openr (ibfd->my_archive
@ -2913,7 +2913,7 @@ pe_find_cdecl_alias_match (struct bfd_link_info *linfo, char *name)
{ {
h = bfd_link_hash_lookup (linfo->hash, kv->oname, FALSE, FALSE, FALSE); h = bfd_link_hash_lookup (linfo->hash, kv->oname, FALSE, FALSE, FALSE);
if (h->type == bfd_link_hash_undefined) if (h->type == bfd_link_hash_undefined)
goto return_h; goto return_h;
} }
if (lname[0] == '?') if (lname[0] == '?')
@ -2922,7 +2922,7 @@ pe_find_cdecl_alias_match (struct bfd_link_info *linfo, char *name)
if (at || lname[0] == '@') if (at || lname[0] == '@')
{ {
if (lname[0] == '@') if (lname[0] == '@')
{ {
if (pe_details->underscored) if (pe_details->underscored)
lname[0] = '_'; lname[0] = '_';
else else
@ -2938,7 +2938,7 @@ pe_find_cdecl_alias_match (struct bfd_link_info *linfo, char *name)
} }
} }
if (at) if (at)
*strchr (lname, '@') = 0; *strchr (lname, '@') = 0;
key.key = lname; key.key = lname;
kv = bsearch (&key, udef_table, undef_count, kv = bsearch (&key, udef_table, undef_count,
sizeof (struct key_value), undef_sort_cmp); sizeof (struct key_value), undef_sort_cmp);
@ -2979,7 +2979,7 @@ pe_find_cdecl_alias_match (struct bfd_link_info *linfo, char *name)
{ {
h = bfd_link_hash_lookup (linfo->hash, kv->oname, FALSE, FALSE, FALSE); h = bfd_link_hash_lookup (linfo->hash, kv->oname, FALSE, FALSE, FALSE);
if (h->type == bfd_link_hash_undefined) if (h->type == bfd_link_hash_undefined)
goto return_h; goto return_h;
} }
return_NULL: return_NULL:
@ -2991,7 +2991,7 @@ pe_find_cdecl_alias_match (struct bfd_link_info *linfo, char *name)
static bfd_boolean static bfd_boolean
pe_undef_count (struct bfd_link_hash_entry *h ATTRIBUTE_UNUSED, 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) if (h->type == bfd_link_hash_undefined)
undef_count++; undef_count++;
@ -3009,7 +3009,7 @@ pe_undef_fill (struct bfd_link_hash_entry *h, void *inf ATTRIBUTE_UNUSED)
at = strchr (udef_table[undef_count].key at = strchr (udef_table[undef_count].key
+ (udef_table[undef_count].key[0] == '@'), '@'); + (udef_table[undef_count].key[0] == '@'), '@');
if (at) if (at)
at[1] = 0; at[1] = 0;
udef_table[undef_count].oname = h->root.string; udef_table[undef_count].oname = h->root.string;
undef_count++; undef_count++;
} }
@ -3073,7 +3073,7 @@ pe_process_import_defs (bfd *output_bfd, struct bfd_link_info *linfo)
for (i = 0; i < pe_def_file->num_imports && imp[i].module != module; i++) for (i = 0; i < pe_def_file->num_imports && imp[i].module != module; i++)
; ;
if (i >= pe_def_file->num_imports) if (i >= pe_def_file->num_imports)
continue; continue;
dll_filename = module->name; dll_filename = module->name;
dll_symname = xstrdup (module->name); dll_symname = xstrdup (module->name);
@ -3117,7 +3117,7 @@ pe_process_import_defs (bfd *output_bfd, struct bfd_link_info *linfo)
blhe = bfd_link_hash_lookup (linfo->hash, name, blhe = bfd_link_hash_lookup (linfo->hash, name,
FALSE, FALSE, FALSE); FALSE, FALSE, FALSE);
if (blhe) if (blhe)
is_undef = (blhe->type == bfd_link_hash_undefined); is_undef = (blhe->type == bfd_link_hash_undefined);
} }
else else
{ {
@ -3131,7 +3131,7 @@ pe_process_import_defs (bfd *output_bfd, struct bfd_link_info *linfo)
blhe = pe_find_cdecl_alias_match (linfo, name); blhe = pe_find_cdecl_alias_match (linfo, name);
include_jmp_stub = TRUE; include_jmp_stub = TRUE;
if (blhe) if (blhe)
is_undef = (blhe->type == bfd_link_hash_undefined); is_undef = (blhe->type == bfd_link_hash_undefined);
} }
free (name); free (name);
@ -3380,26 +3380,26 @@ pe_implied_import_dll (const char *filename)
/* Skip unwanted symbols, which are /* Skip unwanted symbols, which are
exported in buggy auto-import releases. */ exported in buggy auto-import releases. */
if (! CONST_STRNEQ (erva + name_rva, "__nm_")) if (! CONST_STRNEQ (erva + name_rva, "__nm_"))
{ {
int is_dup = 0; 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. */ segment. */
is_data = is_data =
(func_rva >= data_start && func_rva < data_end) (func_rva >= data_start && func_rva < data_end)
|| (func_rva >= rdata_start && func_rva < rdata_end) || (func_rva >= rdata_start && func_rva < rdata_end)
|| (func_rva >= bss_start && func_rva < bss_end); || (func_rva >= bss_start && func_rva < bss_end);
imp = def_file_add_import (pe_def_file, erva + name_rva, imp = def_file_add_import (pe_def_file, erva + name_rva,
dllname, i, NULL, NULL, &is_dup); dllname, i, NULL, NULL, &is_dup);
/* Mark symbol type. */ /* Mark symbol type. */
if (!is_dup) if (!is_dup)
imp->data = is_data; 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", printf ("%s dll-name: %s sym: %s addr: 0x%lx %s\n",
__FUNCTION__, dllname, erva + name_rva, __FUNCTION__, dllname, erva + name_rva,
(unsigned long) func_rva, is_data ? "(data)" : ""); (unsigned long) func_rva, is_data ? "(data)" : "");
} }
} }
return TRUE; return TRUE;
@ -3504,6 +3504,6 @@ bfd_boolean
pe_bfd_is_dll (bfd *abfd) pe_bfd_is_dll (bfd *abfd)
{ {
return (bfd_get_format (abfd) == bfd_object return (bfd_get_format (abfd) == bfd_object
&& obj_pe (abfd) && obj_pe (abfd)
&& pe_data (abfd)->dll); && pe_data (abfd)->dll);
} }

View File

@ -1014,7 +1014,7 @@ plugin_load_plugins (void)
if (!onloadfn) if (!onloadfn)
onloadfn = (ld_plugin_onload) dlsym (curplug->dlhandle, "_onload"); onloadfn = (ld_plugin_onload) dlsym (curplug->dlhandle, "_onload");
if (!onloadfn) if (!onloadfn)
einfo (_("%P%F: %s: error loading plugin: %s\n"), einfo (_("%P%F: %s: error loading plugin: %s\n"),
curplug->name, dlerror ()); curplug->name, dlerror ());
set_tv_plugin_args (curplug, &my_tv[tv_header_size]); set_tv_plugin_args (curplug, &my_tv[tv_header_size]);
called_plugin = curplug; called_plugin = curplug;

View File

@ -239,7 +239,7 @@ POTFILES: POTFILES.in
posrcprefix="../"; \ posrcprefix="../"; \
fi; \ fi; \
rm -f $@-t $@ \ rm -f $@-t $@ \
&& (sed -e '/^#/d' -e '/^[ ]*$$/d' \ && (sed -e '/^#/d' -e '/^[ ]*$$/d' \
-e "s@.*@ $$posrcprefix& \\\\@" < $(srcdir)/$@.in \ -e "s@.*@ $$posrcprefix& \\\\@" < $(srcdir)/$@.in \
| sed -e '$$s/\\$$//') > $@-t \ | sed -e '$$s/\\$$//') > $@-t \
&& chmod a-w $@-t \ && chmod a-w $@-t \

View File

@ -1,5 +1,5 @@
# Copyright (C) 2014-2017 Free Software Foundation, Inc. # Copyright (C) 2014-2017 Free Software Foundation, Inc.
# #
# Copying and distribution of this file, with or without modification, # Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright # are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved. # notice and this notice are preserved.

View File

@ -4,7 +4,7 @@
# specified by the -H option. # specified by the -H option.
# #
# Copyright (C) 2014-2017 Free Software Foundation, Inc. # Copyright (C) 2014-2017 Free Software Foundation, Inc.
# #
# Copying and distribution of this file, with or without modification, # Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright # are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved. # notice and this notice are preserved.
@ -67,7 +67,7 @@ SECTIONS
.loader : { .loader : {
*(.loader) *(.loader)
} }
.debug : { .debug : {
*(.debug) *(.debug)
} }

View File

@ -4,7 +4,7 @@
# defaults are appropriate for an Alpha running OSF/1. # defaults are appropriate for an Alpha running OSF/1.
# #
# Copyright (C) 2014-2017 Free Software Foundation, Inc. # Copyright (C) 2014-2017 Free Software Foundation, Inc.
# #
# Copying and distribution of this file, with or without modification, # Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright # are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved. # notice and this notice are preserved.

View File

@ -2,7 +2,7 @@
# Tristan Gingold <gingold@adacore.com>. # Tristan Gingold <gingold@adacore.com>.
# #
# Copyright (C) 2014-2017 Free Software Foundation, Inc. # Copyright (C) 2014-2017 Free Software Foundation, Inc.
# #
# Copying and distribution of this file, with or without modification, # Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright # are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved. # notice and this notice are preserved.

View File

@ -1,5 +1,5 @@
# Copyright (C) 2014-2017 Free Software Foundation, Inc. # Copyright (C) 2014-2017 Free Software Foundation, Inc.
# #
# Copying and distribution of this file, with or without modification, # Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright # are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved. # notice and this notice are preserved.

View File

@ -54,9 +54,9 @@
# INPUT_FILES - INPUT command of files to always include # INPUT_FILES - INPUT command of files to always include
# WRITABLE_RODATA - if set, the .rodata section should be writable # WRITABLE_RODATA - if set, the .rodata section should be writable
# INIT_START, INIT_END - statements just before and just after # 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 # 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. # STACK_ADDR - start of a .stack section.
# OTHER_SYMBOLS - symbols to place right at the end of the script. # 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, # ETEXT_NAME - name of a symbol for the end of the text section,
@ -427,13 +427,13 @@ cat >> ldscripts/dyntmp.$$ <<EOF
.rel.dyn ${RELOCATING-0} : .rel.dyn ${RELOCATING-0} :
{ {
EOF 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 cat >> ldscripts/dyntmp.$$ <<EOF
} }
.rela.dyn ${RELOCATING-0} : .rela.dyn ${RELOCATING-0} :
{ {
EOF 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 cat >> ldscripts/dyntmp.$$ <<EOF
} }
EOF EOF
@ -463,10 +463,10 @@ emit_dyn()
cat ldscripts/dyntmp.$$ cat ldscripts/dyntmp.$$
else else
if test -z "${NO_REL_RELOCS}"; then 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 fi
if test -z "${NO_RELA_RELOCS}"; then 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
fi fi
rm -f ldscripts/dyntmp.$$ rm -f ldscripts/dyntmp.$$

View File

@ -1,5 +1,5 @@
# Copyright (C) 2014-2017 Free Software Foundation, Inc. # Copyright (C) 2014-2017 Free Software Foundation, Inc.
# #
# Copying and distribution of this file, with or without modification, # Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright # are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved. # notice and this notice are preserved.

View File

@ -4,7 +4,7 @@
# that apply; only BPABI-specific variables will be noted here. # that apply; only BPABI-specific variables will be noted here.
# #
# Copyright (C) 2014-2017 Free Software Foundation, Inc. # Copyright (C) 2014-2017 Free Software Foundation, Inc.
# #
# Copying and distribution of this file, with or without modification, # Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright # are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved. # notice and this notice are preserved.
@ -52,7 +52,7 @@ if test -z "${NO_SMALL_DATA}"; then
SDATA="/* We want the small data sections together, so single-instruction offsets SDATA="/* We want the small data sections together, so single-instruction offsets
can access them all, and initialized data all before uninitialized, so can access them all, and initialized data all before uninitialized, so
we can shorten the on-disk segment size. */ we can shorten the on-disk segment size. */
.sdata ${RELOCATING-0} : .sdata ${RELOCATING-0} :
{ {
${RELOCATING+${SDATA_START_SYMBOLS}} ${RELOCATING+${SDATA_START_SYMBOLS}}
*(.sdata${RELOCATING+ .sdata.* .gnu.linkonce.s.*}) *(.sdata${RELOCATING+ .sdata.* .gnu.linkonce.s.*})
@ -88,7 +88,7 @@ FINI_ARRAY=".fini_array ${RELOCATING-0} :
KEEP (*(.fini_array)) KEEP (*(.fini_array))
${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (__fini_array_end = .);}} ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (__fini_array_end = .);}}
}" }"
CTOR=".ctors ${CONSTRUCTING-0} : CTOR=".ctors ${CONSTRUCTING-0} :
{ {
${CONSTRUCTING+${CTOR_START}} ${CONSTRUCTING+${CTOR_START}}
/* gcc uses crtbegin.o to find the start of /* gcc uses crtbegin.o to find the start of
@ -166,23 +166,23 @@ ${RELOCATING- /* For some reason, the Solaris linker makes bad executables
at non-zero addresses. Could be a Solaris ld bug, could be a GNU ld at non-zero addresses. Could be a Solaris ld bug, could be a GNU ld
bug. But for now assigning the zero vmas works. */} 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 and end of particular sections of the image. SymbianOS uses these
symbols. We provide them for compatibility with ARM's toolchains. symbols. We provide them for compatibility with ARM's toolchains.
These symbols should be bound locally; each shared object may define These symbols should be bound locally; each shared object may define
its own version of these symbols. */ its own version of these symbols. */
VERSION VERSION
{ {
/* Give these a dummy version to work around linker lameness. /* Give these a dummy version to work around linker lameness.
The name used shouldn't matter as these are all local symbols. */ The name used shouldn't matter as these are all local symbols. */
__GNU { __GNU {
local: local:
Image\$\$ER_RO\$\$Base; Image\$\$ER_RO\$\$Base;
Image\$\$ER_RO\$\$Limit; Image\$\$ER_RO\$\$Limit;
SHT\$\$INIT_ARRAY\$\$Base; SHT\$\$INIT_ARRAY\$\$Base;
SHT\$\$INIT_ARRAY\$\$Limit; SHT\$\$INIT_ARRAY\$\$Limit;
.ARM.exidx\$\$Base; .ARM.exidx\$\$Base;
.ARM.exidx\$\$Limit; .ARM.exidx\$\$Limit;
}; };
} }
@ -203,8 +203,8 @@ SECTIONS
EOF EOF
cat <<EOF cat <<EOF
.init ${RELOCATING-0} : .init ${RELOCATING-0} :
{ {
${RELOCATING+${INIT_START}} ${RELOCATING+${INIT_START}}
KEEP (*(.init)) KEEP (*(.init))
${RELOCATING+${INIT_END}} ${RELOCATING+${INIT_END}}
@ -393,13 +393,13 @@ cat <<EOF
.rel.dyn 0 : .rel.dyn 0 :
{ {
EOF EOF
sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rela\./d;s/^.*: { *\(.*\)}$/ \1/' $COMBRELOC sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rela\./d;s/^.*: { *\(.*\)}$/ \1/' $COMBRELOC
cat <<EOF cat <<EOF
} }
.rela.dyn 0 : .rela.dyn 0 :
{ {
EOF EOF
sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rel\./d;s/^.*: { *\(.*\)}/ \1/' $COMBRELOC sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rel\./d;s/^.*: { *\(.*\)}/ \1/' $COMBRELOC
cat <<EOF cat <<EOF
} }
EOF EOF

View File

@ -2,7 +2,7 @@
# Based on i386coff.sc by Ian Taylor <ian@cygnus.com>. # Based on i386coff.sc by Ian Taylor <ian@cygnus.com>.
# #
# Copyright (C) 2014-2017 Free Software Foundation, Inc. # Copyright (C) 2014-2017 Free Software Foundation, Inc.
# #
# Copying and distribution of this file, with or without modification, # Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright # are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved. # notice and this notice are preserved.
@ -49,9 +49,9 @@ SECTIONS
*(.glue_7t) *(.glue_7t)
*(.glue_7) *(.glue_7)
*(.rdata) *(.rdata)
${CONSTRUCTING+ ___CTOR_LIST__ = .; __CTOR_LIST__ = . ; ${CONSTRUCTING+ ___CTOR_LIST__ = .; __CTOR_LIST__ = . ;
LONG (-1); *(.ctors); *(.ctor); LONG (0); } LONG (-1); *(.ctors); *(.ctor); LONG (0); }
${CONSTRUCTING+ ___DTOR_LIST__ = .; __DTOR_LIST__ = . ; ${CONSTRUCTING+ ___DTOR_LIST__ = .; __DTOR_LIST__ = . ;
LONG (-1); *(.dtors); *(.dtor); LONG (0); } LONG (-1); *(.dtors); *(.dtor); LONG (0); }
*(.fini) *(.fini)
${RELOCATING+ etext = .;} ${RELOCATING+ etext = .;}
@ -60,13 +60,13 @@ SECTIONS
.data ${RELOCATING+${DATA_ADDR-0x40000 + (ALIGN(0x8) & 0xfffc0fff)}} : { .data ${RELOCATING+${DATA_ADDR-0x40000 + (ALIGN(0x8) & 0xfffc0fff)}} : {
${RELOCATING+ __data_start__ = . ;} ${RELOCATING+ __data_start__ = . ;}
*(.data*) *(.data*)
${RELOCATING+*(.gcc_exc*)} ${RELOCATING+*(.gcc_exc*)}
${RELOCATING+___EH_FRAME_BEGIN__ = . ;} ${RELOCATING+___EH_FRAME_BEGIN__ = . ;}
${RELOCATING+*(.eh_fram*)} ${RELOCATING+*(.eh_fram*)}
${RELOCATING+___EH_FRAME_END__ = . ;} ${RELOCATING+___EH_FRAME_END__ = . ;}
${RELOCATING+LONG(0);} ${RELOCATING+LONG(0);}
${RELOCATING+ __data_end__ = . ;} ${RELOCATING+ __data_end__ = . ;}
${RELOCATING+ edata = .;} ${RELOCATING+ edata = .;}
${RELOCATING+ _edata = .;} ${RELOCATING+ _edata = .;}
@ -74,7 +74,7 @@ SECTIONS
${CONSTRUCTING+${RELOCATING-$CTOR}} ${CONSTRUCTING+${RELOCATING-$CTOR}}
${CONSTRUCTING+${RELOCATING-$DTOR}} ${CONSTRUCTING+${RELOCATING-$DTOR}}
.bss ${RELOCATING+ ALIGN(0x8)} : .bss ${RELOCATING+ ALIGN(0x8)} :
{ {
${RELOCATING+ __bss_start__ = . ;} ${RELOCATING+ __bss_start__ = . ;}
*(.bss) *(.bss)
*(COMMON) *(COMMON)
@ -85,7 +85,7 @@ SECTIONS
${RELOCATING+ _end = .;} ${RELOCATING+ _end = .;}
${RELOCATING+ __end__ = .;} ${RELOCATING+ __end__ = .;}
.stab 0 ${RELOCATING+(NOLOAD)} : .stab 0 ${RELOCATING+(NOLOAD)} :
{ {
[ .stab ] [ .stab ]
} }

View File

@ -1,5 +1,5 @@
# Copyright (C) 2014-2017 Free Software Foundation, Inc. # Copyright (C) 2014-2017 Free Software Foundation, Inc.
# #
# Copying and distribution of this file, with or without modification, # Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright # are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved. # notice and this notice are preserved.
@ -129,7 +129,7 @@ SECTIONS
${RELOCATING+ *libc.a:*(.progmem.data)} ${RELOCATING+ *libc.a:*(.progmem.data)}
${RELOCATING+ *(.progmem.*)} ${RELOCATING+ *(.progmem.*)}
${RELOCATING+. = ALIGN(2);} ${RELOCATING+. = ALIGN(2);}
/* For code that needs to reside in the lower 128k progmem. */ /* For code that needs to reside in the lower 128k progmem. */
@ -331,7 +331,7 @@ cat <<EOF
.stab.exclstr 0 : { *(.stab.exclstr) } .stab.exclstr 0 : { *(.stab.exclstr) }
.stab.index 0 : { *(.stab.index) } .stab.index 0 : { *(.stab.index) }
.stab.indexstr 0 : { *(.stab.indexstr) } .stab.indexstr 0 : { *(.stab.indexstr) }
.comment 0 : { *(.comment) } .comment 0 : { *(.comment) }
.note.gnu.build-id : { *(.note.gnu.build-id) } .note.gnu.build-id : { *(.note.gnu.build-id) }
EOF EOF

View File

@ -1,5 +1,5 @@
# Copyright (C) 2014-2017 Free Software Foundation, Inc. # Copyright (C) 2014-2017 Free Software Foundation, Inc.
# #
# Copying and distribution of this file, with or without modification, # Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright # are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved. # notice and this notice are preserved.
@ -22,7 +22,7 @@ SECTIONS
${CONSTRUCTING+ __Stext = .;} ${CONSTRUCTING+ __Stext = .;}
${RELOCATING+*(.startup)} ${RELOCATING+*(.startup)}
*(.text) *(.text)
${CONSTRUCTING+__start = DEFINED(__start) ? __start : ${CONSTRUCTING+__start = DEFINED(__start) ? __start :
DEFINED(_start) ? _start : DEFINED(_start) ? _start :
DEFINED(start) ? start : DEFINED(start) ? start :
DEFINED(.startup) ? .startup + 2 : 2;} DEFINED(.startup) ? .startup + 2 : 2;}

View File

@ -1,5 +1,5 @@
# Copyright (C) 2014-2017 Free Software Foundation, Inc. # Copyright (C) 2014-2017 Free Software Foundation, Inc.
# #
# Copying and distribution of this file, with or without modification, # Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright # are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved. # notice and this notice are preserved.
@ -45,7 +45,7 @@ SECTIONS
${RELOCATING+ __.data.end = .}; ${RELOCATING+ __.data.end = .};
} }
.bss ${RELOCATING+ SIZEOF(.data) + ADDR(.data)} : .bss ${RELOCATING+ SIZEOF(.data) + ADDR(.data)} :
{ {
${RELOCATING+ __.bss.start = .}; ${RELOCATING+ __.bss.start = .};
*(.bss) *(.bss)
*(COMMON) *(COMMON)

View File

@ -1,5 +1,5 @@
# Copyright (C) 2014-2017 Free Software Foundation, Inc. # Copyright (C) 2014-2017 Free Software Foundation, Inc.
# #
# Copying and distribution of this file, with or without modification, # Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright # are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved. # notice and this notice are preserved.

View File

@ -1,5 +1,5 @@
# Copyright (C) 2014-2017 Free Software Foundation, Inc. # Copyright (C) 2014-2017 Free Software Foundation, Inc.
# #
# Copying and distribution of this file, with or without modification, # Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright # are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved. # notice and this notice are preserved.
@ -54,9 +54,9 @@
# INPUT_FILES - INPUT command of files to always include # INPUT_FILES - INPUT command of files to always include
# WRITABLE_RODATA - if set, the .rodata section should be writable # WRITABLE_RODATA - if set, the .rodata section should be writable
# INIT_START, INIT_END - statements just before and just after # 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 # 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. # STACK_ADDR - start of a .stack section.
# OTHER_SYMBOLS - symbols to place right at the end of the script. # 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, # ETEXT_NAME - name of a symbol for the end of the text section,
@ -429,13 +429,13 @@ cat >> ldscripts/dyntmp.$$ <<EOF
.rel.dyn ${RELOCATING-0} : .rel.dyn ${RELOCATING-0} :
{ {
EOF 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 cat >> ldscripts/dyntmp.$$ <<EOF
} }
.rela.dyn ${RELOCATING-0} : .rela.dyn ${RELOCATING-0} :
{ {
EOF 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 cat >> ldscripts/dyntmp.$$ <<EOF
} }
EOF EOF
@ -465,10 +465,10 @@ emit_dyn()
cat ldscripts/dyntmp.$$ cat ldscripts/dyntmp.$$
else else
if test -z "${NO_REL_RELOCS}"; then 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 fi
if test -z "${NO_RELA_RELOCS}"; then 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
fi fi
rm -f ldscripts/dyntmp.$$ rm -f ldscripts/dyntmp.$$

View File

@ -1,7 +1,7 @@
# Linker Script for National Semiconductor's CR16-ELF32. # Linker Script for National Semiconductor's CR16-ELF32.
# #
# Copyright (C) 2014-2017 Free Software Foundation, Inc. # Copyright (C) 2014-2017 Free Software Foundation, Inc.
# #
# Copying and distribution of this file, with or without modification, # Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright # are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved. # notice and this notice are preserved.
@ -28,8 +28,8 @@ ${RELOCATING+ENTRY(${ENTRY})}
/* Define memory regions. */ /* Define memory regions. */
MEMORY MEMORY
{ {
rom : ORIGIN = 0x2, LENGTH = 3M rom : ORIGIN = 0x2, LENGTH = 3M
ram : ORIGIN = 4M, LENGTH = 10M ram : ORIGIN = 4M, LENGTH = 10M
} }
/* Many sections come in three flavours. There is the 'real' section, /* Many sections come in three flavours. There is the 'real' section,
@ -50,25 +50,25 @@ MEMORY
SECTIONS SECTIONS
{ {
.init : .init :
{ {
__INIT_START = .; __INIT_START = .;
KEEP (*(.init)) KEEP (*(.init))
__INIT_END = .; __INIT_END = .;
} > rom } > rom
.fini : .fini :
{ {
__FINI_START = .; __FINI_START = .;
KEEP (*(.fini)) KEEP (*(.fini))
__FINI_END = .; __FINI_END = .;
} > rom } > rom
.jcr : .jcr :
{ {
KEEP (*(.jcr)) KEEP (*(.jcr))
} > rom } > rom
.text : .text :
{ {
__TEXT_START = .; __TEXT_START = .;
*(.text) *(.text.*) *(.gnu.linkonce.t.*) *(.text) *(.text.*) *(.gnu.linkonce.t.*)
@ -82,9 +82,9 @@ SECTIONS
__RDATA_END = .; __RDATA_END = .;
} > rom } > rom
.ctor ALIGN(4) : .ctor ALIGN(4) :
{ {
__CTOR_START = .; __CTOR_START = .;
/* The compiler uses crtbegin.o to find the start /* The compiler uses crtbegin.o to find the start
of the constructors, so we make sure it is of the constructors, so we make sure it is
first. Because this is a wildcard, it first. Because this is a wildcard, it
@ -105,17 +105,17 @@ SECTIONS
KEEP (*(EXCLUDE_FILE (*crtend*.o) .ctors)) KEEP (*(EXCLUDE_FILE (*crtend*.o) .ctors))
KEEP (*(SORT(.ctors.*))) KEEP (*(SORT(.ctors.*)))
KEEP (*(.ctors)) KEEP (*(.ctors))
__CTOR_END = .; __CTOR_END = .;
} > rom } > rom
.dtor ALIGN(4) : .dtor ALIGN(4) :
{ {
__DTOR_START = .; __DTOR_START = .;
KEEP (*crtbegin*.o(.dtors)) KEEP (*crtbegin*.o(.dtors))
KEEP (*(EXCLUDE_FILE (*crtend*.o) .dtors)) KEEP (*(EXCLUDE_FILE (*crtend*.o) .dtors))
KEEP (*(SORT(.dtors.*))) KEEP (*(SORT(.dtors.*)))
KEEP (*(.dtors)) KEEP (*(.dtors))
__DTOR_END = .; __DTOR_END = .;
} > rom } > rom
.data : .data :

View File

@ -1,7 +1,7 @@
# Linker Script for National Semiconductor's CR16C-ELF32. # Linker Script for National Semiconductor's CR16C-ELF32.
# #
# Copyright (C) 2014-2017 Free Software Foundation, Inc. # Copyright (C) 2014-2017 Free Software Foundation, Inc.
# #
# Copying and distribution of this file, with or without modification, # Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright # are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved. # notice and this notice are preserved.
@ -26,8 +26,8 @@ MEMORY
{ {
near_rom : ORIGIN = 0x4, LENGTH = 512K - 4 near_rom : ORIGIN = 0x4, LENGTH = 512K - 4
near_ram : ORIGIN = 512K, LENGTH = 512K - 64K near_ram : ORIGIN = 512K, LENGTH = 512K - 64K
rom : ORIGIN = 1M, LENGTH = 3M rom : ORIGIN = 1M, LENGTH = 3M
ram : ORIGIN = 4M, LENGTH = 10M ram : ORIGIN = 4M, LENGTH = 10M
} }
SECTIONS SECTIONS
@ -38,7 +38,7 @@ SECTIONS
there. The alignment to 4 bytes is compatible for both the CR16C there. The alignment to 4 bytes is compatible for both the CR16C
bus width (2 bytes) and CR16CPlus bus width (4 bytes). */ 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 .rdata : { __RDATA_START = .; *(.rdata_4) *(.rdata_2) *(.rdata_1) __RDATA_END = .; } > near_rom
.ctor ALIGN(4) : { __CTOR_LIST = .; *(.ctors) __CTOR_END = .; } > near_rom .ctor ALIGN(4) : { __CTOR_LIST = .; *(.ctors) __CTOR_END = .; } > near_rom
.dtor ALIGN(4) : { __DTOR_LIST = .; *(.dtors) __DTOR_END = .; } > near_rom .dtor ALIGN(4) : { __DTOR_LIST = .; *(.dtors) __DTOR_END = .; } > near_rom

View File

@ -1,7 +1,7 @@
# Linker Script for National Semiconductor's CRX-ELF32. # Linker Script for National Semiconductor's CRX-ELF32.
# #
# Copyright (C) 2014-2017 Free Software Foundation, Inc. # Copyright (C) 2014-2017 Free Software Foundation, Inc.
# #
# Copying and distribution of this file, with or without modification, # Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright # are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved. # notice and this notice are preserved.
@ -30,8 +30,8 @@ ${RELOCATING+ENTRY(${ENTRY})}
/* Define memory regions. */ /* Define memory regions. */
MEMORY MEMORY
{ {
rom : ORIGIN = 0x2, LENGTH = 3M rom : ORIGIN = 0x2, LENGTH = 3M
ram : ORIGIN = 4M, LENGTH = 10M ram : ORIGIN = 4M, LENGTH = 10M
} }
/* Many sections come in three flavours. There is the 'real' section, /* Many sections come in three flavours. There is the 'real' section,
@ -52,25 +52,25 @@ MEMORY
SECTIONS SECTIONS
{ {
.init : .init :
{ {
__INIT_START = .; __INIT_START = .;
KEEP (*(.init)) KEEP (*(.init))
__INIT_END = .; __INIT_END = .;
} > rom } > rom
.fini : .fini :
{ {
__FINI_START = .; __FINI_START = .;
KEEP (*(.fini)) KEEP (*(.fini))
__FINI_END = .; __FINI_END = .;
} > rom } > rom
.jcr : .jcr :
{ {
KEEP (*(.jcr)) KEEP (*(.jcr))
} > rom } > rom
.text : .text :
{ {
__TEXT_START = .; __TEXT_START = .;
*(.text) *(.text.*) *(.gnu.linkonce.t.*) *(.text) *(.text.*) *(.gnu.linkonce.t.*)
@ -84,9 +84,9 @@ SECTIONS
__RDATA_END = .; __RDATA_END = .;
} > rom } > rom
.ctor ALIGN(4) : .ctor ALIGN(4) :
{ {
__CTOR_START = .; __CTOR_START = .;
/* The compiler uses crtbegin.o to find the start /* The compiler uses crtbegin.o to find the start
of the constructors, so we make sure it is of the constructors, so we make sure it is
first. Because this is a wildcard, it first. Because this is a wildcard, it
@ -99,7 +99,7 @@ SECTIONS
KEEP (*crtbegin.o(.ctors)) KEEP (*crtbegin.o(.ctors))
KEEP (*crtbegin?.o(.ctors)) KEEP (*crtbegin?.o(.ctors))
/* We don't want to include the .ctor section from /* We don't want to include the .ctor section from
the crtend.o file until after the sorted ctors. the crtend.o file until after the sorted ctors.
The .ctor section from the crtend file contains the The .ctor section from the crtend file contains the
@ -108,18 +108,18 @@ SECTIONS
KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o) .ctors)) KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o) .ctors))
KEEP (*(SORT(.ctors.*))) KEEP (*(SORT(.ctors.*)))
KEEP (*(.ctors)) KEEP (*(.ctors))
__CTOR_END = .; __CTOR_END = .;
} > rom } > rom
.dtor ALIGN(4) : .dtor ALIGN(4) :
{ {
__DTOR_START = .; __DTOR_START = .;
KEEP (*crtbegin.o(.dtors)) KEEP (*crtbegin.o(.dtors))
KEEP (*crtbegin?.o(.dtors)) KEEP (*crtbegin?.o(.dtors))
KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o) .dtors)) KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o) .dtors))
KEEP (*(SORT(.dtors.*))) KEEP (*(SORT(.dtors.*)))
KEEP (*(.dtors)) KEEP (*(.dtors))
__DTOR_END = .; __DTOR_END = .;
} > rom } > rom
.data : .data :

View File

@ -1,5 +1,5 @@
# Copyright (C) 2014-2017 Free Software Foundation, Inc. # Copyright (C) 2014-2017 Free Software Foundation, Inc.
# #
# Copying and distribution of this file, with or without modification, # Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright # are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved. # notice and this notice are preserved.
@ -7,8 +7,8 @@
HEAP_SECTION_MSP430=" " HEAP_SECTION_MSP430=" "
HEAP_MEMORY_MSP430=" " HEAP_MEMORY_MSP430=" "
if test ${GOT_HEAP_MSP-0} -ne 0 if test ${GOT_HEAP_MSP-0} -ne 0
then then
HEAP_SECTION_MSP430=".heap ${RELOCATING-0} : HEAP_SECTION_MSP430=".heap ${RELOCATING-0} :
{ {
${RELOCATING+ PROVIDE (__heap_data_start = .) ; } ${RELOCATING+ PROVIDE (__heap_data_start = .) ; }
@ -18,7 +18,7 @@ HEAP_SECTION_MSP430=".heap ${RELOCATING-0} :
${RELOCATING+ PROVIDE (__heap_bottom = .) ; } ${RELOCATING+ PROVIDE (__heap_bottom = .) ; }
${RELOCATING+ PROVIDE (__heap_top = ${HEAP_START} + ${HEAP_LENGTH}) ; } ${RELOCATING+ PROVIDE (__heap_top = ${HEAP_START} + ${HEAP_LENGTH}) ; }
} ${RELOCATING+ > heap}" } ${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 fi
@ -34,9 +34,9 @@ OUTPUT_ARCH(${ARCH})
MEMORY MEMORY
{ {
text (rx) : ORIGIN = $ROM_START, LENGTH = $ROM_SIZE 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 vectors (rw) : ORIGIN = 0xffe0, LENGTH = 0x20
bootloader(rx) : ORIGIN = 0x0c00, LENGTH = 1K bootloader(rx) : ORIGIN = 0x0c00, LENGTH = 1K
infomem(rx) : ORIGIN = 0x1000, LENGTH = 256 infomem(rx) : ORIGIN = 0x1000, LENGTH = 256
infomemnobits(rx) : ORIGIN = 0x1000, LENGTH = 256 infomemnobits(rx) : ORIGIN = 0x1000, LENGTH = 256
@ -53,7 +53,7 @@ SECTIONS
${RELOCATING+. = ALIGN(2);} ${RELOCATING+. = ALIGN(2);}
*(.bootloader.*) *(.bootloader.*)
} ${RELOCATING+ > bootloader} } ${RELOCATING+ > bootloader}
/* Information memory. */ /* Information memory. */
.infomem ${RELOCATING-0} : .infomem ${RELOCATING-0} :
{ {
@ -270,7 +270,7 @@ SECTIONS
__romdatastart = LOADADDR(.data); __romdatastart = LOADADDR(.data);
__romdatacopysize = SIZEOF(.data); __romdatacopysize = SIZEOF(.data);
.bss ${RELOCATING+ SIZEOF(.data) + ADDR(.data)} : .bss ${RELOCATING+ SIZEOF(.data) + ADDR(.data)} :
{ {
${RELOCATING+. = ALIGN(2);} ${RELOCATING+. = ALIGN(2);}
@ -304,9 +304,9 @@ SECTIONS
/* Stabs for profiling information*/ /* Stabs for profiling information*/
.profiler 0 : { *(.profiler) } .profiler 0 : { *(.profiler) }
/* Stabs debugging sections. */ /* Stabs debugging sections. */
.stab 0 : { *(.stab) } .stab 0 : { *(.stab) }
.stabstr 0 : { *(.stabstr) } .stabstr 0 : { *(.stabstr) }
.stab.excl 0 : { *(.stab.excl) } .stab.excl 0 : { *(.stab.excl) }
.stab.exclstr 0 : { *(.stab.exclstr) } .stab.exclstr 0 : { *(.stab.exclstr) }

View File

@ -1,5 +1,5 @@
# Copyright (C) 2014-2017 Free Software Foundation, Inc. # Copyright (C) 2014-2017 Free Software Foundation, Inc.
# #
# Copying and distribution of this file, with or without modification, # Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright # are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved. # notice and this notice are preserved.
@ -17,7 +17,7 @@ OUTPUT_ARCH(${ARCH})
MEMORY MEMORY
{ {
text (rx) : ORIGIN = $ROM_START, LENGTH = $ROM_SIZE 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 vectors (rw) : ORIGIN = 0xffe0, LENGTH = 0x20
} }
@ -137,7 +137,7 @@ SECTIONS
} ${RELOCATING+ > text} } ${RELOCATING+ > text}
.data ${RELOCATING-0} : .data ${RELOCATING-0} :
{ {
${RELOCATING+ PROVIDE (__data_start = .) ; } ${RELOCATING+ PROVIDE (__data_start = .) ; }
${RELOCATING+. = ALIGN(2);} ${RELOCATING+. = ALIGN(2);}
*(.data) *(.data)
@ -146,10 +146,10 @@ SECTIONS
${RELOCATING+. = ALIGN(2);} ${RELOCATING+. = ALIGN(2);}
${RELOCATING+ _edata = . ; } ${RELOCATING+ _edata = . ; }
} ${RELOCATING+ > data ${RELOCATING+AT> text}} } ${RELOCATING+ > data ${RELOCATING+AT> text}}
__romdatastart = LOADADDR(.data); __romdatastart = LOADADDR(.data);
__romdatacopysize = SIZEOF(.data); __romdatacopysize = SIZEOF(.data);
.bss ${RELOCATING+ SIZEOF(.data) + ADDR(.data)} : .bss ${RELOCATING+ SIZEOF(.data) + ADDR(.data)} :
{ {
${RELOCATING+. = ALIGN(2);} ${RELOCATING+. = ALIGN(2);}
@ -193,14 +193,14 @@ SECTIONS
} }
/* Stabs debugging sections. */ /* Stabs debugging sections. */
.stab 0 : { *(.stab) } .stab 0 : { *(.stab) }
.stabstr 0 : { *(.stabstr) } .stabstr 0 : { *(.stabstr) }
.stab.excl 0 : { *(.stab.excl) } .stab.excl 0 : { *(.stab.excl) }
.stab.exclstr 0 : { *(.stab.exclstr) } .stab.exclstr 0 : { *(.stab.exclstr) }
.stab.index 0 : { *(.stab.index) } .stab.index 0 : { *(.stab.index) }
.stab.indexstr 0 : { *(.stab.indexstr) } .stab.indexstr 0 : { *(.stab.indexstr) }
.comment 0 : { *(.comment) } .comment 0 : { *(.comment) }
EOF EOF
. $srcdir/scripttempl/DWARF.sc . $srcdir/scripttempl/DWARF.sc

View File

@ -1,5 +1,5 @@
# Copyright (C) 2014-2017 Free Software Foundation, Inc. # Copyright (C) 2014-2017 Free Software Foundation, Inc.
# #
# Copying and distribution of this file, with or without modification, # Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright # are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved. # notice and this notice are preserved.
@ -29,15 +29,15 @@
# DATA_PLT - .plt should be in data segment, not text segment. # DATA_PLT - .plt should be in data segment, not text segment.
# BSS_PLT - .plt should be in bss segment # BSS_PLT - .plt should be in bss segment
# TEXT_DYNAMIC - .dynamic in text segment, not 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 # SHLIB_TEXT_START_ADDR - if set, add to SIZEOF_HEADERS to set
# start address of shared library. # start address of shared library.
# INPUT_FILES - INPUT command of files to always include # INPUT_FILES - INPUT command of files to always include
# WRITABLE_RODATA - if set, the .rodata section should be writable # WRITABLE_RODATA - if set, the .rodata section should be writable
# INIT_START, INIT_END - statements just before and just after # 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 # 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. # STACK_ADDR - start of a .stack section.
# OTHER_SYMBOLS - symbols to place right at the end of the script. # OTHER_SYMBOLS - symbols to place right at the end of the script.
# #
@ -104,7 +104,7 @@ FINI_ARRAY=".fini_array ${RELOCATING-0} :
KEEP (*(.fini_array)) KEEP (*(.fini_array))
${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (__fini_array_end = .);}} ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (__fini_array_end = .);}}
}" }"
CTOR=".ctors ALIGN(4) : CTOR=".ctors ALIGN(4) :
{ {
${CONSTRUCTING+${CTOR_START}} ${CONSTRUCTING+${CTOR_START}}
/* gcc uses crtbegin.o to find the start of /* gcc uses crtbegin.o to find the start of
@ -191,11 +191,11 @@ SECTIONS
${CREATE_SHLIB+${RELOCATING+. = ${SHLIB_TEXT_START_ADDR:-0};}} ${CREATE_SHLIB+${RELOCATING+. = ${SHLIB_TEXT_START_ADDR:-0};}}
${CREATE_PIE+${RELOCATING+. = ${SHLIB_TEXT_START_ADDR:-0};}} ${CREATE_PIE+${RELOCATING+. = ${SHLIB_TEXT_START_ADDR:-0};}}
${CREATE_SHLIB-${INTERP}} ${CREATE_SHLIB-${INTERP}}
${INITIAL_READONLY_SECTIONS} ${INITIAL_READONLY_SECTIONS}
.init ALIGN(4) : .init ALIGN(4) :
{ {
${RELOCATING+${INIT_START}} ${RELOCATING+${INIT_START}}
KEEP (*(.init)) KEEP (*(.init))
${RELOCATING+${INIT_END}} ${RELOCATING+${INIT_END}}
@ -209,24 +209,24 @@ SECTIONS
*(.gnu.warning) *(.gnu.warning)
${RELOCATING+${OTHER_TEXT_SECTIONS}} ${RELOCATING+${OTHER_TEXT_SECTIONS}}
} =${NOP-0} } =${NOP-0}
${RELOCATING+${CTOR}} ${RELOCATING+${CTOR}}
${RELOCATING+${DTOR}} ${RELOCATING+${DTOR}}
.fini ALIGN(4) : .fini ALIGN(4) :
{ {
${RELOCATING+${FINI_START}} ${RELOCATING+${FINI_START}}
KEEP (*(.fini)) KEEP (*(.fini))
${RELOCATING+${FINI_END}} ${RELOCATING+${FINI_END}}
} =${NOP-0} } =${NOP-0}
${RELOCATING+PROVIDE (__etext = .);} ${RELOCATING+PROVIDE (__etext = .);}
${RELOCATING+PROVIDE (_etext = .);} ${RELOCATING+PROVIDE (_etext = .);}
${RELOCATING+PROVIDE (etext = .);} ${RELOCATING+PROVIDE (etext = .);}
${WRITABLE_RODATA-${RODATA}} ${WRITABLE_RODATA-${RODATA}}
.rodata1 ALIGN(4) : { *(.rodata1) } .rodata1 ALIGN(4) : { *(.rodata1) }
ExportTable ALIGN(4) : { KEEP (*(ExportTable)) } ExportTable ALIGN(4) : { KEEP (*(ExportTable)) }
.eh_frame_hdr ALIGN(4) : { *(.eh_frame_hdr) } :text .eh_frame_hdr ALIGN(4) : { *(.eh_frame_hdr) } :text
@ -252,7 +252,7 @@ SECTIONS
*(.data${RELOCATING+ .data.* .gnu.linkonce.d.*}) *(.data${RELOCATING+ .data.* .gnu.linkonce.d.*})
${CONSTRUCTING+SORT(CONSTRUCTORS)} ${CONSTRUCTING+SORT(CONSTRUCTORS)}
} :data } :data
.data1 ALIGN(4) : { *(.data1) } :data .data1 ALIGN(4) : { *(.data1) } :data
.tdata ALIGN(4) : { *(.tdata${RELOCATING+ .tdata.* .gnu.linkonce.td.*}) } :data .tdata ALIGN(4) : { *(.tdata${RELOCATING+ .tdata.* .gnu.linkonce.td.*}) } :data
.tbss ALIGN(4) : { *(.tbss${RELOCATING+ .tbss.* .gnu.linkonce.tb.*})${RELOCATING+ *(.tcommon)} } :data .tbss ALIGN(4) : { *(.tbss${RELOCATING+ .tbss.* .gnu.linkonce.tb.*})${RELOCATING+ *(.tcommon)} } :data
@ -331,13 +331,13 @@ cat <<EOF
.rel.dyn ${RELOCATING-0} : .rel.dyn ${RELOCATING-0} :
{ {
EOF EOF
sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rela\./d;s/^.*: { *\(.*\)}$/ \1/' $COMBRELOC sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rela\./d;s/^.*: { *\(.*\)}$/ \1/' $COMBRELOC
cat <<EOF cat <<EOF
} }
.rela.dyn ${RELOCATING-0} : .rela.dyn ${RELOCATING-0} :
{ {
EOF EOF
sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rel\./d;s/^.*: { *\(.*\)}/ \1/' $COMBRELOC sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rel\./d;s/^.*: { *\(.*\)}/ \1/' $COMBRELOC
cat <<EOF cat <<EOF
} }
EOF EOF

View File

@ -1,5 +1,5 @@
# Copyright (C) 2014-2017 Free Software Foundation, Inc. # Copyright (C) 2014-2017 Free Software Foundation, Inc.
# #
# Copying and distribution of this file, with or without modification, # Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright # are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved. # notice and this notice are preserved.
@ -16,37 +16,37 @@ OUTPUT_ARCH(${ARCH})
${RELOCATING+ENTRY ("_start")} ${RELOCATING+ENTRY ("_start")}
MEMORY MEMORY
{ {
vectarea : o =0x00000, l = 0x0300 vectarea : o =0x00000, l = 0x0300
introm : o = 0x00400, l = 0x16000 introm : o = 0x00400, l = 0x16000
/* The stack starts at the top of main ram. */ /* The stack starts at the top of main ram. */
dram : o = 0x8000 , l = 0xffff dram : o = 0x8000 , l = 0xffff
/* At the very top of the address space is the 8-bit area. */ /* At the very top of the address space is the 8-bit area. */
ldata : o =0x4000 ,l = 0x0200 ldata : o =0x4000 ,l = 0x0200
} }
SECTIONS SECTIONS
{ {
.init : .init :
{ {
*(.init) *(.init)
} ${RELOCATING+ >introm} } ${RELOCATING+ >introm}
.text : .text :
{ {
*(.rodata) *(.rodata)
*(.text.*) *(.text.*)
*(.text) *(.text)
${RELOCATING+ _etext = . ; } ${RELOCATING+ _etext = . ; }
} ${RELOCATING+ > introm} } ${RELOCATING+ > introm}
.data : .data :
{ {
*(.data) *(.data)
*(.data.*) *(.data.*)
${RELOCATING+ _edata = . ; } ${RELOCATING+ _edata = . ; }
} ${RELOCATING+ > dram} } ${RELOCATING+ > dram}
@ -58,16 +58,16 @@ SECTIONS
${RELOCATING+ _end = . ; } ${RELOCATING+ _end = . ; }
} ${RELOCATING+ > dram} } ${RELOCATING+ > dram}
.ldata : .ldata :
{ {
*(.ldata) *(.ldata)
} ${RELOCATING+ > ldata} } ${RELOCATING+ > ldata}
.vects : .vects :
{ {
*(.vects) *(.vects)
} ${RELOCATING+ > vectarea} } ${RELOCATING+ > vectarea}
} }
EOF EOF

View File

@ -1,5 +1,5 @@
# Copyright (C) 2014-2017 Free Software Foundation, Inc. # Copyright (C) 2014-2017 Free Software Foundation, Inc.
# #
# Copying and distribution of this file, with or without modification, # Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright # are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved. # notice and this notice are preserved.
@ -16,39 +16,39 @@ OUTPUT_ARCH(${ARCH})
${RELOCATING+ENTRY ("_start")} ${RELOCATING+ENTRY ("_start")}
MEMORY MEMORY
{ {
vectarea : o =0xc00000, l = 0x0300 vectarea : o =0xc00000, l = 0x0300
introm : o = 0xc00300, l = 0x16000 introm : o = 0xc00300, l = 0x16000
/* The stack starts at the top of main ram. */ /* The stack starts at the top of main ram. */
dram : o = 0x8000 , l = 0xffff dram : o = 0x8000 , l = 0xffff
/* At the very top of the address space is the 8-bit area. */ /* At the very top of the address space is the 8-bit area. */
ldata : o =0x4000 ,l = 0x0200 ldata : o =0x4000 ,l = 0x0200
} }
SECTIONS SECTIONS
{ {
/*.vects : /*.vects :
{ {
*(.vects) *(.vects)
} ${RELOCATING+ > vectarea} */ } ${RELOCATING+ > vectarea} */
.init : .init :
{ {
*(.init) *(.init)
} ${RELOCATING+ >introm} } ${RELOCATING+ >introm}
.text : .text :
{ {
*(.rodata) *(.rodata)
*(.text.*) *(.text.*)
*(.text) *(.text)
${RELOCATING+ _etext = . ; } ${RELOCATING+ _etext = . ; }
} ${RELOCATING+ > introm} } ${RELOCATING+ > introm}
.data : .data :
{ {
*(.data) *(.data)
*(.data.*) *(.data.*)
${RELOCATING+ _edata = . ; } ${RELOCATING+ _edata = . ; }
} ${RELOCATING+ > dram} } ${RELOCATING+ > dram}
@ -60,17 +60,14 @@ SECTIONS
${RELOCATING+ _end = . ; } ${RELOCATING+ _end = . ; }
} ${RELOCATING+ > dram} } ${RELOCATING+ > dram}
.ldata : .ldata :
{ {
*(.ldata) *(.ldata)
} ${RELOCATING+ > ldata} } ${RELOCATING+ > ldata}
.vects :
{
*(.vects)
} ${RELOCATING+ > vectarea}
.vects :
{
*(.vects)
} ${RELOCATING+ > vectarea}
} }
EOF EOF

View File

@ -1,5 +1,5 @@
# Copyright (C) 2014-2017 Free Software Foundation, Inc. # Copyright (C) 2014-2017 Free Software Foundation, Inc.
# #
# Copying and distribution of this file, with or without modification, # Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright # are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved. # notice and this notice are preserved.
@ -16,39 +16,39 @@ OUTPUT_ARCH(${ARCH})
${RELOCATING+ENTRY ("_start")} ${RELOCATING+ENTRY ("_start")}
MEMORY MEMORY
{ {
vectarea : o =0xc00000, l = 0x0300 vectarea : o =0xc00000, l = 0x0300
introm : o = 0xc00300, l = 0x16000 introm : o = 0xc00300, l = 0x16000
/* The stack starts at the top of main ram. */ /* The stack starts at the top of main ram. */
dram : o = 0x8000 , l = 0xffff dram : o = 0x8000 , l = 0xffff
/* At the very top of the address space is the 8-bit area. */ /* At the very top of the address space is the 8-bit area. */
ldata : o =0x4000 ,l = 0x0200 ldata : o =0x4000 ,l = 0x0200
} }
SECTIONS SECTIONS
{ {
/*.vects : /*.vects :
{ {
*(.vects) *(.vects)
} ${RELOCATING+ > vectarea} */ } ${RELOCATING+ > vectarea} */
.init : .init :
{ {
*(.init) *(.init)
} ${RELOCATING+ >introm} } ${RELOCATING+ >introm}
.text : .text :
{ {
*(.rodata) *(.rodata)
*(.text.*) *(.text.*)
*(.text) *(.text)
${RELOCATING+ _etext = . ; } ${RELOCATING+ _etext = . ; }
} ${RELOCATING+ > introm} } ${RELOCATING+ > introm}
.data : .data :
{ {
*(.data) *(.data)
*(.data.*) *(.data.*)
${RELOCATING+ _edata = . ; } ${RELOCATING+ _edata = . ; }
} ${RELOCATING+ > dram} } ${RELOCATING+ > dram}
@ -60,14 +60,14 @@ SECTIONS
${RELOCATING+ _end = . ; } ${RELOCATING+ _end = . ; }
} ${RELOCATING+ > dram} } ${RELOCATING+ > dram}
.ldata : .ldata :
{ {
*(.ldata) *(.ldata)
} ${RELOCATING+ > ldata} } ${RELOCATING+ > ldata}
.vects : .vects :
{ {
*(.vects) *(.vects)
} ${RELOCATING+ > vectarea} } ${RELOCATING+ > vectarea}
} }
EOF EOF

View File

@ -1,5 +1,5 @@
# Copyright (C) 2014-2017 Free Software Foundation, Inc. # Copyright (C) 2014-2017 Free Software Foundation, Inc.
# #
# Copying and distribution of this file, with or without modification, # Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright # are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved. # notice and this notice are preserved.
@ -45,15 +45,15 @@
# NO_RELA_RELOCS - Don't include .rela.* sections in script # NO_RELA_RELOCS - Don't include .rela.* sections in script
# NON_ALLOC_DYN - Place dynamic sections after data segment. # NON_ALLOC_DYN - Place dynamic sections after data segment.
# TEXT_DYNAMIC - .dynamic in text segment, not 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 # SHLIB_TEXT_START_ADDR - if set, add to SIZEOF_HEADERS to set
# start address of shared library. # start address of shared library.
# INPUT_FILES - INPUT command of files to always include # INPUT_FILES - INPUT command of files to always include
# WRITABLE_RODATA - if set, the .rodata section should be writable # WRITABLE_RODATA - if set, the .rodata section should be writable
# INIT_START, INIT_END - statements just before and just after # 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 # 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. # STACK_ADDR - start of a .stack section.
# OTHER_SYMBOLS - symbols to place right at the end of the script. # 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, # ETEXT_NAME - name of a symbol for the end of the text section,
@ -147,7 +147,7 @@ if test -z "${NO_SMALL_DATA}"; then
SDATA="/* We want the small data sections together, so single-instruction offsets SDATA="/* We want the small data sections together, so single-instruction offsets
can access them all, and initialized data all before uninitialized, so can access them all, and initialized data all before uninitialized, so
we can shorten the on-disk segment size. */ we can shorten the on-disk segment size. */
.sdata ${RELOCATING-0} : .sdata ${RELOCATING-0} :
{ {
${RELOCATING+${SDATA_START_SYMBOLS}} ${RELOCATING+${SDATA_START_SYMBOLS}}
${CREATE_SHLIB+*(.sdata2 .sdata2.* .gnu.linkonce.s2.*)} ${CREATE_SHLIB+*(.sdata2 .sdata2.* .gnu.linkonce.s2.*)}
@ -219,7 +219,7 @@ FINI_ARRAY=".fini_array ${RELOCATING-0} :
KEEP (*(.fini_array)) KEEP (*(.fini_array))
${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (${USER_LABEL_PREFIX}__fini_array_end = .);}} ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (${USER_LABEL_PREFIX}__fini_array_end = .);}}
}" }"
CTOR=".ctors ${CONSTRUCTING-0} : CTOR=".ctors ${CONSTRUCTING-0} :
{ {
${CONSTRUCTING+${CTOR_START}} ${CONSTRUCTING+${CTOR_START}}
/* gcc uses crtbegin.o to find the start of /* gcc uses crtbegin.o to find the start of
@ -359,7 +359,7 @@ cat >> ldscripts/dyntmp.$$ <<EOF
.rel.dyn ${RELOCATING-0} : .rel.dyn ${RELOCATING-0} :
{ {
EOF 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 cat >> ldscripts/dyntmp.$$ <<EOF
} }
.rel.ifunc.dyn ${RELOCATING-0} : .rel.ifunc.dyn ${RELOCATING-0} :
@ -369,7 +369,7 @@ cat >> ldscripts/dyntmp.$$ <<EOF
.rela.dyn ${RELOCATING-0} : .rela.dyn ${RELOCATING-0} :
{ {
EOF 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 cat >> ldscripts/dyntmp.$$ <<EOF
} }
.rela.ifunc.dyn ${RELOCATING-0} : .rela.ifunc.dyn ${RELOCATING-0} :
@ -390,18 +390,18 @@ if test -z "${NON_ALLOC_DYN}"; then
cat ldscripts/dyntmp.$$ cat ldscripts/dyntmp.$$
else else
if test -z "${NO_REL_RELOCS}"; then 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 fi
if test -z "${NO_RELA_RELOCS}"; then 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
fi fi
rm -f ldscripts/dyntmp.$$ rm -f ldscripts/dyntmp.$$
fi fi
cat <<EOF cat <<EOF
.init ${RELOCATING-0} : .init ${RELOCATING-0} :
{ {
${RELOCATING+${INIT_START}} ${RELOCATING+${INIT_START}}
KEEP (*(.init)) KEEP (*(.init))
${RELOCATING+${INIT_END}} ${RELOCATING+${INIT_END}}
@ -524,10 +524,10 @@ if test -n "${NON_ALLOC_DYN}"; then
cat ldscripts/dyntmp.$$ cat ldscripts/dyntmp.$$
else else
if test -z "${NO_REL_RELOCS}"; then 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 fi
if test -z "${NO_RELA_RELOCS}"; then 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
fi fi
rm -f ldscripts/dyntmp.$$ rm -f ldscripts/dyntmp.$$

View File

@ -1,5 +1,5 @@
# Copyright (C) 2014-2017 Free Software Foundation, Inc. # Copyright (C) 2014-2017 Free Software Foundation, Inc.
# #
# Copying and distribution of this file, with or without modification, # Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright # are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved. # notice and this notice are preserved.
@ -31,15 +31,15 @@
# DATA_PLT - .plt should be in data segment, not text segment. # DATA_PLT - .plt should be in data segment, not text segment.
# BSS_PLT - .plt should be in bss segment # BSS_PLT - .plt should be in bss segment
# TEXT_DYNAMIC - .dynamic in text segment, not 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 # SHLIB_TEXT_START_ADDR - if set, add to SIZEOF_HEADERS to set
# start address of shared library. # start address of shared library.
# INPUT_FILES - INPUT command of files to always include # INPUT_FILES - INPUT command of files to always include
# WRITABLE_RODATA - if set, the .rodata section should be writable # WRITABLE_RODATA - if set, the .rodata section should be writable
# INIT_START, INIT_END - statements just before and just after # 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 # 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. # STACK_ADDR - start of a .stack section.
# OTHER_SYMBOLS - symbols to place right at the end of the script. # OTHER_SYMBOLS - symbols to place right at the end of the script.
# #
@ -95,7 +95,7 @@ if test -z "${NO_SMALL_DATA}"; then
SDATA="/* We want the small data sections together, so single-instruction offsets SDATA="/* We want the small data sections together, so single-instruction offsets
can access them all, and initialized data all before uninitialized, so can access them all, and initialized data all before uninitialized, so
we can shorten the on-disk segment size. */ we can shorten the on-disk segment size. */
.sdata ${RELOCATING-0} : .sdata ${RELOCATING-0} :
{ {
${RELOCATING+${SDATA_START_SYMBOLS}} ${RELOCATING+${SDATA_START_SYMBOLS}}
*(.sdata${RELOCATING+ .sdata.* .gnu.linkonce.s.*}) *(.sdata${RELOCATING+ .sdata.* .gnu.linkonce.s.*})
@ -226,13 +226,13 @@ cat <<EOF
.rel.dyn ${RELOCATING-0} : .rel.dyn ${RELOCATING-0} :
{ {
EOF EOF
sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rela\./d;s/^.*: { *\(.*\)}$/ \1/' $COMBRELOC sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rela\./d;s/^.*: { *\(.*\)}$/ \1/' $COMBRELOC
cat <<EOF cat <<EOF
} }
.rela.dyn ${RELOCATING-0} : .rela.dyn ${RELOCATING-0} :
{ {
EOF EOF
sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rel\./d;s/^.*: { *\(.*\)}/ \1/' $COMBRELOC sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rel\./d;s/^.*: { *\(.*\)}/ \1/' $COMBRELOC
cat <<EOF cat <<EOF
} }
EOF EOF

View File

@ -26,15 +26,15 @@
# DATA_PLT - .plt should be in data segment, not text segment. # DATA_PLT - .plt should be in data segment, not text segment.
# BSS_PLT - .plt should be in bss segment # BSS_PLT - .plt should be in bss segment
# TEXT_DYNAMIC - .dynamic in text segment, not 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 # SHLIB_TEXT_START_ADDR - if set, add to SIZEOF_HEADERS to set
# start address of shared library. # start address of shared library.
# INPUT_FILES - INPUT command of files to always include # INPUT_FILES - INPUT command of files to always include
# WRITABLE_RODATA - if set, the .rodata section should be writable # WRITABLE_RODATA - if set, the .rodata section should be writable
# INIT_START, INIT_END - statements just before and just after # 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 # 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. # STACK_ADDR - start of a .stack section.
# OTHER_END_SYMBOLS - symbols to place right at the end of the script. # OTHER_END_SYMBOLS - symbols to place right at the end of the script.
# #
@ -103,7 +103,7 @@ if test -z "${NO_SMALL_DATA}"; then
SDATA="/* We want the small data sections together, so single-instruction offsets SDATA="/* We want the small data sections together, so single-instruction offsets
can access them all, and initialized data all before uninitialized, so can access them all, and initialized data all before uninitialized, so
we can shorten the on-disk segment size. */ we can shorten the on-disk segment size. */
.sdata ${RELOCATING-0} : .sdata ${RELOCATING-0} :
{ {
${RELOCATING+${SDATA_START_SYMBOLS}} ${RELOCATING+${SDATA_START_SYMBOLS}}
*(.sdata${RELOCATING+ .sdata.* .gnu.linkonce.s.*}) *(.sdata${RELOCATING+ .sdata.* .gnu.linkonce.s.*})
@ -118,7 +118,7 @@ if test -z "${NO_SMALL_DATA}"; then
REL_SBSS2=".rel.sbss2 ${RELOCATING-0} : { *(.rel.sbss2${RELOCATING+ .rel.sbss2.* .rel.gnu.linkonce.sb2.*}) } 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.*}) }" .rela.sbss2 ${RELOCATING-0} : { *(.rela.sbss2${RELOCATING+ .rela.sbss2.* .rela.gnu.linkonce.sb2.*}) }"
fi fi
CTOR=".ctors ${CONSTRUCTING-0} : CTOR=".ctors ${CONSTRUCTING-0} :
{ {
${CONSTRUCTING+${CTOR_START}} ${CONSTRUCTING+${CTOR_START}}
/* gcc uses crtbegin.o to find the start of /* gcc uses crtbegin.o to find the start of
@ -238,13 +238,13 @@ cat <<EOF
.rel.dyn ${RELOCATING-0} : .rel.dyn ${RELOCATING-0} :
{ {
EOF EOF
sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rela\./d;s/^.*: { *\(.*\)}$/ \1/' $COMBRELOC sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rela\./d;s/^.*: { *\(.*\)}$/ \1/' $COMBRELOC
cat <<EOF cat <<EOF
} }
.rela.dyn ${RELOCATING-0} : .rela.dyn ${RELOCATING-0} :
{ {
EOF EOF
sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rel\./d;s/^.*: { *\(.*\)}/ \1/' $COMBRELOC sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rel\./d;s/^.*: { *\(.*\)}/ \1/' $COMBRELOC
cat <<EOF cat <<EOF
} }
EOF EOF
@ -254,8 +254,8 @@ cat <<EOF
.rela.plt ${RELOCATING-0} : { *(.rela.plt) } .rela.plt ${RELOCATING-0} : { *(.rela.plt) }
${OTHER_PLT_RELOC_SECTIONS} ${OTHER_PLT_RELOC_SECTIONS}
.init ${RELOCATING-0} : .init ${RELOCATING-0} :
{ {
${RELOCATING+${INIT_START}} ${RELOCATING+${INIT_START}}
KEEP (*(.init)) KEEP (*(.init))
${RELOCATING+${INIT_END}} ${RELOCATING+${INIT_END}}
@ -382,17 +382,17 @@ cat <<EOF
the setting from ldflags prevails. */ the setting from ldflags prevails. */
.heap ${RELOCATING-0} : .heap ${RELOCATING-0} :
{ {
${RELOCATING+ __start_heap = . ; } ${RELOCATING+ __start_heap = . ; }
${RELOCATING+ . = . + (DEFINED(__HEAP_SIZE) ? __HEAP_SIZE : (DEFINED(__DEFAULT_HEAP_SIZE) ? __DEFAULT_HEAP_SIZE : 20k)) ; } ${RELOCATING+ . = . + (DEFINED(__HEAP_SIZE) ? __HEAP_SIZE : (DEFINED(__DEFAULT_HEAP_SIZE) ? __DEFAULT_HEAP_SIZE : 20k)) ; }
${RELOCATING+ __end_heap = . ; } ${RELOCATING+ __end_heap = . ; }
} }
${RELOCATING+. = ALIGN(0x8);} ${RELOCATING+. = ALIGN(0x8);}
.stack ${RELOCATING-0} : .stack ${RELOCATING-0} :
{ {
${RELOCATING+ __stack = . ; } ${RELOCATING+ __stack = . ; }
${RELOCATING+ . = . + (DEFINED(__STACK_SIZE) ? __STACK_SIZE : (DEFINED(__DEFAULT_STACK_SIZE) ? __DEFAULT_STACK_SIZE : 64k)) ; } ${RELOCATING+ . = . + (DEFINED(__STACK_SIZE) ? __STACK_SIZE : (DEFINED(__DEFAULT_STACK_SIZE) ? __DEFAULT_STACK_SIZE : 64k)) ; }
${RELOCATING+ __stack_top = . ; } ${RELOCATING+ __stack_top = . ; }
} }
/* Stabs debugging sections. */ /* Stabs debugging sections. */

View File

@ -19,7 +19,7 @@ test -z "${ELFSIZE}" && ELFSIZE=32
test -z "${ALIGNMENT}" && ALIGNMENT="${ELFSIZE} / 8" test -z "${ALIGNMENT}" && ALIGNMENT="${ELFSIZE} / 8"
test "$LD_FLAG" = "N" && DATA_ADDR=. test "$LD_FLAG" = "N" && DATA_ADDR=.
CTOR=".ctors ${CONSTRUCTING-0} : CTOR=".ctors ${CONSTRUCTING-0} :
{ {
${CONSTRUCTING+${CTOR_START}} ${CONSTRUCTING+${CTOR_START}}
/* gcc uses crtbegin.o to find the start of /* gcc uses crtbegin.o to find the start of

View File

@ -1,5 +1,5 @@
# Copyright (C) 2014-2017 Free Software Foundation, Inc. # Copyright (C) 2014-2017 Free Software Foundation, Inc.
# #
# Copying and distribution of this file, with or without modification, # Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright # are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved. # notice and this notice are preserved.
@ -9,11 +9,11 @@ test -z "${BIG_OUTPUT_FORMAT}" && BIG_OUTPUT_FORMAT=${OUTPUT_FORMAT}
test -z "${LITTLE_OUTPUT_FORMAT}" && LITTLE_OUTPUT_FORMAT=${OUTPUT_FORMAT} test -z "${LITTLE_OUTPUT_FORMAT}" && LITTLE_OUTPUT_FORMAT=${OUTPUT_FORMAT}
if [ -z "$MACHINE" ]; then OUTPUT_ARCH=${ARCH}; else OUTPUT_ARCH=${ARCH}:${MACHINE}; fi if [ -z "$MACHINE" ]; then OUTPUT_ARCH=${ARCH}; else OUTPUT_ARCH=${ARCH}:${MACHINE}; fi
test "$LD_FLAG" = "N" && DATA_ADDR=. test "$LD_FLAG" = "N" && DATA_ADDR=.
INTERP=".interp ${RELOCATING-0} : { *(.interp) }" INTERP=".interp ${RELOCATING-0} : { *(.interp) }"
PLT=".plt ${RELOCATING-0} : { *(.plt) }" PLT=".plt ${RELOCATING-0} : { *(.plt) }"
CTOR=".ctors ${CONSTRUCTING-0} : CTOR=".ctors ${CONSTRUCTING-0} :
{ {
${CONSTRUCTING+${CTOR_START}} ${CONSTRUCTING+${CTOR_START}}
/* gcc uses crtbegin.o to find the start of /* gcc uses crtbegin.o to find the start of
@ -83,14 +83,14 @@ MEMORY
There are other memory regions available on There are other memory regions available on
the TS3 (eg ROM, FLASH, etc) but these are not the TS3 (eg ROM, FLASH, etc) but these are not
used by this script. */ used by this script. */
INSN : org = 0x01000000, len = 256K INSN : org = 0x01000000, len = 256K
DATA : org = 0x02000000, len = 48K DATA : org = 0x02000000, len = 48K
/* This is a fake memory region at the top of the /* This is a fake memory region at the top of the
on-chip RAM, used as the start of the on-chip RAM, used as the start of the
(descending) stack. */ (descending) stack. */
STACK : org = 0x0200BFFC, len = 4 STACK : org = 0x0200BFFC, len = 4
} }

View File

@ -1,10 +1,10 @@
# Copyright (C) 2014-2017 Free Software Foundation, Inc. # Copyright (C) 2014-2017 Free Software Foundation, Inc.
# #
# Copying and distribution of this file, with or without modification, # Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright # are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved. # notice and this notice are preserved.
CTOR=".ctors ${CONSTRUCTING-0} : CTOR=".ctors ${CONSTRUCTING-0} :
{ {
${CONSTRUCTING+ __CTOR_LIST__ = .; } ${CONSTRUCTING+ __CTOR_LIST__ = .; }
/* gcc uses crtbegin.o to find the start of /* gcc uses crtbegin.o to find the start of
@ -206,7 +206,7 @@ EOF
. $srcdir/scripttempl/DWARF.sc . $srcdir/scripttempl/DWARF.sc
cat <<EOF cat <<EOF
PROVIDE (__stack = ${STACK_START_ADDR}); PROVIDE (__stack = ${STACK_START_ADDR});
} }
EOF EOF

View File

@ -1,5 +1,5 @@
# Copyright (C) 2014-2017 Free Software Foundation, Inc. # Copyright (C) 2014-2017 Free Software Foundation, Inc.
# #
# Copying and distribution of this file, with or without modification, # Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright # are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved. # notice and this notice are preserved.
@ -199,7 +199,7 @@ EOF
. $srcdir/scripttempl/DWARF.sc . $srcdir/scripttempl/DWARF.sc
cat <<EOF cat <<EOF
${ATTRS_SECTIONS} ${ATTRS_SECTIONS}
${OTHER_SECTIONS} ${OTHER_SECTIONS}
} }

View File

@ -1,5 +1,5 @@
# Copyright (C) 2014-2017 Free Software Foundation, Inc. # Copyright (C) 2014-2017 Free Software Foundation, Inc.
# #
# Copying and distribution of this file, with or without modification, # Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright # are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved. # notice and this notice are preserved.
@ -18,7 +18,7 @@
# .data section. # .data section.
# OTHER_BSS_SYMBOLS - symbols that appear at the start of the # OTHER_BSS_SYMBOLS - symbols that appear at the start of the
# .bss section besides __bss_start. # .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 adding sections, do note that the names of some sections are used
# when specifying the start address of the next. # when specifying the start address of the next.
@ -29,7 +29,7 @@ test -z "${LITTLE_OUTPUT_FORMAT}" && LITTLE_OUTPUT_FORMAT=${OUTPUT_FORMAT}
if [ -z "$MACHINE" ]; then OUTPUT_ARCH=${ARCH}; else OUTPUT_ARCH=${ARCH}:${MACHINE}; fi if [ -z "$MACHINE" ]; then OUTPUT_ARCH=${ARCH}; else OUTPUT_ARCH=${ARCH}:${MACHINE}; fi
test "$LD_FLAG" = "N" && DATA_ADDR=. test "$LD_FLAG" = "N" && DATA_ADDR=.
CTOR=".ctors ${CONSTRUCTING-0} : CTOR=".ctors ${CONSTRUCTING-0} :
{ {
${CONSTRUCTING+ PROVIDE (__CTOR_LIST__ = .); } ${CONSTRUCTING+ PROVIDE (__CTOR_LIST__ = .); }
${CONSTRUCTING+${CTOR_START}} ${CONSTRUCTING+${CTOR_START}}
@ -57,7 +57,7 @@ VECTORS="
Bootstrap 0x00c0 Bootstrap 0x00c0
Test 0xbfc0 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. with the '-defsym vectors_addr=0xbfc0' ld option.
Note: for the bootstrap mode, the interrupt vectors are at 0xbfc0 but Note: for the bootstrap mode, the interrupt vectors are at 0xbfc0 but
@ -239,7 +239,7 @@ SECTIONS
${RELOCATING+*(.rela.gnu.linkonce.s.*)} ${RELOCATING+*(.rela.gnu.linkonce.s.*)}
} }
.rel.sbss ${RELOCATING-0} : .rel.sbss ${RELOCATING-0} :
{ {
*(.rel.sbss) *(.rel.sbss)
${RELOCATING+*(.rel.sbss.*)} ${RELOCATING+*(.rel.sbss.*)}
${RELOCATING+*(.rel.gnu.linkonce.sb.*)} ${RELOCATING+*(.rel.gnu.linkonce.sb.*)}
@ -250,14 +250,14 @@ SECTIONS
${RELOCATING+*(.rela.sbss.*)} ${RELOCATING+*(.rela.sbss.*)}
${RELOCATING+*(.rel.gnu.linkonce.sb.*)} ${RELOCATING+*(.rel.gnu.linkonce.sb.*)}
} }
.rel.bss ${RELOCATING-0} : .rel.bss ${RELOCATING-0} :
{ {
*(.rel.bss) *(.rel.bss)
${RELOCATING+*(.rel.bss.*)} ${RELOCATING+*(.rel.bss.*)}
${RELOCATING+*(.rel.gnu.linkonce.b.*)} ${RELOCATING+*(.rel.gnu.linkonce.b.*)}
} }
.rela.bss ${RELOCATING-0} : .rela.bss ${RELOCATING-0} :
{ {
*(.rela.bss) *(.rela.bss)
${RELOCATING+*(.rela.bss.*)} ${RELOCATING+*(.rela.bss.*)}
${RELOCATING+*(.rela.gnu.linkonce.b.*)} ${RELOCATING+*(.rela.gnu.linkonce.b.*)}
@ -300,14 +300,14 @@ SECTIONS
} ${RELOCATING+ > page0} } ${RELOCATING+ > page0}
/* Start of text section. */ /* Start of text section. */
.stext ${RELOCATING-0} : .stext ${RELOCATING-0} :
{ {
*(.stext) *(.stext)
} ${RELOCATING+ > ${TEXT_MEMORY}} } ${RELOCATING+ > ${TEXT_MEMORY}}
.init ${RELOCATING-0} : .init ${RELOCATING-0} :
{ {
*(.init) *(.init)
} ${RELOCATING+=${NOP-0}} } ${RELOCATING+=${NOP-0}}
${RELOCATING-${INSTALL_RELOC}} ${RELOCATING-${INSTALL_RELOC}}

View File

@ -1,5 +1,5 @@
# Copyright (C) 2014-2017 Free Software Foundation, Inc. # Copyright (C) 2014-2017 Free Software Foundation, Inc.
# #
# Copying and distribution of this file, with or without modification, # Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright # are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved. # notice and this notice are preserved.
@ -18,7 +18,7 @@
# .data section. # .data section.
# OTHER_BSS_SYMBOLS - symbols that appear at the start of the # OTHER_BSS_SYMBOLS - symbols that appear at the start of the
# .bss section besides __bss_start. # .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 adding sections, do note that the names of some sections are used
# when specifying the start address of the next. # when specifying the start address of the next.
@ -29,7 +29,7 @@ test -z "${LITTLE_OUTPUT_FORMAT}" && LITTLE_OUTPUT_FORMAT=${OUTPUT_FORMAT}
if [ -z "$MACHINE" ]; then OUTPUT_ARCH=${ARCH}; else OUTPUT_ARCH=${ARCH}:${MACHINE}; fi if [ -z "$MACHINE" ]; then OUTPUT_ARCH=${ARCH}; else OUTPUT_ARCH=${ARCH}:${MACHINE}; fi
test "$LD_FLAG" = "N" && DATA_ADDR=. test "$LD_FLAG" = "N" && DATA_ADDR=.
CTOR=".ctors ${CONSTRUCTING-0} : CTOR=".ctors ${CONSTRUCTING-0} :
{ {
${CONSTRUCTING+ PROVIDE (__CTOR_LIST__ = .); } ${CONSTRUCTING+ PROVIDE (__CTOR_LIST__ = .); }
${CONSTRUCTING+${CTOR_START}} ${CONSTRUCTING+${CTOR_START}}
@ -57,7 +57,7 @@ VECTORS="
Bootstrap 0x00c0 Bootstrap 0x00c0
Test 0xbfc0 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. with the '-defsym vectors_addr=0xbfc0' ld option.
Note: for the bootstrap mode, the interrupt vectors are at 0xbfc0 but Note: for the bootstrap mode, the interrupt vectors are at 0xbfc0 but
@ -239,7 +239,7 @@ SECTIONS
${RELOCATING+*(.rela.gnu.linkonce.s.*)} ${RELOCATING+*(.rela.gnu.linkonce.s.*)}
} }
.rel.sbss ${RELOCATING-0} : .rel.sbss ${RELOCATING-0} :
{ {
*(.rel.sbss) *(.rel.sbss)
${RELOCATING+*(.rel.sbss.*)} ${RELOCATING+*(.rel.sbss.*)}
${RELOCATING+*(.rel.gnu.linkonce.sb.*)} ${RELOCATING+*(.rel.gnu.linkonce.sb.*)}
@ -250,14 +250,14 @@ SECTIONS
${RELOCATING+*(.rela.sbss.*)} ${RELOCATING+*(.rela.sbss.*)}
${RELOCATING+*(.rel.gnu.linkonce.sb.*)} ${RELOCATING+*(.rel.gnu.linkonce.sb.*)}
} }
.rel.bss ${RELOCATING-0} : .rel.bss ${RELOCATING-0} :
{ {
*(.rel.bss) *(.rel.bss)
${RELOCATING+*(.rel.bss.*)} ${RELOCATING+*(.rel.bss.*)}
${RELOCATING+*(.rel.gnu.linkonce.b.*)} ${RELOCATING+*(.rel.gnu.linkonce.b.*)}
} }
.rela.bss ${RELOCATING-0} : .rela.bss ${RELOCATING-0} :
{ {
*(.rela.bss) *(.rela.bss)
${RELOCATING+*(.rela.bss.*)} ${RELOCATING+*(.rela.bss.*)}
${RELOCATING+*(.rela.gnu.linkonce.b.*)} ${RELOCATING+*(.rela.gnu.linkonce.b.*)}
@ -299,14 +299,14 @@ SECTIONS
} ${RELOCATING+ > page0} } ${RELOCATING+ > page0}
/* Start of text section. */ /* Start of text section. */
.stext ${RELOCATING-0} : .stext ${RELOCATING-0} :
{ {
*(.stext) *(.stext)
} ${RELOCATING+ > ${TEXT_MEMORY}} } ${RELOCATING+ > ${TEXT_MEMORY}}
.init ${RELOCATING-0} : .init ${RELOCATING-0} :
{ {
*(.init) *(.init)
} ${RELOCATING+=${NOP-0}} } ${RELOCATING+=${NOP-0}}
${RELOCATING-${INSTALL_RELOC}} ${RELOCATING-${INSTALL_RELOC}}

View File

@ -1,7 +1,7 @@
# Adapted from mips.sc # Adapted from mips.sc
# #
# Copyright (C) 2014-2017 Free Software Foundation, Inc. # Copyright (C) 2014-2017 Free Software Foundation, Inc.
# #
# Copying and distribution of this file, with or without modification, # Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright # are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved. # notice and this notice are preserved.
@ -13,7 +13,7 @@ test -z "$ENTRY" && ENTRY=_start
#test -z "$TEXT_START_ADDR" && TEXT_START_ADDR="0x0" #test -z "$TEXT_START_ADDR" && TEXT_START_ADDR="0x0"
CTOR=".ctors ${CONSTRUCTING-0} : CTOR=".ctors ${CONSTRUCTING-0} :
{ {
${CONSTRUCTING+${CTOR_START}} ${CONSTRUCTING+${CTOR_START}}
/* gcc uses crtbegin.o to find the start of /* gcc uses crtbegin.o to find the start of
@ -63,7 +63,7 @@ ${RELOCATING+${LIB_SEARCH_DIRS}}
${RELOCATING+ENTRY (${ENTRY})} ${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; _HEAP_SIZE = DEFINED(_HEAP_SIZE) ? _HEAP_SIZE : 0x0;
_STACK_SIZE = DEFINED(_STACK_SIZE) ? _STACK_SIZE : 0x400; _STACK_SIZE = DEFINED(_STACK_SIZE) ? _STACK_SIZE : 0x400;
@ -121,7 +121,7 @@ SECTIONS
} }
${RELOCATING+. = ALIGN(4);} ${RELOCATING+. = ALIGN(4);}
.sbss2 : { .sbss2 : {
${RELOCATING+PROVIDE (__sbss2_start = .);} ${RELOCATING+PROVIDE (__sbss2_start = .);}
${RELOCATING+*(.sbss2)} ${RELOCATING+*(.sbss2)}
${RELOCATING+*(.sbss2.*)} ${RELOCATING+*(.sbss2.*)}
${RELOCATING+*(.gnu.linkonce.sb2.*)} ${RELOCATING+*(.gnu.linkonce.sb2.*)}
@ -140,30 +140,30 @@ SECTIONS
${CONSTRUCTING+CONSTRUCTORS}; /* Is this needed? */ ${CONSTRUCTING+CONSTRUCTORS}; /* Is this needed? */
} }
${RELOCATING+ _edata = . ;} ${RELOCATING+ _edata = . ;}
/* Added to handle pic code */ /* Added to handle pic code */
.got : { .got : {
${RELOCATING+*(.got)} ${RELOCATING+*(.got)}
} }
.got1 : { .got1 : {
${RELOCATING+*(.got1)} ${RELOCATING+*(.got1)}
} }
.got2 : { .got2 : {
${RELOCATING+*(.got2)} ${RELOCATING+*(.got2)}
} }
/* Added by Sathya to handle C++ exceptions */ /* Added by Sathya to handle C++ exceptions */
.eh_frame : { .eh_frame : {
${RELOCATING+*(.eh_frame)} ${RELOCATING+*(.eh_frame)}
} }
.jcr : { .jcr : {
${RELOCATING+*(.jcr)} ${RELOCATING+*(.jcr)}
} }
.gcc_except_table : { .gcc_except_table : {
${RELOCATING+*(.gcc_except_table)} ${RELOCATING+*(.gcc_except_table)}
} }
@ -178,7 +178,7 @@ SECTIONS
} }
${RELOCATING+. = ALIGN(4);} ${RELOCATING+. = ALIGN(4);}
.sbss : { .sbss : {
${RELOCATING+PROVIDE (__sbss_start = .);} ${RELOCATING+PROVIDE (__sbss_start = .);}
${RELOCATING+*(.sbss)} ${RELOCATING+*(.sbss)}
${RELOCATING+*(.sbss.*)} ${RELOCATING+*(.sbss.*)}
${RELOCATING+*(.gnu.linkonce.sb.*)} ${RELOCATING+*(.gnu.linkonce.sb.*)}
@ -192,13 +192,13 @@ SECTIONS
${RELOCATING+ . = ALIGN(4);} ${RELOCATING+ . = ALIGN(4);}
${RELOCATING+ _fbss = .;} ${RELOCATING+ _fbss = .;}
.bss : { .bss : {
${RELOCATING+PROVIDE (__bss_start = .);} ${RELOCATING+PROVIDE (__bss_start = .);}
${RELOCATING+*(.bss)} ${RELOCATING+*(.bss)}
${RELOCATING+*(.bss.*)} ${RELOCATING+*(.bss.*)}
${RELOCATING+*(.gnu.linkonce.b.*)} ${RELOCATING+*(.gnu.linkonce.b.*)}
${RELOCATING+*(COMMON)} ${RELOCATING+*(COMMON)}
${RELOCATING+. = ALIGN(. != 0 ? 4 : 1);} ${RELOCATING+. = ALIGN(. != 0 ? 4 : 1);}
${RELOCATING+PROVIDE (__bss_end = .);} ${RELOCATING+PROVIDE (__bss_end = .);}
} }
@ -210,7 +210,7 @@ SECTIONS
${RELOCATING+ _heap_start = .;} ${RELOCATING+ _heap_start = .;}
${RELOCATING+ . += _HEAP_SIZE;} ${RELOCATING+ . += _HEAP_SIZE;}
${RELOCATING+ _heap_end = .;} ${RELOCATING+ _heap_end = .;}
} }
${RELOCATING+ . = ALIGN(4);} ${RELOCATING+ . = ALIGN(4);}
@ -222,12 +222,12 @@ SECTIONS
${RELOCATING+ _end = .;} ${RELOCATING+ _end = .;}
} }
.tdata : { .tdata : {
${RELOCATING+*(.tdata)} ${RELOCATING+*(.tdata)}
${RELOCATING+*(.tdata.*)} ${RELOCATING+*(.tdata.*)}
${RELOCATING+*(.gnu.linkonce.td.*)} ${RELOCATING+*(.gnu.linkonce.td.*)}
} }
.tbss : { .tbss : {
${RELOCATING+*(.tbss)} ${RELOCATING+*(.tbss)}
${RELOCATING+*(.tbss.*)} ${RELOCATING+*(.tbss.*)}
${RELOCATING+*(.gnu.linkonce.tb.*)} ${RELOCATING+*(.gnu.linkonce.tb.*)}

View File

@ -1,5 +1,5 @@
# Copyright (C) 2014-2017 Free Software Foundation, Inc. # Copyright (C) 2014-2017 Free Software Foundation, Inc.
# #
# Copying and distribution of this file, with or without modification, # Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright # are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved. # notice and this notice are preserved.
@ -18,7 +18,7 @@
# .data section. # .data section.
# OTHER_BSS_SYMBOLS - symbols that appear at the start of the # OTHER_BSS_SYMBOLS - symbols that appear at the start of the
# .bss section besides __bss_start. # .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 adding sections, do note that the names of some sections are used
# when specifying the start address of the next. # when specifying the start address of the next.
@ -29,7 +29,7 @@ test -z "${LITTLE_OUTPUT_FORMAT}" && LITTLE_OUTPUT_FORMAT=${OUTPUT_FORMAT}
if [ -z "$MACHINE" ]; then OUTPUT_ARCH=${ARCH}; else OUTPUT_ARCH=${ARCH}:${MACHINE}; fi if [ -z "$MACHINE" ]; then OUTPUT_ARCH=${ARCH}; else OUTPUT_ARCH=${ARCH}:${MACHINE}; fi
test "$LD_FLAG" = "N" && DATA_ADDR=. test "$LD_FLAG" = "N" && DATA_ADDR=.
CTOR=".ctors ${CONSTRUCTING-0} : CTOR=".ctors ${CONSTRUCTING-0} :
{ {
${CONSTRUCTING+ PROVIDE (__CTOR_LIST__ = .); } ${CONSTRUCTING+ PROVIDE (__CTOR_LIST__ = .); }
${CONSTRUCTING+${CTOR_START}} ${CONSTRUCTING+${CTOR_START}}
@ -57,7 +57,7 @@ VECTORS="
Bootstrap 0x00c0 Bootstrap 0x00c0
Test 0xbfc0 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. with the '-defsym vectors_addr=0xbfc0' ld option.
Note: for the bootstrap mode, the interrupt vectors are at 0xbfc0 but Note: for the bootstrap mode, the interrupt vectors are at 0xbfc0 but
@ -239,7 +239,7 @@ SECTIONS
${RELOCATING+*(.rela.gnu.linkonce.s.*)} ${RELOCATING+*(.rela.gnu.linkonce.s.*)}
} }
.rel.sbss ${RELOCATING-0} : .rel.sbss ${RELOCATING-0} :
{ {
*(.rel.sbss) *(.rel.sbss)
${RELOCATING+*(.rel.sbss.*)} ${RELOCATING+*(.rel.sbss.*)}
${RELOCATING+*(.rel.gnu.linkonce.sb.*)} ${RELOCATING+*(.rel.gnu.linkonce.sb.*)}
@ -250,14 +250,14 @@ SECTIONS
${RELOCATING+*(.rela.sbss.*)} ${RELOCATING+*(.rela.sbss.*)}
${RELOCATING+*(.rel.gnu.linkonce.sb.*)} ${RELOCATING+*(.rel.gnu.linkonce.sb.*)}
} }
.rel.bss ${RELOCATING-0} : .rel.bss ${RELOCATING-0} :
{ {
*(.rel.bss) *(.rel.bss)
${RELOCATING+*(.rel.bss.*)} ${RELOCATING+*(.rel.bss.*)}
${RELOCATING+*(.rel.gnu.linkonce.b.*)} ${RELOCATING+*(.rel.gnu.linkonce.b.*)}
} }
.rela.bss ${RELOCATING-0} : .rela.bss ${RELOCATING-0} :
{ {
*(.rela.bss) *(.rela.bss)
${RELOCATING+*(.rela.bss.*)} ${RELOCATING+*(.rela.bss.*)}
${RELOCATING+*(.rela.gnu.linkonce.b.*)} ${RELOCATING+*(.rela.gnu.linkonce.b.*)}
@ -299,14 +299,14 @@ SECTIONS
} ${RELOCATING+ > page0} } ${RELOCATING+ > page0}
/* Start of text section. */ /* Start of text section. */
.stext ${RELOCATING-0} : .stext ${RELOCATING-0} :
{ {
*(.stext) *(.stext)
} ${RELOCATING+ > ${TEXT_MEMORY}} } ${RELOCATING+ > ${TEXT_MEMORY}}
.init ${RELOCATING-0} : .init ${RELOCATING-0} :
{ {
*(.init) *(.init)
} ${RELOCATING+=${NOP-0}} } ${RELOCATING+=${NOP-0}}
${RELOCATING-${INSTALL_RELOC}} ${RELOCATING-${INSTALL_RELOC}}

View File

@ -1,5 +1,5 @@
# Copyright (C) 2014-2017 Free Software Foundation, Inc. # Copyright (C) 2014-2017 Free Software Foundation, Inc.
# #
# Copying and distribution of this file, with or without modification, # Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright # are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved. # notice and this notice are preserved.
@ -45,15 +45,15 @@
# NO_RELA_RELOCS - Don't include .rela.* sections in script # NO_RELA_RELOCS - Don't include .rela.* sections in script
# NON_ALLOC_DYN - Place dynamic sections after data segment. # NON_ALLOC_DYN - Place dynamic sections after data segment.
# TEXT_DYNAMIC - .dynamic in text segment, not 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 # SHLIB_TEXT_START_ADDR - if set, add to SIZEOF_HEADERS to set
# start address of shared library. # start address of shared library.
# INPUT_FILES - INPUT command of files to always include # INPUT_FILES - INPUT command of files to always include
# WRITABLE_RODATA - if set, the .rodata section should be writable # WRITABLE_RODATA - if set, the .rodata section should be writable
# INIT_START, INIT_END - statements just before and just after # 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 # 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. # STACK_ADDR - start of a .stack section.
# OTHER_SYMBOLS - symbols to place right at the end of the script. # 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, # ETEXT_NAME - name of a symbol for the end of the text section,
@ -98,7 +98,7 @@
# #
# plus Xtensa-specific literal sections: # plus Xtensa-specific literal sections:
# .literal .gnu.linkonce.literal.foo # .literal .gnu.linkonce.literal.foo
# .lit4 .gnu.linkonce.lit4.foo # .lit4 .gnu.linkonce.lit4.foo
# #
# plus Xtensa-specific "property table" sections: # plus Xtensa-specific "property table" sections:
# .xt.lit .gnu.linkonce.p.foo # .xt.lit .gnu.linkonce.p.foo
@ -164,7 +164,7 @@ if test -z "${NO_SMALL_DATA}"; then
SDATA="/* We want the small data sections together, so single-instruction offsets SDATA="/* We want the small data sections together, so single-instruction offsets
can access them all, and initialized data all before uninitialized, so can access them all, and initialized data all before uninitialized, so
we can shorten the on-disk segment size. */ we can shorten the on-disk segment size. */
.sdata ${RELOCATING-0} : .sdata ${RELOCATING-0} :
{ {
${RELOCATING+${SDATA_START_SYMBOLS}} ${RELOCATING+${SDATA_START_SYMBOLS}}
${CREATE_SHLIB+*(.sdata2 .sdata2.* .gnu.linkonce.s2.*)} ${CREATE_SHLIB+*(.sdata2 .sdata2.* .gnu.linkonce.s2.*)}
@ -236,7 +236,7 @@ FINI_ARRAY=".fini_array ${RELOCATING-0} :
KEEP (*(.fini_array)) KEEP (*(.fini_array))
${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (${USER_LABEL_PREFIX}__fini_array_end = .);}} ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (${USER_LABEL_PREFIX}__fini_array_end = .);}}
}" }"
CTOR=".ctors ${CONSTRUCTING-0} : CTOR=".ctors ${CONSTRUCTING-0} :
{ {
${CONSTRUCTING+${CTOR_START}} ${CONSTRUCTING+${CTOR_START}}
/* gcc uses crtbegin.o to find the start of /* gcc uses crtbegin.o to find the start of
@ -370,13 +370,13 @@ cat >> ldscripts/dyntmp.$$ <<EOF
.rel.dyn ${RELOCATING-0} : .rel.dyn ${RELOCATING-0} :
{ {
EOF 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 cat >> ldscripts/dyntmp.$$ <<EOF
} }
.rela.dyn ${RELOCATING-0} : .rela.dyn ${RELOCATING-0} :
{ {
EOF 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 cat >> ldscripts/dyntmp.$$ <<EOF
} }
EOF EOF
@ -393,10 +393,10 @@ if test -z "${NON_ALLOC_DYN}"; then
cat ldscripts/dyntmp.$$ cat ldscripts/dyntmp.$$
else else
if test -z "${NO_REL_RELOCS}"; then 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 fi
if test -z "${NO_RELA_RELOCS}"; then 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
fi fi
rm -f ldscripts/dyntmp.$$ rm -f ldscripts/dyntmp.$$
@ -534,10 +534,10 @@ if test -n "${NON_ALLOC_DYN}"; then
cat ldscripts/dyntmp.$$ cat ldscripts/dyntmp.$$
else else
if test -z "${NO_REL_RELOCS}"; then 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 fi
if test -z "${NO_RELA_RELOCS}"; then 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
fi fi
rm -f ldscripts/dyntmp.$$ rm -f ldscripts/dyntmp.$$

View File

@ -1,5 +1,5 @@
# Copyright (C) 2014-2017 Free Software Foundation, Inc. # Copyright (C) 2014-2017 Free Software Foundation, Inc.
# #
# Copying and distribution of this file, with or without modification, # Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright # are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved. # notice and this notice are preserved.
@ -45,15 +45,15 @@
# NO_RELA_RELOCS - Don't include .rela.* sections in script # NO_RELA_RELOCS - Don't include .rela.* sections in script
# NON_ALLOC_DYN - Place dynamic sections after data segment. # NON_ALLOC_DYN - Place dynamic sections after data segment.
# TEXT_DYNAMIC - .dynamic in text segment, not 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 # SHLIB_TEXT_START_ADDR - if set, add to SIZEOF_HEADERS to set
# start address of shared library. # start address of shared library.
# INPUT_FILES - INPUT command of files to always include # INPUT_FILES - INPUT command of files to always include
# WRITABLE_RODATA - if set, the .rodata section should be writable # WRITABLE_RODATA - if set, the .rodata section should be writable
# INIT_START, INIT_END - statements just before and just after # 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 # 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. # 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, # ETEXT_NAME - name of a symbol for the end of the text section,
# normally etext. # normally etext.
@ -147,7 +147,7 @@ if test -z "${NO_SMALL_DATA}"; then
SDATA="/* We want the small data sections together, so single-instruction offsets SDATA="/* We want the small data sections together, so single-instruction offsets
can access them all, and initialized data all before uninitialized, so can access them all, and initialized data all before uninitialized, so
we can shorten the on-disk segment size. */ we can shorten the on-disk segment size. */
.sdata ${RELOCATING-0} : .sdata ${RELOCATING-0} :
{ {
${RELOCATING+${SDATA_START_SYMBOLS}} ${RELOCATING+${SDATA_START_SYMBOLS}}
${CREATE_SHLIB+*(.sdata2 .sdata2.* .gnu.linkonce.s2.*)} ${CREATE_SHLIB+*(.sdata2 .sdata2.* .gnu.linkonce.s2.*)}
@ -205,7 +205,7 @@ test "${LARGE_SECTIONS}" = "yes" && LARGE_SECTIONS="
*(.ldata${RELOCATING+ .ldata.* .gnu.linkonce.l.*}) *(.ldata${RELOCATING+ .ldata.* .gnu.linkonce.l.*})
${RELOCATING+. = ALIGN(. != 0 ? ${ALIGNMENT} : 1);} ${RELOCATING+. = ALIGN(. != 0 ? ${ALIGNMENT} : 1);}
}" }"
CTOR=".ctors ADDR(.text) + SIZEOF(.text) ${CONSTRUCTING-0} : CTOR=".ctors ADDR(.text) + SIZEOF(.text) ${CONSTRUCTING-0} :
{ {
${CONSTRUCTING+${CTOR_START}} ${CONSTRUCTING+${CTOR_START}}
/* gcc uses crtbegin.o to find the start of /* gcc uses crtbegin.o to find the start of
@ -230,7 +230,7 @@ CTOR=".ctors ADDR(.text) + SIZEOF(.text) ${CONSTRUCTING-0} :
KEEP (*(SORT(.ctors.*))) KEEP (*(SORT(.ctors.*)))
KEEP (*(.ctors)) KEEP (*(.ctors))
${CONSTRUCTING+${CTOR_END}} ${CONSTRUCTING+${CTOR_END}}
} /*> INTERNAL_RAM*/" } /*> INTERNAL_RAM*/"
DTOR=".dtors ADDR(.ctors) + SIZEOF(.ctors) ${CONSTRUCTING-0} : DTOR=".dtors ADDR(.ctors) + SIZEOF(.ctors) ${CONSTRUCTING-0} :
{ {
${CONSTRUCTING+${DTOR_START}} ${CONSTRUCTING+${DTOR_START}}
@ -291,26 +291,26 @@ __CORE_NUM_ = (__CORE_ROW_ - __FIRST_CORE_ROW_ )* __MAX_NUM_CORES_IN_COLS__ +
MEMORY 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_DRAM_1 (WXAI) : ORIGIN = 0x81000000, LENGTH = 0x1000000 /*.heap */
EXTERNAL_SRAM (WXAI) : ORIGIN = 0x92000000, LENGTH = 8K /* small external RAM, used for testing*/ EXTERNAL_SRAM (WXAI) : ORIGIN = 0x92000000, LENGTH = 8K /* small external RAM, used for testing*/
/* run time lib and crt0*/ /* run time lib and crt0*/
RESERVED_CRT0_RAM (WXAI) : ORIGIN = 0, LENGTH = 0x400 RESERVED_CRT0_RAM (WXAI) : ORIGIN = 0, LENGTH = 0x400
/* user program, per bank usage */ /* user program, per bank usage */
BANK0_SRAM (WXAI) : ORIGIN = LENGTH(RESERVED_CRT0_RAM), LENGTH = 8K - LENGTH(RESERVED_CRT0_RAM) BANK0_SRAM (WXAI) : ORIGIN = LENGTH(RESERVED_CRT0_RAM), LENGTH = 8K - LENGTH(RESERVED_CRT0_RAM)
BANK1_SRAM (WXAI) : ORIGIN = 0x2000, LENGTH = 8K BANK1_SRAM (WXAI) : ORIGIN = 0x2000, LENGTH = 8K
BANK2_SRAM (WXAI) : ORIGIN = 0x4000, LENGTH = 8K BANK2_SRAM (WXAI) : ORIGIN = 0x4000, LENGTH = 8K
BANK3_SRAM (WXAI) : ORIGIN = 0x6000, LENGTH = 8K BANK3_SRAM (WXAI) : ORIGIN = 0x6000, LENGTH = 8K
/* user program, continious placement */ /* user program, continious placement */
INTERNAL_RAM (WXAI) : ORIGIN = LENGTH(RESERVED_CRT0_RAM), LENGTH = 32K - LENGTH(RESERVED_CRT0_RAM) INTERNAL_RAM (WXAI) : ORIGIN = LENGTH(RESERVED_CRT0_RAM), LENGTH = 32K - LENGTH(RESERVED_CRT0_RAM)
MMR (WAI) : ORIGIN = 0xF000, LENGTH = 32K MMR (WAI) : ORIGIN = 0xF000, LENGTH = 32K
/* multi cores space */ /* multi cores space */
CORE_0x20_0x24_INTERNAL_RAM : ORIGIN = 0x82400000+LENGTH(RESERVED_CRT0_RAM), LENGTH = 32K- LENGTH(RESERVED_CRT0_RAM) 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_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_0x20_0x26_INTERNAL_RAM : ORIGIN = 0x82600000+LENGTH(RESERVED_CRT0_RAM), LENGTH = 32K- LENGTH(RESERVED_CRT0_RAM)
@ -328,7 +328,7 @@ MEMORY
CORE_0x23_0x26_INTERNAL_RAM : ORIGIN = 0x8e600000+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_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) CORE_0x24_0x24_INTERNAL_RAM : ORIGIN = 0x82000000+LENGTH(RESERVED_CRT0_RAM), LENGTH = 32K- LENGTH(RESERVED_CRT0_RAM)
} }
@ -338,35 +338,35 @@ SECTIONS
IVT 0 : {*.o(IVT) } > 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
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_0 : {*.o(core_ram_0) } > BANK0_SRAM
CORE_RAM_1 : {*.o(core_ram_1) } > BANK1_SRAM CORE_RAM_1 : {*.o(core_ram_1) } > BANK1_SRAM
CORE_RAM_2 : {*.o(core_ram_2) } > BANK2_SRAM CORE_RAM_2 : {*.o(core_ram_2) } > BANK2_SRAM
CORE_RAM_3 : {*.o(core_ram_3) } > BANK3_SRAM CORE_RAM_3 : {*.o(core_ram_3) } > BANK3_SRAM
SRAM_SOUTH : {*.o(sram) } > EXTERNAL_SRAM SRAM_SOUTH : {*.o(sram) } > EXTERNAL_SRAM
DRAM_WEST : {*.o(dram) } > EXTERNAL_DRAM_1 DRAM_WEST : {*.o(dram) } > EXTERNAL_DRAM_1
CORE_INTERNAL : {*.o(core_ram_internal) } /*> INTERNAL_RAM*/ CORE_INTERNAL : {*.o(core_ram_internal) } /*> INTERNAL_RAM*/
/* the newlib (libc and libm) library is maped to the dedicated section */ /* 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_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_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*/ 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) : { GNU_C_BUILTIN_LIB_RO ADDR(NEW_LIB_RO) + SIZEOF(NEW_LIB_RO) : {
*mulsi3.o(.text .rodata) *modsi3.o(.text .rodata) *mulsi3.o(.text .rodata) *modsi3.o(.text .rodata)
*divsi3.o(.text .rodata) *udivsi3.o(.text .rodata) *divsi3.o(.text .rodata) *udivsi3.o(.text .rodata)
*umodsi3.o(.text .rodata) _*.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*/ 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_) ? 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; __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: */ /* Read-only sections, merged into text segment: */
/*${CREATE_SHLIB-${CREATE_PIE-${RELOCATING+PROVIDE (__executable_start = ${TEXT_START_ADDR}); . = ${TEXT_BASE_ADDRESS};}}}*/ /*${CREATE_SHLIB-${CREATE_PIE-${RELOCATING+PROVIDE (__executable_start = ${TEXT_START_ADDR}); . = ${TEXT_BASE_ADDRESS};}}}*/
@ -433,13 +433,13 @@ cat >> ldscripts/dyntmp.$$ <<EOF
.rel.dyn ${RELOCATING-0} : .rel.dyn ${RELOCATING-0} :
{ {
EOF 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 cat >> ldscripts/dyntmp.$$ <<EOF
} }
.rela.dyn ${RELOCATING-0} : .rela.dyn ${RELOCATING-0} :
{ {
EOF 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 cat >> ldscripts/dyntmp.$$ <<EOF
} }
EOF EOF
@ -456,19 +456,19 @@ if test -z "${NON_ALLOC_DYN}"; then
cat ldscripts/dyntmp.$$ cat ldscripts/dyntmp.$$
else else
if test -z "${NO_REL_RELOCS}"; then 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 fi
if test -z "${NO_RELA_RELOCS}"; then 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
fi fi
rm -f ldscripts/dyntmp.$$ rm -f ldscripts/dyntmp.$$
fi fi
cat <<EOF cat <<EOF
.init __init_start : .init __init_start :
{ {
${RELOCATING+${INIT_START}} ${RELOCATING+${INIT_START}}
KEEP (*(.init)) KEEP (*(.init))
${RELOCATING+${INIT_END}} ${RELOCATING+${INIT_END}}
@ -476,14 +476,14 @@ cat <<EOF
${TEXT_PLT+${PLT}} ${TEXT_PLT+${PLT}}
${TINY_READONLY_SECTION} ${TINY_READONLY_SECTION}
.fini ${RELOCATING+ADDR(.init)+SIZEOF(.init)} ${RELOCATING-0} : .fini ${RELOCATING+ADDR(.init)+SIZEOF(.init)} ${RELOCATING-0} :
{ {
${RELOCATING+${FINI_START}} ${RELOCATING+${FINI_START}}
KEEP (*(.fini)) KEEP (*(.fini))
${RELOCATING+${FINI_END}} ${RELOCATING+${FINI_END}}
} /*> INTERNAL_RAM*/ =${NOP-0} } /*> INTERNAL_RAM*/ =${NOP-0}
.text ${RELOCATING+ADDR(.fini)+SIZEOF(.fini)} ${RELOCATING-0} : .text ${RELOCATING+ADDR(.fini)+SIZEOF(.fini)} ${RELOCATING-0} :
{ {
${RELOCATING+${TEXT_START_SYMBOLS}} ${RELOCATING+${TEXT_START_SYMBOLS}}
@ -497,7 +497,7 @@ cat <<EOF
${RELOCATING+PROVIDE (_${ETEXT_NAME} = .);} ${RELOCATING+PROVIDE (_${ETEXT_NAME} = .);}
${RELOCATING+PROVIDE (${ETEXT_NAME} = .);} ${RELOCATING+PROVIDE (${ETEXT_NAME} = .);}
${WRITABLE_RODATA-${RODATA}} ${WRITABLE_RODATA-${RODATA}}
.rodata1 ${RELOCATING-0} : { *(.rodata1) } .rodata1 ${RELOCATING-0} : { *(.rodata1) }
${CREATE_SHLIB-${SDATA2}} ${CREATE_SHLIB-${SDATA2}}
${CREATE_SHLIB-${SBSS2}} ${CREATE_SHLIB-${SBSS2}}
${OTHER_READONLY_SECTIONS} ${OTHER_READONLY_SECTIONS}
@ -524,21 +524,21 @@ cat <<EOF
${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (${USER_LABEL_PREFIX}__preinit_array_start = .);}} ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (${USER_LABEL_PREFIX}__preinit_array_start = .);}}
KEEP (*(.preinit_array)) KEEP (*(.preinit_array))
${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (${USER_LABEL_PREFIX}__preinit_array_end = .);}} ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (${USER_LABEL_PREFIX}__preinit_array_end = .);}}
} }
.init_array ${RELOCATING-0} : .init_array ${RELOCATING-0} :
{ {
${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (${USER_LABEL_PREFIX}__init_array_start = .);}} ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (${USER_LABEL_PREFIX}__init_array_start = .);}}
KEEP (*(SORT(.init_array.*))) KEEP (*(SORT(.init_array.*)))
KEEP (*(.init_array)) KEEP (*(.init_array))
${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (${USER_LABEL_PREFIX}__init_array_end = .);}} ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (${USER_LABEL_PREFIX}__init_array_end = .);}}
} }
.fini_array ${RELOCATING-0} : .fini_array ${RELOCATING-0} :
{ {
${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (${USER_LABEL_PREFIX}__fini_array_start = .);}} ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (${USER_LABEL_PREFIX}__fini_array_start = .);}}
KEEP (*(.fini_array)) KEEP (*(.fini_array))
KEEP (*(SORT(.fini_array.*))) KEEP (*(SORT(.fini_array.*)))
${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (${USER_LABEL_PREFIX}__fini_array_end = .);}} ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (${USER_LABEL_PREFIX}__fini_array_end = .);}}
} }
${SMALL_DATA_CTOR-${RELOCATING+${CTOR}}} ${SMALL_DATA_CTOR-${RELOCATING+${CTOR}}}
${SMALL_DATA_DTOR-${RELOCATING+${DTOR}}} ${SMALL_DATA_DTOR-${RELOCATING+${DTOR}}}
.jcr ${RELOCATING-0} : { KEEP (*(.jcr)) } .jcr ${RELOCATING-0} : { KEEP (*(.jcr)) }
@ -561,7 +561,7 @@ cat <<EOF
*(.data${RELOCATING+ .data.* .gnu.linkonce.d.*}) *(.data${RELOCATING+ .data.* .gnu.linkonce.d.*})
${CONSTRUCTING+SORT(CONSTRUCTORS)} ${CONSTRUCTING+SORT(CONSTRUCTORS)}
} /*> INTERNAL_RAM*/ } /*> INTERNAL_RAM*/
.data1 ${RELOCATING-0} : { *(.data1) } .data1 ${RELOCATING-0} : { *(.data1) }
${WRITABLE_RODATA+${RODATA}} ${WRITABLE_RODATA+${RODATA}}
${OTHER_READWRITE_SECTIONS} ${OTHER_READWRITE_SECTIONS}
${SMALL_DATA_CTOR+${RELOCATING+${CTOR}}} ${SMALL_DATA_CTOR+${RELOCATING+${CTOR}}}
@ -615,10 +615,10 @@ if test -n "${NON_ALLOC_DYN}"; then
cat ldscripts/dyntmp.$$ cat ldscripts/dyntmp.$$
else else
if test -z "${NO_REL_RELOCS}"; then 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 fi
if test -z "${NO_RELA_RELOCS}"; then 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
fi fi
rm -f ldscripts/dyntmp.$$ rm -f ldscripts/dyntmp.$$

View File

@ -1,7 +1,7 @@
# Linker script for PE. # Linker script for PE.
# #
# Copyright (C) 2014-2017 Free Software Foundation, Inc. # Copyright (C) 2014-2017 Free Software Foundation, Inc.
# #
# Copying and distribution of this file, with or without modification, # Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright # are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved. # notice and this notice are preserved.
@ -57,7 +57,7 @@ ${RELOCATING+ENTRY (_mainCRTStartup)}
SECTIONS SECTIONS
{ {
.text ${RELOCATING+ __image_base__ + __section_alignment__ } : .text ${RELOCATING+ __image_base__ + __section_alignment__ } :
{ {
${RELOCATING+ *(.init)} ${RELOCATING+ *(.init)}
*(.text) *(.text)
@ -65,9 +65,9 @@ SECTIONS
*(.glue_7t) *(.glue_7t)
*(.glue_7) *(.glue_7)
${RELOCATING+ *(.text.*)} ${RELOCATING+ *(.text.*)}
${CONSTRUCTING+ ___CTOR_LIST__ = .; __CTOR_LIST__ = . ; ${CONSTRUCTING+ ___CTOR_LIST__ = .; __CTOR_LIST__ = . ;
LONG (-1); *(.ctors); *(.ctor); LONG (0); } LONG (-1); *(.ctors); *(.ctor); LONG (0); }
${CONSTRUCTING+ ___DTOR_LIST__ = .; __DTOR_LIST__ = . ; ${CONSTRUCTING+ ___DTOR_LIST__ = .; __DTOR_LIST__ = . ;
LONG (-1); *(.dtors); *(.dtor); LONG (0); } LONG (-1); *(.dtors); *(.dtor); LONG (0); }
${RELOCATING+ *(.fini)} ${RELOCATING+ *(.fini)}
/* ??? Why is .gcc_exc here? */ /* ??? Why is .gcc_exc here? */
@ -88,7 +88,7 @@ SECTIONS
breaks building the cygwin32 dll. Instead, we name the section breaks building the cygwin32 dll. Instead, we name the section
".data_cygwin_nocopy" and explicitly include it after __data_end__. */ ".data_cygwin_nocopy" and explicitly include it after __data_end__. */
.data ${RELOCATING+BLOCK(__section_alignment__)} : .data ${RELOCATING+BLOCK(__section_alignment__)} :
{ {
${RELOCATING+__data_start__ = . ;} ${RELOCATING+__data_start__ = . ;}
*(.data) *(.data)
@ -125,9 +125,9 @@ SECTIONS
See pe.em:sort_sections. */ See pe.em:sort_sections. */
${R_IDATA} ${R_IDATA}
} }
.CRT ${RELOCATING+BLOCK(__section_alignment__)} : .CRT ${RELOCATING+BLOCK(__section_alignment__)} :
{ {
${R_CRT} ${R_CRT}
} }
@ -140,12 +140,12 @@ SECTIONS
} }
.reloc ${RELOCATING+BLOCK(__section_alignment__)} : .reloc ${RELOCATING+BLOCK(__section_alignment__)} :
{ {
*(.reloc) *(.reloc)
} }
.rsrc ${RELOCATING+BLOCK(__section_alignment__)} : .rsrc ${RELOCATING+BLOCK(__section_alignment__)} :
{ {
*(.rsrc) *(.rsrc)
${R_RSRC} ${R_RSRC}
} }

View File

@ -1,5 +1,5 @@
# Copyright (C) 2014-2017 Free Software Foundation, Inc. # Copyright (C) 2014-2017 Free Software Foundation, Inc.
# #
# Copying and distribution of this file, with or without modification, # Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright # are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved. # notice and this notice are preserved.
@ -51,7 +51,7 @@ SECTIONS
} ${RELOCATING+ > vectors} } ${RELOCATING+ > vectors}
.init : .init :
{ {
*(.init) *(.init)
} ${RELOCATING+ > ram} } ${RELOCATING+ > ram}
@ -61,7 +61,7 @@ SECTIONS
*(.text) *(.text)
*(.text.*) *(.text.*)
*(.strings) *(.strings)
${RELOCATING+ _etext = . ; } ${RELOCATING+ _etext = . ; }
} ${RELOCATING+ > ram} } ${RELOCATING+ > ram}
${CONSTRUCTING+${TORS}} ${CONSTRUCTING+${TORS}}

View File

@ -1,5 +1,5 @@
# Copyright (C) 2014-2017 Free Software Foundation, Inc. # Copyright (C) 2014-2017 Free Software Foundation, Inc.
# #
# Copying and distribution of this file, with or without modification, # Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright # are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved. # notice and this notice are preserved.
@ -61,7 +61,7 @@ SECTIONS
*(.rodata) *(.rodata)
*(.text) *(.text)
*(.strings) *(.strings)
${RELOCATING+ _etext = . ; } ${RELOCATING+ _etext = . ; }
} ${RELOCATING+ > ram} } ${RELOCATING+ > ram}
${CONSTRUCTING+${TORS}} ${CONSTRUCTING+${TORS}}

View File

@ -1,5 +1,5 @@
# Copyright (C) 2014-2017 Free Software Foundation, Inc. # Copyright (C) 2014-2017 Free Software Foundation, Inc.
# #
# Copying and distribution of this file, with or without modification, # Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright # are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved. # notice and this notice are preserved.
@ -55,7 +55,7 @@ SECTIONS
*(.rodata) *(.rodata)
*(.text) *(.text)
*(.strings) *(.strings)
${RELOCATING+ _etext = . ; } ${RELOCATING+ _etext = . ; }
} ${RELOCATING+ > ram} } ${RELOCATING+ > ram}
${CONSTRUCTING+${TORS}} ${CONSTRUCTING+${TORS}}

View File

@ -1,5 +1,5 @@
# Copyright (C) 2014-2017 Free Software Foundation, Inc. # Copyright (C) 2014-2017 Free Software Foundation, Inc.
# #
# Copying and distribution of this file, with or without modification, # Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright # are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved. # notice and this notice are preserved.
@ -61,7 +61,7 @@ SECTIONS
*(.rodata) *(.rodata)
*(.text) *(.text)
*(.strings) *(.strings)
${RELOCATING+ _etext = . ; } ${RELOCATING+ _etext = . ; }
} ${RELOCATING+ > ram} } ${RELOCATING+ > ram}
${CONSTRUCTING+${TORS}} ${CONSTRUCTING+${TORS}}

View File

@ -1,5 +1,5 @@
# Copyright (C) 2014-2017 Free Software Foundation, Inc. # Copyright (C) 2014-2017 Free Software Foundation, Inc.
# #
# Copying and distribution of this file, with or without modification, # Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright # are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved. # notice and this notice are preserved.
@ -55,7 +55,7 @@ SECTIONS
*(.rodata) *(.rodata)
*(.text) *(.text)
*(.strings) *(.strings)
${RELOCATING+ _etext = . ; } ${RELOCATING+ _etext = . ; }
} ${RELOCATING+ > ram} } ${RELOCATING+ > ram}
${CONSTRUCTING+${TORS}} ${CONSTRUCTING+${TORS}}

View File

@ -1,5 +1,5 @@
# Copyright (C) 2014-2017 Free Software Foundation, Inc. # Copyright (C) 2014-2017 Free Software Foundation, Inc.
# #
# Copying and distribution of this file, with or without modification, # Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright # are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved. # notice and this notice are preserved.
@ -61,7 +61,7 @@ SECTIONS
*(.rodata) *(.rodata)
*(.text) *(.text)
*(.strings) *(.strings)
${RELOCATING+ _etext = . ; } ${RELOCATING+ _etext = . ; }
} ${RELOCATING+ > ram} } ${RELOCATING+ > ram}
${CONSTRUCTING+${TORS}} ${CONSTRUCTING+${TORS}}

View File

@ -1,5 +1,5 @@
# Copyright (C) 2014-2017 Free Software Foundation, Inc. # Copyright (C) 2014-2017 Free Software Foundation, Inc.
# #
# Copying and distribution of this file, with or without modification, # Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright # are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved. # notice and this notice are preserved.
@ -55,7 +55,7 @@ SECTIONS
*(.rodata) *(.rodata)
*(.text) *(.text)
*(.strings) *(.strings)
${RELOCATING+ _etext = . ; } ${RELOCATING+ _etext = . ; }
} ${RELOCATING+ > ram} } ${RELOCATING+ > ram}
${CONSTRUCTING+${TORS}} ${CONSTRUCTING+${TORS}}

View File

@ -1,5 +1,5 @@
# Copyright (C) 2014-2017 Free Software Foundation, Inc. # Copyright (C) 2014-2017 Free Software Foundation, Inc.
# #
# Copying and distribution of this file, with or without modification, # Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright # are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved. # notice and this notice are preserved.

View File

@ -1,5 +1,5 @@
# Copyright (C) 2014-2017 Free Software Foundation, Inc. # Copyright (C) 2014-2017 Free Software Foundation, Inc.
# #
# Copying and distribution of this file, with or without modification, # Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright # are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved. # notice and this notice are preserved.

View File

@ -1,5 +1,5 @@
# Copyright (C) 2014-2017 Free Software Foundation, Inc. # Copyright (C) 2014-2017 Free Software Foundation, Inc.
# #
# Copying and distribution of this file, with or without modification, # Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright # are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved. # notice and this notice are preserved.

View File

@ -1,5 +1,5 @@
# Copyright (C) 2014-2017 Free Software Foundation, Inc. # Copyright (C) 2014-2017 Free Software Foundation, Inc.
# #
# Copying and distribution of this file, with or without modification, # Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright # are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved. # notice and this notice are preserved.

View File

@ -1,5 +1,5 @@
# Copyright (C) 2014-2017 Free Software Foundation, Inc. # Copyright (C) 2014-2017 Free Software Foundation, Inc.
# #
# Copying and distribution of this file, with or without modification, # Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright # are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved. # notice and this notice are preserved.

View File

@ -1,5 +1,5 @@
# Copyright (C) 2014-2017 Free Software Foundation, Inc. # Copyright (C) 2014-2017 Free Software Foundation, Inc.
# #
# Copying and distribution of this file, with or without modification, # Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright # are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved. # notice and this notice are preserved.

View File

@ -1,7 +1,7 @@
# Linker script for PE. # Linker script for PE.
# #
# Copyright (C) 2014-2017 Free Software Foundation, Inc. # Copyright (C) 2014-2017 Free Software Foundation, Inc.
# #
# Copying and distribution of this file, with or without modification, # Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright # are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved. # notice and this notice are preserved.
@ -56,7 +56,7 @@ ${RELOCATING+__fltused = .; /* set up floating pt for MS .obj\'s */}
${RELOCATING+__ldused = .;} ${RELOCATING+__ldused = .;}
SECTIONS SECTIONS
{ {
.text ${RELOCATING+ __image_base__ + __section_alignment__ } : .text ${RELOCATING+ __image_base__ + __section_alignment__ } :
{ {
${RELOCATING+ __text_start__ = . ;} ${RELOCATING+ __text_start__ = . ;}
${RELOCATING+ *(.init)} ${RELOCATING+ *(.init)}
@ -64,9 +64,9 @@ SECTIONS
${R_TEXT} ${R_TEXT}
*(.glue_7t) *(.glue_7t)
*(.glue_7) *(.glue_7)
${CONSTRUCTING+ ___CTOR_LIST__ = .; __CTOR_LIST__ = . ; ${CONSTRUCTING+ ___CTOR_LIST__ = .; __CTOR_LIST__ = . ;
LONG (-1); *(.ctors); *(.ctor); LONG (0); } LONG (-1); *(.ctors); *(.ctor); LONG (0); }
${CONSTRUCTING+ ___DTOR_LIST__ = .; __DTOR_LIST__ = . ; ${CONSTRUCTING+ ___DTOR_LIST__ = .; __DTOR_LIST__ = . ;
LONG (-1); *(.dtors); *(.dtor); LONG (0); } LONG (-1); *(.dtors); *(.dtor); LONG (0); }
${RELOCATING+ *(.fini)} ${RELOCATING+ *(.fini)}
/* ??? Why is .gcc_exc here? */ /* ??? Why is .gcc_exc here? */
@ -82,7 +82,7 @@ SECTIONS
breaks building the cygwin32 dll. Instead, we name the section breaks building the cygwin32 dll. Instead, we name the section
".data_cygwin_nocopy" and explicitly include it after __data_end__. */ ".data_cygwin_nocopy" and explicitly include it after __data_end__. */
.data ${RELOCATING+BLOCK(__section_alignment__)} : .data ${RELOCATING+BLOCK(__section_alignment__)} :
{ {
${RELOCATING+__data_start__ = . ;} ${RELOCATING+__data_start__ = . ;}
*(.data) *(.data)
@ -134,7 +134,7 @@ SECTIONS
${R_IDATA} ${R_IDATA}
} }
.CRT ${RELOCATING+BLOCK(__section_alignment__)} : .CRT ${RELOCATING+BLOCK(__section_alignment__)} :
{ {
${R_CRT} ${R_CRT}
} }
@ -147,18 +147,18 @@ SECTIONS
} }
.reloc ${RELOCATING+BLOCK(__section_alignment__)} : .reloc ${RELOCATING+BLOCK(__section_alignment__)} :
{ {
*(.reloc) *(.reloc)
} }
.rsrc ${RELOCATING+BLOCK(__section_alignment__)} : .rsrc ${RELOCATING+BLOCK(__section_alignment__)} :
{ {
*(.rsrc) *(.rsrc)
${R_RSRC} ${R_RSRC}
} }
.exc ${RELOCATING+BLOCK(__section_alignment__)} : .exc ${RELOCATING+BLOCK(__section_alignment__)} :
{ {
*(.exc) *(.exc)
${R_EXC} ${R_EXC}
} }

View File

@ -2,7 +2,7 @@
# Ian Taylor <ian@cygnus.com>. # Ian Taylor <ian@cygnus.com>.
# #
# Copyright (C) 2014-2017 Free Software Foundation, Inc. # Copyright (C) 2014-2017 Free Software Foundation, Inc.
# #
# Copying and distribution of this file, with or without modification, # Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright # are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved. # notice and this notice are preserved.
@ -38,14 +38,14 @@ SECTIONS
${RELOCATING+ edata = .}; ${RELOCATING+ edata = .};
} }
.bss ${RELOCATING+ SIZEOF(.data) + ADDR(.data)} : .bss ${RELOCATING+ SIZEOF(.data) + ADDR(.data)} :
{ {
*(.bss) *(.bss)
*(COMMON) *(COMMON)
${RELOCATING+ end = .}; ${RELOCATING+ end = .};
} }
${RELOCATING- ${INIT}} ${RELOCATING- ${INIT}}
${RELOCATING- ${FINI}} ${RELOCATING- ${FINI}}
.stab 0 ${RELOCATING+(NOLOAD)} : .stab 0 ${RELOCATING+(NOLOAD)} :
{ {
[ .stab ] [ .stab ]
} }

View File

@ -1,7 +1,7 @@
# Linker script for i386 go32 (DJGPP) # Linker script for i386 go32 (DJGPP)
# #
# Copyright (C) 2014-2017 Free Software Foundation, Inc. # Copyright (C) 2014-2017 Free Software Foundation, Inc.
# #
# Copying and distribution of this file, with or without modification, # Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright # are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved. # notice and this notice are preserved.
@ -68,7 +68,7 @@ SECTIONS
${CONSTRUCTING+${RELOCATING-$CTOR}} ${CONSTRUCTING+${RELOCATING-$CTOR}}
${CONSTRUCTING+${RELOCATING-$DTOR}} ${CONSTRUCTING+${RELOCATING-$DTOR}}
.bss ${RELOCATING+ SIZEOF(.data) + ADDR(.data)} : .bss ${RELOCATING+ SIZEOF(.data) + ADDR(.data)} :
{ {
*(.bss${RELOCATING+ .bss.* .gnu.linkonce.b.*}) *(.bss${RELOCATING+ .bss.* .gnu.linkonce.b.*})
*(COMMON) *(COMMON)
${RELOCATING+ end = . ; PROVIDE(_end = .) ;} ${RELOCATING+ end = . ; PROVIDE(_end = .) ;}

View File

@ -1,5 +1,5 @@
# Copyright (C) 2014-2017 Free Software Foundation, Inc. # Copyright (C) 2014-2017 Free Software Foundation, Inc.
# #
# Copying and distribution of this file, with or without modification, # Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright # are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved. # notice and this notice are preserved.

View File

@ -1,5 +1,5 @@
# Copyright (C) 2014-2017 Free Software Foundation, Inc. # Copyright (C) 2014-2017 Free Software Foundation, Inc.
# #
# Copying and distribution of this file, with or without modification, # Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright # are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved. # notice and this notice are preserved.
@ -13,7 +13,7 @@ cat <<EOF
OUTPUT_FORMAT("${OUTPUT_FORMAT}") OUTPUT_FORMAT("${OUTPUT_FORMAT}")
${LIB_SEARCH_DIRS} ${LIB_SEARCH_DIRS}
PROVIDE (__stack = 0); PROVIDE (__stack = 0);
SECTIONS SECTIONS
{ {
.text ${RELOCATING+ 0x1000000} : { .text ${RELOCATING+ 0x1000000} : {
@ -35,14 +35,14 @@ SECTIONS
*(.data) *(.data)
${RELOCATING+ edata = .}; ${RELOCATING+ edata = .};
} }
.bss : { .bss : {
${RELOCATING+ __bss_start = .}; ${RELOCATING+ __bss_start = .};
*(.bss) *(.bss)
*(COMMON) *(COMMON)
${RELOCATING+ end = ALIGN(0x8)}; ${RELOCATING+ end = ALIGN(0x8)};
${RELOCATING+ _end = ALIGN(0x8)}; ${RELOCATING+ _end = ALIGN(0x8)};
} }
.stab 0 ${RELOCATING+(NOLOAD)} : .stab 0 ${RELOCATING+(NOLOAD)} :
{ {
[ .stab ] [ .stab ]
} }

View File

@ -1,5 +1,5 @@
# Copyright (C) 2014-2017 Free Software Foundation, Inc. # Copyright (C) 2014-2017 Free Software Foundation, Inc.
# #
# Copying and distribution of this file, with or without modification, # Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright # are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved. # notice and this notice are preserved.
@ -12,26 +12,26 @@ cat <<EOF
notice and this notice are preserved. */ notice and this notice are preserved. */
SECTIONS SECTIONS
{ {
.text : .text :
{ {
${GLD_STYLE+ CREATE_OBJECT_SYMBOLS} ${GLD_STYLE+ CREATE_OBJECT_SYMBOLS}
*(.text) *(.text)
${RELOCATING+ _etext = .}; ${RELOCATING+ _etext = .};
${CONSTRUCTING+${COFF_CTORS}} ${CONSTRUCTING+${COFF_CTORS}}
} }
.data : .data :
{ {
*(.data) *(.data)
${CONSTRUCTING+CONSTRUCTORS} ${CONSTRUCTING+CONSTRUCTORS}
${RELOCATING+ _edata = .}; ${RELOCATING+ _edata = .};
} }
.bss : .bss :
{ {
${RELOCATING+ _bss_start = .}; ${RELOCATING+ _bss_start = .};
*(.bss) *(.bss)
*(COMMON) *(COMMON)
${RELOCATING+ _end = .}; ${RELOCATING+ _end = .};
} }
} }
EOF EOF

View File

@ -2,7 +2,7 @@
# Tristan Gingold <gingold@adacore.com>. # Tristan Gingold <gingold@adacore.com>.
# #
# Copyright (C) 2014-2017 Free Software Foundation, Inc. # Copyright (C) 2014-2017 Free Software Foundation, Inc.
# #
# Copying and distribution of this file, with or without modification, # Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright # are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved. # notice and this notice are preserved.
@ -120,7 +120,7 @@ EOF
. $srcdir/scripttempl/DWARF.sc . $srcdir/scripttempl/DWARF.sc
cat <<EOF cat <<EOF
.note : { *(.vms.note) } .note : { *(.vms.note) }
/DISCARD/ : { *(.note) *(.vms_display_name_info) } /DISCARD/ : { *(.note) *(.vms_display_name_info) }

View File

@ -1,5 +1,5 @@
# Copyright (C) 2014-2017 Free Software Foundation, Inc. # Copyright (C) 2014-2017 Free Software Foundation, Inc.
# #
# Copying and distribution of this file, with or without modification, # Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright # are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved. # notice and this notice are preserved.
@ -21,11 +21,11 @@ SEARCH_DIR(.);
MEMORY MEMORY
{ {
D_GPR : org = 0x01000080, len = 128 D_GPR : org = 0x01000080, len = 128
D_RAM : org = 0x01000100, len = 4K - 256 D_RAM : org = 0x01000100, len = 4K - 256
P_RAM : org = 0x02000000, len = 16K P_RAM : org = 0x02000000, len = 16K
P_ROM : org = 0x02010000, len = 64K - 32 P_ROM : org = 0x02010000, len = 64K - 32
P_RESET : org = 0x0201FFE0, len = 32 P_RESET : org = 0x0201FFE0, len = 32
P_CONFIG : org = 0x02020000, len = 128 P_CONFIG : org = 0x02020000, len = 128
} }
SECTIONS SECTIONS
@ -89,7 +89,7 @@ SECTIONS
/* PRAM overlay code. */ /* PRAM overlay code. */
__pram_overlay_run_start = (__pram_end + 1) & 0xFFFFFFFE; __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) OVERLAY __pram_overlay_run_start : AT (__pram_overlay_load_start)
{ {
.pram1 { */overlay1/* (.pram); * (.pram1) } .pram1 { */overlay1/* (.pram); * (.pram1) }

View File

@ -1,5 +1,5 @@
# Copyright (C) 2014-2017 Free Software Foundation, Inc. # Copyright (C) 2014-2017 Free Software Foundation, Inc.
# #
# Copying and distribution of this file, with or without modification, # Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright # are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved. # notice and this notice are preserved.
@ -28,15 +28,15 @@
# DATA_PLT - .plt should be in data segment, not text segment. # DATA_PLT - .plt should be in data segment, not text segment.
# BSS_PLT - .plt should be in bss segment # BSS_PLT - .plt should be in bss segment
# TEXT_DYNAMIC - .dynamic in text segment, not 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 # SHLIB_TEXT_START_ADDR - if set, add to SIZEOF_HEADERS to set
# start address of shared library. # start address of shared library.
# INPUT_FILES - INPUT command of files to always include # INPUT_FILES - INPUT command of files to always include
# WRITABLE_RODATA - if set, the .rodata section should be writable # WRITABLE_RODATA - if set, the .rodata section should be writable
# INIT_START, INIT_END - statements just before and just after # 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 # 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 adding sections, do note that the names of some sections are used
# when specifying the start address of the next. # when specifying the start address of the next.
@ -69,13 +69,13 @@ if [ -z "$MACHINE" ]; then OUTPUT_ARCH=${ARCH}; else OUTPUT_ARCH=${ARCH}:${MACHI
test -z "${ELFSIZE}" && ELFSIZE=32 test -z "${ELFSIZE}" && ELFSIZE=32
test -z "${ALIGNMENT}" && ALIGNMENT="${ELFSIZE} / 8" test -z "${ALIGNMENT}" && ALIGNMENT="${ELFSIZE} / 8"
test "$LD_FLAG" = "N" && DATA_ADDR=. test "$LD_FLAG" = "N" && DATA_ADDR=.
INTERP=".interp ${RELOCATING-0} : { *(.interp) }" INTERP=".interp ${RELOCATING-0} : { *(.interp) }"
PLT=".plt ${RELOCATING-0} : { *(.plt) }" PLT=".plt ${RELOCATING-0} : { *(.plt) }"
DYNAMIC=".dynamic ${RELOCATING-0} : { *(.dynamic) }" DYNAMIC=".dynamic ${RELOCATING-0} : { *(.dynamic) }"
RODATA=".rodata ${RELOCATING-0} : { *(.rodata) ${RELOCATING+*(.rodata.*)} ${RELOCATING+*(.gnu.linkonce.r.*)} }" RODATA=".rodata ${RELOCATING-0} : { *(.rodata) ${RELOCATING+*(.rodata.*)} ${RELOCATING+*(.gnu.linkonce.r.*)} }"
SBSS2=".sbss2 ${RELOCATING-0} : { *(.sbss2) ${RELOCATING+*(.sbss2.*)} ${RELOCATING+*(.gnu.linkonce.sb2.*)} }" SBSS2=".sbss2 ${RELOCATING-0} : { *(.sbss2) ${RELOCATING+*(.sbss2.*)} ${RELOCATING+*(.gnu.linkonce.sb2.*)} }"
SDATA2=".sdata2 ${RELOCATING-0} : { *(.sdata2) ${RELOCATING+*(.sdata2.*)} ${RELOCATING+*(.gnu.linkonce.s2.*)} }" SDATA2=".sdata2 ${RELOCATING-0} : { *(.sdata2) ${RELOCATING+*(.sdata2.*)} ${RELOCATING+*(.gnu.linkonce.s2.*)} }"
CTOR=".ctors ${CONSTRUCTING-0} : CTOR=".ctors ${CONSTRUCTING-0} :
{ {
${CONSTRUCTING+${CTOR_START}} ${CONSTRUCTING+${CTOR_START}}
/* gcc uses crtbegin.o to find the start of /* gcc uses crtbegin.o to find the start of
@ -217,7 +217,7 @@ eval $COMBRELOCCAT <<EOF
${RELOCATING+*(.rela.gnu.linkonce.s.*)} ${RELOCATING+*(.rela.gnu.linkonce.s.*)}
} }
.rel.sbss ${RELOCATING-0} : .rel.sbss ${RELOCATING-0} :
{ {
*(.rel.sbss) *(.rel.sbss)
${RELOCATING+*(.rel.sbss.*)} ${RELOCATING+*(.rel.sbss.*)}
${RELOCATING+*(.rel.gnu.linkonce.sb.*)} ${RELOCATING+*(.rel.gnu.linkonce.sb.*)}
@ -228,38 +228,38 @@ eval $COMBRELOCCAT <<EOF
${RELOCATING+*(.rela.sbss.*)} ${RELOCATING+*(.rela.sbss.*)}
${RELOCATING+*(.rela.gnu.linkonce.sb.*)} ${RELOCATING+*(.rela.gnu.linkonce.sb.*)}
} }
.rel.sdata2 ${RELOCATING-0} : .rel.sdata2 ${RELOCATING-0} :
{ {
*(.rel.sdata2) *(.rel.sdata2)
${RELOCATING+*(.rel.sdata2.*)} ${RELOCATING+*(.rel.sdata2.*)}
${RELOCATING+*(.rel.gnu.linkonce.s2.*)} ${RELOCATING+*(.rel.gnu.linkonce.s2.*)}
} }
.rela.sdata2 ${RELOCATING-0} : .rela.sdata2 ${RELOCATING-0} :
{ {
*(.rela.sdata2) *(.rela.sdata2)
${RELOCATING+*(.rela.sdata2.*)} ${RELOCATING+*(.rela.sdata2.*)}
${RELOCATING+*(.rela.gnu.linkonce.s2.*)} ${RELOCATING+*(.rela.gnu.linkonce.s2.*)}
} }
.rel.sbss2 ${RELOCATING-0} : .rel.sbss2 ${RELOCATING-0} :
{ {
*(.rel.sbss2) *(.rel.sbss2)
${RELOCATING+*(.rel.sbss2.*)} ${RELOCATING+*(.rel.sbss2.*)}
${RELOCATING+*(.rel.gnu.linkonce.sb2.*)} ${RELOCATING+*(.rel.gnu.linkonce.sb2.*)}
} }
.rela.sbss2 ${RELOCATING-0} : .rela.sbss2 ${RELOCATING-0} :
{ {
*(.rela.sbss2) *(.rela.sbss2)
${RELOCATING+*(.rela.sbss2.*)} ${RELOCATING+*(.rela.sbss2.*)}
${RELOCATING+*(.rela.gnu.linkonce.sb2.*)} ${RELOCATING+*(.rela.gnu.linkonce.sb2.*)}
} }
.rel.bss ${RELOCATING-0} : .rel.bss ${RELOCATING-0} :
{ {
*(.rel.bss) *(.rel.bss)
${RELOCATING+*(.rel.bss.*)} ${RELOCATING+*(.rel.bss.*)}
${RELOCATING+*(.rel.gnu.linkonce.b.*)} ${RELOCATING+*(.rel.gnu.linkonce.b.*)}
} }
.rela.bss ${RELOCATING-0} : .rela.bss ${RELOCATING-0} :
{ {
*(.rela.bss) *(.rela.bss)
${RELOCATING+*(.rela.bss.*)} ${RELOCATING+*(.rela.bss.*)}
${RELOCATING+*(.rela.gnu.linkonce.b.*)} ${RELOCATING+*(.rela.gnu.linkonce.b.*)}
@ -270,13 +270,13 @@ cat <<EOF
.rel.dyn : .rel.dyn :
{ {
EOF EOF
sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rela\./d;s/^.*: { *\(.*\)}$/ \1/' $COMBRELOC sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rela\./d;s/^.*: { *\(.*\)}$/ \1/' $COMBRELOC
cat <<EOF cat <<EOF
} }
.rela.dyn : .rela.dyn :
{ {
EOF EOF
sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rel\./d;s/^.*: { *\(.*\)}/ \1/' $COMBRELOC sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rel\./d;s/^.*: { *\(.*\)}/ \1/' $COMBRELOC
cat <<EOF cat <<EOF
} }
EOF EOF
@ -286,8 +286,8 @@ cat <<EOF
.rela.plt ${RELOCATING-0} : { *(.rela.plt) } .rela.plt ${RELOCATING-0} : { *(.rela.plt) }
${OTHER_PLT_RELOC_SECTIONS} ${OTHER_PLT_RELOC_SECTIONS}
.init ${RELOCATING-0} : .init ${RELOCATING-0} :
{ {
${RELOCATING+${INIT_START}} ${RELOCATING+${INIT_START}}
KEEP (*(.init)) KEEP (*(.init))
${RELOCATING+${INIT_END}} ${RELOCATING+${INIT_END}}
@ -329,10 +329,10 @@ cat <<EOF
${CONSTRUCTING+SORT(CONSTRUCTORS)} ${CONSTRUCTING+SORT(CONSTRUCTORS)}
} }
.data1 ${RELOCATING-0} : { *(.data1) } .data1 ${RELOCATING-0} : { *(.data1) }
.eh_frame ${RELOCATING-0} : .eh_frame ${RELOCATING-0} :
{ {
${RELOCATING+PROVIDE (__eh_frame_begin = .);} ${RELOCATING+PROVIDE (__eh_frame_begin = .);}
*(.eh_frame) *(.eh_frame)
LONG (0); LONG (0);
${RELOCATING+PROVIDE (__eh_frame_end = .);} ${RELOCATING+PROVIDE (__eh_frame_end = .);}
} ${RELOCATING+} } ${RELOCATING+}
@ -363,10 +363,10 @@ cat <<EOF
/* We want the small data sections together, so single-instruction offsets /* We want the small data sections together, so single-instruction offsets
can access them all, and initialized data all before uninitialized, so can access them all, and initialized data all before uninitialized, so
we can shorten the on-disk segment size. */ we can shorten the on-disk segment size. */
.sdata ${RELOCATING-0} : .sdata ${RELOCATING-0} :
{ {
${RELOCATING+${SDATA_START_SYMBOLS}} ${RELOCATING+${SDATA_START_SYMBOLS}}
*(.sdata) *(.sdata)
${RELOCATING+*(.sdata.*)} ${RELOCATING+*(.sdata.*)}
${RELOCATING+*(.gnu.linkonce.s.*)} ${RELOCATING+*(.gnu.linkonce.s.*)}
} }

Some files were not shown because too many files have changed in this diff Show More