WIP MachO binutils port assisted by AI I may consider upstreaming this in the future.
0

Configure Feed

Select the types of activity you want to include in your feed.

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.

Alan Modra (Oct 12, 2017, 11:30 PM +1030) 6c19b93b 1d75a8e2

+1228 -1231
+1 -1
ld/NEWS
··· 1 1 -*- text -*- 2 2 * Add -z globalaudit command line option to force audit libraries to be run 3 3 for every dynamic object loaded by an executable - provided that the loader 4 - supports this functionality. 4 + supports this functionality. 5 5 6 6 * Tighten linker script grammar around file name specifiers to prevent the use 7 7 of SORT_BY_ALIGNMENT and SORT_BY_INIT_PRIORITY on filenames. These would
+1 -1
ld/configure
··· 15419 15419 if test "${enable_targets+set}" = set; then : 15420 15420 enableval=$enable_targets; case "${enableval}" in 15421 15421 yes | "") as_fn_error "enable-targets option must specify target names or 'all'" "$LINENO" 5 15422 - ;; 15422 + ;; 15423 15423 no) enable_targets= ;; 15424 15424 *) enable_targets=$enableval ;; 15425 15425 esac
+6 -6
ld/configure.ac
··· 44 44 [ --enable-targets alternative target configurations], 45 45 [case "${enableval}" in 46 46 yes | "") AC_MSG_ERROR(enable-targets option must specify target names or 'all') 47 - ;; 47 + ;; 48 48 no) enable_targets= ;; 49 49 *) enable_targets=$enableval ;; 50 50 esac])dnl ··· 120 120 121 121 AC_ARG_ENABLE([got], 122 122 AS_HELP_STRING([--enable-got=<type>], 123 - [GOT handling scheme (target, single, negative, multigot)]), 123 + [GOT handling scheme (target, single, negative, multigot)]), 124 124 [case "${enableval}" in 125 125 target | single | negative | multigot) got_handling=$enableval ;; 126 126 *) AC_MSG_ERROR(bad value ${enableval} for --enable-got option) ;; ··· 130 130 case "${got_handling}" in 131 131 target) 132 132 AC_DEFINE([GOT_HANDLING_DEFAULT], [GOT_HANDLING_TARGET_DEFAULT], 133 - [Define to choose default GOT handling scheme]) ;; 133 + [Define to choose default GOT handling scheme]) ;; 134 134 single) 135 135 AC_DEFINE([GOT_HANDLING_DEFAULT], [GOT_HANDLING_SINGLE], 136 - [Define to choose default GOT handling scheme]) ;; 136 + [Define to choose default GOT handling scheme]) ;; 137 137 negative) 138 138 AC_DEFINE([GOT_HANDLING_DEFAULT], [GOT_HANDLING_NEGATIVE], 139 - [Define to choose default GOT handling scheme]) ;; 139 + [Define to choose default GOT handling scheme]) ;; 140 140 multigot) 141 141 AC_DEFINE([GOT_HANDLING_DEFAULT], [GOT_HANDLING_MULTIGOT], 142 - [Define to choose default GOT handling scheme]) ;; 142 + [Define to choose default GOT handling scheme]) ;; 143 143 *) AC_MSG_ERROR(bad value ${got_handling} for --enable-got option) ;; 144 144 esac 145 145
+49 -49
ld/configure.tgt
··· 28 28 # targ_extra_libpath additional linker emulations using LIB_PATH 29 29 # targ_extra_ofiles additional host-compiled objects needed by the emulation 30 30 # targ64_extra_emuls additional linker emulations to provide if 31 - # --enable-64-bit-bfd is given or if host is 64 bit. 31 + # --enable-64-bit-bfd is given or if host is 64 bit. 32 32 # targ64_extra_libpath additional linker emulations using LIB_PATH if 33 - # --enable-64-bit-bfd is given or if host is 64 bit. 33 + # --enable-64-bit-bfd is given or if host is 64 bit. 34 34 # NATIVE_LIB_DIRS library directories to search on this host 35 35 # (if we are a native or sysrooted linker) 36 36 ··· 71 71 targ_extra_libpath="aarch64linuxb aarch64linux32 aarch64linux32b armelfb_linux_eabi armelf_linux_eabi" 72 72 targ_extra_emuls="aarch64elf aarch64elf32 aarch64elf32b aarch64elfb armelf armelfb $targ_extra_libpath" ;; 73 73 alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu) 74 - targ_emul=elf64alpha_fbsd 74 + targ_emul=elf64alpha_fbsd 75 75 targ_extra_emuls="elf64alpha alpha" 76 76 tdir_alpha=`echo ${targ_alias} | sed -e 's/freebsd/freebsdecoff/'` ;; 77 77 alpha*-*-linux*ecoff*) targ_emul=alpha targ_extra_emuls=elf64alpha ··· 87 87 ;; 88 88 arc*-*-elf*) targ_emul=arcelf 89 89 targ_extra_emuls="arcelf_prof arclinux arclinux_nps arclinux_prof arcv2elf arcv2elfx" 90 - ;; 90 + ;; 91 91 arc*-*-linux*) case "${with_cpu}" in 92 92 nps400) targ_emul=arclinux_nps 93 93 targ_extra_emuls=arclinux ··· 110 110 arm*b-*-freebsd*) targ_emul=armelfb_fbsd 111 111 targ_extra_emuls="armelf_fbsd armelf" ;; 112 112 arm*-*-freebsd* | arm-*-kfreebsd*-gnu) 113 - targ_emul=armelf_fbsd 113 + targ_emul=armelf_fbsd 114 114 targ_extra_emuls="armelfb_fbsd armelf" ;; 115 115 armeb-*-netbsdelf*) targ_emul=armelfb_nbsd; 116 116 targ_extra_emuls="armelf_nbsd armelf armnbsd" ;; 117 117 arm-*-netbsdelf*) targ_emul=armelf_nbsd; 118 118 targ_extra_emuls="armelfb_nbsd armelf armnbsd" ;; 119 119 arm-*-netbsd*) targ_emul=armnbsd; 120 - targ_extra_emuls="armelf armelf_nbsd armelfb_nbsd" ;; 120 + targ_extra_emuls="armelf armelf_nbsd armelfb_nbsd" ;; 121 121 arm-*-nto*) targ_emul=armnto ;; 122 122 arm-*-openbsd*) targ_emul=armnbsd ;; 123 123 arm-*-phoenix*) targ_emul=armelf ;; 124 124 armeb-*-elf | armeb-*-eabi*) 125 125 targ_emul=armelfb ;; 126 126 arm-*-elf | arm*-*-eabi* | arm-*-rtems*) 127 - targ_emul=armelf ;; 128 - arm*-*-symbianelf*) targ_emul=armsymbian;; 127 + targ_emul=armelf ;; 128 + arm*-*-symbianelf*) targ_emul=armsymbian;; 129 129 arm-*-kaos*) targ_emul=armelf ;; 130 130 arm9e-*-elf) targ_emul=armelf ;; 131 131 arm*b-*-linux-*eabi*) targ_emul=armelfb_linux_eabi ··· 140 140 targ_extra_emuls=armelfb_linux_eabi 141 141 targ_extra_libpath=$targ_extra_emuls 142 142 ;; 143 - arm*-*-linux-*) targ_emul=armelf_linux 143 + arm*-*-linux-*) targ_emul=armelf_linux 144 144 targ_extra_emuls="armelf armelfb armelfb_linux" 145 145 targ_extra_libpath="armelfb_linux" 146 146 ;; ··· 185 185 targ_extra_emuls="elf32bfin" 186 186 targ_extra_libpath=$targ_extra_emuls 187 187 ;; 188 - cr16-*-elf*) targ_emul=elf32cr16 ;; 189 - cr16c-*-elf*) targ_emul=elf32cr16c 188 + cr16-*-elf*) targ_emul=elf32cr16 ;; 189 + cr16c-*-elf*) targ_emul=elf32cr16c 190 190 ;; 191 191 cris-*-*aout*) targ_emul=crisaout 192 192 targ_extra_emuls="criself crislinux" ··· 284 284 tdir_i386linux=`echo ${targ_alias}aout | sed -e 's/x86_64/i386/'` 285 285 tdir_elf_i386=`echo ${targ_alias} | sed -e 's/x86_64/i386/'` ;; 286 286 i[3-7]86-*-redox*) targ_emul=elf_i386 287 - targ_extra_emuls=elf_x86_64 ;; 287 + targ_extra_emuls=elf_x86_64 ;; 288 288 x86_64-*-redox*) targ_emul=elf_x86_64 289 289 targ_extra_emuls=elf_i386 ;; 290 290 i[3-7]86-*-sysv[45]*) targ_emul=elf_i386 291 291 targ_extra_emuls=elf_iamcu ;; 292 292 i[3-7]86-*-solaris2*) targ_emul=elf_i386_sol2 293 - targ_extra_emuls="elf_i386_ldso elf_i386 elf_iamcu elf_x86_64_sol2 elf_x86_64 elf_l1om elf_k1om" 293 + targ_extra_emuls="elf_i386_ldso elf_i386 elf_iamcu elf_x86_64_sol2 elf_x86_64 elf_l1om elf_k1om" 294 294 targ_extra_libpath=$targ_extra_emuls 295 - ;; 295 + ;; 296 296 x86_64-*-solaris2*) 297 297 targ_emul=elf_x86_64_sol2 298 298 targ_extra_emuls="elf_x86_64 elf_i386_sol2 elf_i386_ldso elf_i386 elf_iamcu elf_l1om elf_k1om" ··· 301 301 i[3-7]86-*-unixware) targ_emul=elf_i386 302 302 targ_extra_emuls=elf_iamcu ;; 303 303 i[3-7]86-*-solaris*) targ_emul=elf_i386_ldso 304 - targ_extra_emuls="elf_i386" 304 + targ_extra_emuls="elf_i386" 305 305 targ_extra_libpath=$targ_extra_emuls 306 - ;; 306 + ;; 307 307 i[3-7]86-*-netbsdelf* | \ 308 308 i[3-7]86-*-netbsd*-gnu* | \ 309 309 i[3-7]86-*-knetbsd*-gnu) ··· 320 320 case "${tdir_elf_iamcu}" in 321 321 *-netbsdelf*) ;; 322 322 *) tdir_elf_iamcu=`echo ${tdir_elf_iamcu} | \ 323 - sed -e 's/netbsd/netbsdelf/'`;; 323 + sed -e 's/netbsd/netbsdelf/'`;; 324 324 esac 325 325 tdir_elf_i386=`echo ${targ_alias} | \ 326 326 sed -e 's/x86_64/i386/'` 327 327 case "${tdir_elf_i386}" in 328 328 *-netbsdelf*) ;; 329 329 *) tdir_elf_i386=`echo ${tdir_elf_i386} | \ 330 - sed -e 's/netbsd/netbsdelf/'`;; 330 + sed -e 's/netbsd/netbsdelf/'`;; 331 331 esac ;; 332 332 i[3-7]86-*-netware) targ_emul=i386nw ;; 333 333 i[3-7]86-*-elfiamcu) targ_emul=elf_iamcu ··· 349 349 x86_64-*-dragonfly*) targ_emul=elf_x86_64 350 350 targ_extra_emuls="elf_i386 elf_iamcu elf_l1om elf_k1om" ;; 351 351 i[3-7]86-*-freebsd* | i[3-7]86-*-kfreebsd*-gnu) 352 - targ_emul=elf_i386_fbsd 352 + targ_emul=elf_i386_fbsd 353 353 targ_extra_emuls="elf_i386 elf_iamcu i386bsd" ;; 354 354 x86_64-*-freebsd* | x86_64-*-kfreebsd*-gnu) 355 355 targ_emul=elf_x86_64_fbsd ··· 388 388 targ_extra_emuls=i386pe 389 389 targ_extra_ofiles="deffilep.o pep-dll.o pe-dll.o" ;; 390 390 i[3-7]86-*-interix*) targ_emul=i386pe_posix; 391 - targ_extra_ofiles="deffilep.o pe-dll.o" ;; 391 + targ_extra_ofiles="deffilep.o pe-dll.o" ;; 392 392 i[3-7]86-*-beospe*) targ_emul=i386beos ;; 393 393 i[3-7]86-*-beos*) targ_emul=elf_i386_be ;; 394 394 i[3-7]86-*-vxworks*) targ_emul=elf_i386_vxworks ;; ··· 419 419 ia16-*-elf*) targ_emul=elf_i386 targ_extra_emuls=i386msdos ;; 420 420 ia64-*-elf*) targ_emul=elf64_ia64 ;; 421 421 ia64-*-freebsd* | ia64-*-kfreebsd*-gnu) 422 - targ_emul=elf64_ia64_fbsd 422 + targ_emul=elf64_ia64_fbsd 423 423 targ_extra_emuls="elf64_ia64" ;; 424 424 ia64-*-netbsd*) targ_emul=elf64_ia64 ;; 425 425 ia64-*-linux*) targ_emul=elf64_ia64 ;; ··· 428 428 ;; 429 429 ip2k-*-elf) targ_emul=elf32ip2k 430 430 ;; 431 - iq2000-*-elf) targ_emul=elf32iq2000 ; targ_extra_emuls="elf32iq10" 431 + iq2000-*-elf) targ_emul=elf32iq2000 ; targ_extra_emuls="elf32iq10" 432 432 ;; 433 - lm32-*-*linux*) targ_emul=elf32lm32fd ;; 434 - lm32-*-*) targ_emul=elf32lm32 ; targ_extra_emuls="elf32lm32fd" 435 - ;; 433 + lm32-*-*linux*) targ_emul=elf32lm32fd ;; 434 + lm32-*-*) targ_emul=elf32lm32 ; targ_extra_emuls="elf32lm32fd" 435 + ;; 436 436 m32c-*-elf | m32c-*-rtems*) 437 437 targ_emul=elf32m32c 438 438 ;; 439 - m32r*le-*-elf*) targ_emul=m32rlelf ;; 439 + m32r*le-*-elf*) targ_emul=m32rlelf ;; 440 440 m32r*-*-elf* | m32r*-*-rtems*) 441 441 targ_emul=m32relf ;; 442 - m32r*le-*-linux-*) targ_emul=m32rlelf_linux ;; 443 - m32r*-*-linux-*) targ_emul=m32relf_linux 442 + m32r*le-*-linux-*) targ_emul=m32rlelf_linux ;; 443 + m32r*-*-linux-*) targ_emul=m32relf_linux 444 444 ;; 445 445 m68hc11-*-*|m6811-*-*) targ_emul=m68hc11elf 446 446 targ_extra_emuls="m68hc11elfb m68hc12elf m68hc12elfb" ;; ··· 461 461 m68k-*-linux*aout*) targ_emul=m68klinux 462 462 targ_extra_emuls=m68kelf 463 463 tdir_m68kelf=`echo ${targ_alias} | sed -e 's/aout//'` ;; 464 - m68k-*-linux-*) targ_emul=m68kelf 464 + m68k-*-linux-*) targ_emul=m68kelf 465 465 targ_extra_emuls=m68klinux 466 466 tdir_m68klinux=`echo ${targ_alias} | sed -e 's/linux/linuxaout/'` ;; 467 467 m68k-*-uclinux*) targ_emul=m68kelf ;; ··· 496 496 ;; 497 497 mips*-sgi-irix5*) targ_emul=elf32bsmip ;; 498 498 mips*-sgi-irix6*) targ_emul=elf32bmipn32 499 - targ_extra_emuls="elf32bsmip elf64bmip" 499 + targ_extra_emuls="elf32bsmip elf64bmip" 500 500 targ_extra_libpath=$targ_extra_emuls ;; 501 501 mips*el-*-netbsd*) targ_emul=elf32ltsmip 502 502 targ_extra_emuls="elf32btsmip elf64ltsmip elf64btsmip" 503 503 ;; 504 504 mips*-*-netbsd*) targ_emul=elf32btsmip 505 505 targ_extra_emuls="elf32ltsmip elf64btsmip elf64ltsmip" 506 - ;; 506 + ;; 507 507 mips64el-*-openbsd*) targ_emul=elf64ltsmip 508 508 targ_extra_emuls=elf64btsmip 509 509 ;; ··· 534 534 mips*el-*-vxworks*) targ_emul=elf32elmipvxworks 535 535 targ_extra_emuls="elf32ebmipvxworks" ;; 536 536 mips*-*-vxworks*) targ_emul=elf32ebmipvxworks 537 - targ_extra_emuls="elf32elmipvxworks" ;; 537 + targ_extra_emuls="elf32elmipvxworks" ;; 538 538 mips*-*-windiss) targ_emul=elf32mipswindiss ;; 539 539 mips64*el-*-linux-*) targ_emul=elf32ltsmipn32 540 540 targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip" ··· 564 564 targ_emul=elf32btsmip_fbsd 565 565 targ_extra_emuls="elf32ltsmip elf32btsmip elf32ltsmipn32 elf32btsmipn32 elf64ltsmip elf64btsmip elf32ltsmip_fbsd elf32btsmipn32_fbsd elf32ltsmipn32_fbsd elf64ltsmip_fbsd elf64btsmip_fbsd" 566 566 targ_extra_libpath=$targ_extra_emuls ;; 567 - mips*-*-sysv4*) targ_emul=elf32btsmip 567 + mips*-*-sysv4*) targ_emul=elf32btsmip 568 568 ;; 569 569 mmix-*-*) targ_emul=mmo 570 570 targ_extra_emuls=elf64mmix ··· 573 573 mn10200-*-*) targ_emul=mn10200 ;; 574 574 mn10300-*-*) targ_emul=mn10300 575 575 ;; 576 - mt-*elf) targ_emul=elf32mt 576 + mt-*elf) targ_emul=elf32mt 577 577 ;; 578 - msp430-*-*) targ_emul=msp430elf 578 + msp430-*-*) targ_emul=msp430elf 579 579 targ_extra_emuls="msp430X" 580 580 ;; 581 581 nds32*le-*-elf*) targ_emul=nds32elf ··· 596 596 or1k-*-linux* | or1knd-*-linux*) targ_emul=elf32or1k_linux ;; 597 597 pdp11-*-*) targ_emul=pdp11 598 598 ;; 599 - pjl*-*-*) targ_emul=pjlelf 599 + pjl*-*-*) targ_emul=pjlelf 600 600 targ_extra_emuls="elf_i386 elf_iamcu" ;; 601 - pj*-*-*) targ_emul=pjelf 601 + pj*-*-*) targ_emul=pjelf 602 602 ;; 603 603 powerpc-*-freebsd* | powerpc-*-kfreebsd*-gnu) 604 604 targ_emul=elf32ppc_fbsd ··· 689 689 eval test -n \"\$${td}sim\" || eval ${td}sim="${ta32}" 690 690 eval test -n \"\$${td64}\" || eval ${td64}="${ta64}" 691 691 ;; 692 - powerpc-*-nto*) targ_emul=elf32ppcnto ;; 693 - powerpcle-*-nto*) targ_emul=elf32lppcnto ;; 692 + powerpc-*-nto*) targ_emul=elf32ppcnto ;; 693 + powerpcle-*-nto*) targ_emul=elf32lppcnto ;; 694 694 powerpc-*-macos*) targ_emul=ppcmacos ;; 695 695 powerpc-*-netware*) targ_emul=ppcnw ;; 696 696 powerpcle-*-pe | powerpcle-*-winnt* | powerpcle-*-cygwin*) ··· 713 713 ;; 714 714 rl78-*-*) targ_emul=elf32rl78 ;; 715 715 rx-*-*) targ_emul=elf32rx ;; 716 - s390x-*-linux*) targ_emul=elf64_s390 716 + s390x-*-linux*) targ_emul=elf64_s390 717 717 targ_extra_emuls=elf_s390 718 718 targ_extra_libpath=$targ_extra_emuls 719 719 tdir_elf_s390=`echo ${targ_alias} | sed -e 's/s390x/s390/'` ;; 720 720 s390x-*-tpf*) targ_emul=elf64_s390 721 721 tdir_elf_s390=`echo ${targ_alias} | sed -e 's/s390x/s390/'` ;; 722 - s390-*-linux*) targ_emul=elf_s390 722 + s390-*-linux*) targ_emul=elf_s390 723 723 targ64_extra_emuls=elf64_s390 724 724 targ64_extra_libpath=elf64_s390 725 725 tdir_elf64_s390=`echo ${targ_alias} | sed -e 's/s390/s390x/'` 726 726 ;; 727 - score-*-elf) targ_emul=score7_elf 727 + score-*-elf) targ_emul=score7_elf 728 728 targ_extra_emuls=score3_elf ;; 729 729 sh-*-linux*) targ_emul=shlelf_linux 730 730 targ_extra_emuls="shelf_linux shlelf_fd shelf_fd" ··· 776 776 sparc64-*-aout*) targ_emul=sparcaout ;; 777 777 sparc64-*-elf* | sparc64-*-rtems*) 778 778 targ_emul=elf64_sparc ;; 779 - sparc-sun-sunos4*) targ_emul=sun4 ;; 779 + sparc-sun-sunos4*) targ_emul=sun4 ;; 780 780 sparclite*-*-elf) targ_emul=elf32_sparc ;; 781 781 sparclite*-*-coff) targ_emul=coff_sparc ;; 782 782 sparclite*-fujitsu-*) targ_emul=sparcaout ;; ··· 829 829 spu-*-elf*) targ_emul=elf32_spu ;; 830 830 tic30-*-*aout*) targ_emul=tic30aout ;; 831 831 tic30-*-*coff*) targ_emul=tic30coff ;; 832 - tic4x-*-* | c4x-*-*) targ_emul=tic4xcoff ; targ_extra_emuls="tic3xcoff tic3xcoff_onchip" ;; 832 + tic4x-*-* | c4x-*-*) targ_emul=tic4xcoff ; targ_extra_emuls="tic3xcoff tic3xcoff_onchip" ;; 833 833 tic54x-*-* | c54x*-*-*) targ_emul=tic54xcoff ;; 834 834 tic6x-*-elf) targ_emul=elf32_tic6x_elf_le 835 835 targ_extra_emuls="elf32_tic6x_elf_be elf32_tic6x_le elf32_tic6x_be" ··· 859 859 vax-*-netbsdaout* | vax-*-netbsd*) 860 860 targ_emul=vaxnbsd 861 861 targ_extra_emuls=elf32vax ;; 862 - vax-*-linux-*) targ_emul=elf32vax 862 + vax-*-linux-*) targ_emul=elf32vax 863 863 ;; 864 864 visium-*-elf) targ_emul=elf32visium 865 865 ;; 866 866 w65-*-*) targ_emul=w65 867 867 ;; 868 868 xc16x-*-elf) targ_emul=elf32xc16x 869 - targ_extra_emuls="elf32xc16xl elf32xc16xs" 870 - ;; 869 + targ_extra_emuls="elf32xc16xl elf32xc16xs" 870 + ;; 871 871 xstormy16-*-*) targ_emul=elf32xstormy16 872 872 ;; 873 873 xtensa*-*-*) targ_emul=elf32xtensa 874 874 ;; 875 - xgate-*-*) targ_emul=xgateelf 875 + xgate-*-*) targ_emul=xgateelf 876 876 ;; 877 877 z80-*-coff) targ_emul=z80 878 878 ;; 879 - z8k-*-coff) targ_emul=z8002; targ_extra_emuls=z8001 879 + z8k-*-coff) targ_emul=z8002; targ_extra_emuls=z8001 880 880 ;; 881 881 *-*-ieee*) targ_emul=vanilla 882 882 ;;
+36 -36
ld/deffilep.y
··· 193 193 ; 194 194 195 195 impline: 196 - ID '=' ID '.' ID '.' ID opt_equalequal_name 197 - { def_import ($1, $3, $5, $7, -1, $8); } 196 + ID '=' ID '.' ID '.' ID opt_equalequal_name 197 + { def_import ($1, $3, $5, $7, -1, $8); } 198 198 | ID '=' ID '.' ID '.' NUMBER opt_equalequal_name 199 199 { def_import ($1, $3, $5, 0, $7, $8); } 200 200 | ID '=' ID '.' ID opt_equalequal_name 201 - { def_import ($1, $3, 0, $5, -1, $6); } 201 + { def_import ($1, $3, 0, $5, -1, $6); } 202 202 | ID '=' ID '.' NUMBER opt_equalequal_name 203 - { def_import ($1, $3, 0, 0, $5, $6); } 203 + { def_import ($1, $3, 0, 0, $5, $6); } 204 204 | ID '.' ID '.' ID opt_equalequal_name 205 - { def_import( 0, $1, $3, $5, -1, $6); } 205 + { def_import( 0, $1, $3, $5, -1, $6); } 206 206 | ID '.' ID opt_equalequal_name 207 - { def_import ( 0, $1, 0, $3, -1, $4); } 207 + { def_import ( 0, $1, 0, $3, -1, $4); } 208 208 ; 209 209 210 210 seclist: ··· 309 309 ; 310 310 311 311 opt_equal_name: 312 - '=' opt_name2 { $$ = $2; } 313 - | { $$ = 0; } 312 + '=' opt_name2 { $$ = $2; } 313 + | { $$ = 0; } 314 314 ; 315 315 316 316 opt_base: BASE '=' VMA { $$ = $3;} ··· 636 636 if ((e = cmp_export_elem (b, ex_name, in_name, its_name, ord)) <= 0) 637 637 { 638 638 if (!e) 639 - *is_ident = 1; 639 + *is_ident = 1; 640 640 return 0; 641 641 } 642 642 if (max == 1) ··· 655 655 p = (l + r) / 2; 656 656 e = cmp_export_elem (b + p, ex_name, in_name, its_name, ord); 657 657 if (!e) 658 - { 659 - *is_ident = 1; 660 - return p; 661 - } 658 + { 659 + *is_ident = 1; 660 + return p; 661 + } 662 662 else if (e < 0) 663 - r = p - 1; 663 + r = p - 1; 664 664 else if (e > 0) 665 - l = p + 1; 665 + l = p + 1; 666 666 } 667 667 if ((e = cmp_export_elem (b + l, ex_name, in_name, its_name, ord)) > 0) 668 668 ++l; ··· 781 781 if ((e = cmp_import_elem (b, ex_name, in_name, module, ord)) <= 0) 782 782 { 783 783 if (!e) 784 - *is_ident = 1; 784 + *is_ident = 1; 785 785 return 0; 786 786 } 787 787 if (max == 1) ··· 791 791 else if (!e || max == 2) 792 792 { 793 793 if (!e) 794 - *is_ident = 1; 794 + *is_ident = 1; 795 795 return max - 1; 796 796 } 797 797 l = 0; r = max - 1; ··· 800 800 p = (l + r) / 2; 801 801 e = cmp_import_elem (b + p, ex_name, in_name, module, ord); 802 802 if (!e) 803 - { 804 - *is_ident = 1; 805 - return p; 806 - } 803 + { 804 + *is_ident = 1; 805 + return p; 806 + } 807 807 else if (e < 0) 808 - r = p - 1; 808 + r = p - 1; 809 809 else if (e > 0) 810 - l = p + 1; 810 + l = p + 1; 811 811 } 812 812 if ((e = cmp_import_elem (b + l, ex_name, in_name, module, ord)) > 0) 813 813 ++l; ··· 902 902 break; 903 903 904 904 /* Scan forward until we encounter any of: 905 - - the end of the buffer 905 + - the end of the buffer 906 906 - the start of a new option 907 907 - a newline separating options 908 - - a NUL separating options. */ 908 + - a NUL separating options. */ 909 909 for (tend = (char *) (param + 1); 910 910 (tend < pend 911 911 && !(ISSPACE (tend[-1]) && *tend == '-') ··· 981 981 982 982 def->name = xmalloc (strlen (image_name) + strlen (suffix) + 1); 983 983 sprintf (def->name, "%s%s", image_name, suffix); 984 - } 984 + } 985 985 else 986 986 def->name = xstrdup (image_name); 987 987 } ··· 1176 1176 return; 1177 1177 } 1178 1178 if (e > 0) 1179 - break; 1179 + break; 1180 1180 c = (p = c)->next; 1181 1181 } 1182 1182 ··· 1367 1367 1368 1368 if (q == '@') 1369 1369 { 1370 - if (ISBLANK (c) ) /* '@' followed by whitespace. */ 1370 + if (ISBLANK (c) ) /* '@' followed by whitespace. */ 1371 1371 return (q); 1372 - else if (ISDIGIT (c)) /* '@' followed by digit. */ 1373 - { 1372 + else if (ISDIGIT (c)) /* '@' followed by digit. */ 1373 + { 1374 1374 def_ungetc (c); 1375 - return (q); 1375 + return (q); 1376 1376 } 1377 1377 #if TRACE 1378 1378 printf ("lex: @ returns itself\n"); ··· 1388 1388 def_ungetc (c); 1389 1389 if (ISALPHA (q)) /* Check for tokens. */ 1390 1390 { 1391 - for (i = 0; tokens[i].name; i++) 1391 + for (i = 0; tokens[i].name; i++) 1392 1392 if (strcmp (tokens[i].name, buffer) == 0) 1393 1393 { 1394 1394 #if TRACE ··· 1426 1426 { 1427 1427 c = def_getc (); 1428 1428 if (c == '=') 1429 - { 1429 + { 1430 1430 #if TRACE 1431 - printf ("lex: `==' returns EQUAL\n"); 1431 + printf ("lex: `==' returns EQUAL\n"); 1432 1432 #endif 1433 - return EQUAL; 1434 - } 1433 + return EQUAL; 1434 + } 1435 1435 def_ungetc (c); 1436 1436 #if TRACE 1437 1437 printf ("lex: `=' returns itself\n");
+4 -4
ld/emulparams/arc-endianness.sh
··· 3 3 # '*' pattern is for. 4 4 case ${target} in 5 5 arceb-*) 6 - ARC_ENDIAN="big" 7 - ;; 6 + ARC_ENDIAN="big" 7 + ;; 8 8 arc-* | * ) 9 - ARC_ENDIAN="little" 10 - ;; 9 + ARC_ENDIAN="little" 10 + ;; 11 11 esac
+2 -2
ld/emulparams/elf32_x86_64.sh
··· 41 41 x86_64*-linux*|i[3-7]86-*-linux-*) 42 42 case "$EMULATION_NAME" in 43 43 *32*) 44 - LIBPATH_SUFFIX=x32 44 + LIBPATH_SUFFIX=x32 45 45 LIBPATH_SUFFIX_SKIP=64 46 46 ;; 47 47 *64*) 48 - LIBPATH_SUFFIX=64 48 + LIBPATH_SUFFIX=64 49 49 ;; 50 50 esac 51 51 ;;
+1 -1
ld/emulparams/elf64mmix.sh
··· 40 40 OTHER_TEXT_SECTIONS=" 41 41 ${RELOCATING+ 42 42 _start. = (DEFINED (_start) ? _start 43 - : (DEFINED (Main) ? Main : (DEFINED (.text) ? .text : 0))); 43 + : (DEFINED (Main) ? Main : (DEFINED (.text) ? .text : 0))); 44 44 PROVIDE (Main = DEFINED (Main) ? Main : (DEFINED (_start) ? _start : _start.)); 45 45 }" 46 46
+2 -2
ld/emulparams/elf_x86_64.sh
··· 41 41 x86_64*-linux*|i[3-7]86-*-linux-*) 42 42 case "$EMULATION_NAME" in 43 43 *64*) 44 - LIBPATH_SUFFIX=64 44 + LIBPATH_SUFFIX=64 45 45 PARSE_AND_LIST_OPTIONS_BNDPLT=' 46 46 fprintf (file, _("\ 47 47 -z bndplt Always generate BND prefix in PLT entries\n")); ··· 52 52 ' 53 53 PARSE_AND_LIST_OPTIONS="$PARSE_AND_LIST_OPTIONS $PARSE_AND_LIST_OPTIONS_BNDPLT" 54 54 PARSE_AND_LIST_ARGS_CASE_Z="$PARSE_AND_LIST_ARGS_CASE_Z $PARSE_AND_LIST_ARGS_CASE_Z_BNDPLT" 55 - ;; 55 + ;; 56 56 esac 57 57 ;; 58 58 *-*-solaris2*)
+1 -1
ld/emulparams/h8300elf.sh
··· 18 18 TINY_DATA_SECTION=".tinydata ${RELOCATING+0xff8000} : 19 19 { 20 20 *(.tinydata) 21 - ${RELOCATING+ _tinydata = .; } 21 + ${RELOCATING+ _tinydata = .; } 22 22 }" 23 23 TINY_BSS_SECTION=".tinybss : ${RELOCATING+AT (_tinydata)} 24 24 {
+1 -1
ld/emulparams/h8300elf_linux.sh
··· 18 18 TINY_DATA_SECTION=".tinydata ${RELOCATING+0xff8000} : 19 19 { 20 20 *(.tinydata) 21 - ${RELOCATING+ _tinydata = .; } 21 + ${RELOCATING+ _tinydata = .; } 22 22 }" 23 23 TINY_BSS_SECTION=".tinybss : ${RELOCATING+AT (_tinydata)} 24 24 {
+9 -9
ld/emulparams/vxworks.sh
··· 9 9 # be last. The other sections should be sorted, but the current linker script 10 10 # parse does not seem to allow that with the SORT keyword in this context. 11 11 INIT_START='_init = .; 12 - KEEP (*(.init$00)); 13 - KEEP (*(.init$0[1-9])); 14 - KEEP (*(.init$[1-8][0-9])); 15 - KEEP (*(.init$9[0-8]));' 12 + KEEP (*(.init$00)); 13 + KEEP (*(.init$0[1-9])); 14 + KEEP (*(.init$[1-8][0-9])); 15 + KEEP (*(.init$9[0-8]));' 16 16 INIT_END='KEEP (*(.init$99));' 17 17 FINI_START='_fini = .; 18 - KEEP (*(.fini$00)); 19 - KEEP (*(.fini$0[1-9])); 20 - KEEP (*(.fini$[1-8][0-9])); 21 - KEEP (*(.fini$9[0-8]));' 18 + KEEP (*(.fini$00)); 19 + KEEP (*(.fini$0[1-9])); 20 + KEEP (*(.fini$[1-8][0-9])); 21 + KEEP (*(.fini$9[0-8]));' 22 22 FINI_END="KEEP (*(.fini\$99)); 23 - PROVIDE (${SYMPREFIX}_etext = .);" 23 + PROVIDE (${SYMPREFIX}_etext = .);" 24 24 25 25 OTHER_READWRITE_SECTIONS=".tls_data ${RELOCATING-0} : {${RELOCATING+ 26 26 __wrs_rtp_tls_data_start = .;
+7 -7
ld/emultempl/aarch64elf.em
··· 55 55 { 56 56 /* Here we rummage through the found bfds to collect information. */ 57 57 LANG_FOR_EACH_INPUT_STATEMENT (is) 58 - { 59 - /* Initialise mapping tables for code/data. */ 60 - bfd_elf${ELFSIZE}_aarch64_init_maps (is->the_bfd); 61 - } 58 + { 59 + /* Initialise mapping tables for code/data. */ 60 + bfd_elf${ELFSIZE}_aarch64_init_maps (is->the_bfd); 61 + } 62 62 } 63 63 64 64 /* Call the standard elf routine. */ ··· 357 357 PARSE_AND_LIST_PROLOGUE=' 358 358 #define OPTION_NO_ENUM_SIZE_WARNING 309 359 359 #define OPTION_PIC_VENEER 310 360 - #define OPTION_STUBGROUP_SIZE 311 360 + #define OPTION_STUBGROUP_SIZE 311 361 361 #define OPTION_NO_WCHAR_SIZE_WARNING 312 362 362 #define OPTION_FIX_ERRATUM_835769 313 363 363 #define OPTION_FIX_ERRATUM_843419 314 ··· 430 430 { 431 431 const char *end; 432 432 433 - group_size = bfd_scan_vma (optarg, &end, 0); 434 - if (*end) 433 + group_size = bfd_scan_vma (optarg, &end, 0); 434 + if (*end) 435 435 einfo (_("%P%F: invalid number `%s'\''\n"), optarg); 436 436 } 437 437 break;
+7 -7
ld/emultempl/aix.em
··· 345 345 { 346 346 /* Skip empty lines. */ 347 347 while (*b == '\n' || *b == '\r') 348 - b++; 348 + b++; 349 349 350 350 /* Stop if end of buffer. */ 351 351 if (b == buffer + len) 352 - break; 352 + break; 353 353 354 354 /* Eat any byte until end of line. */ 355 355 for (e = b; *e != '\0'; e++) 356 - if (*e == '\n' || *e == '\r') 357 - break; 356 + if (*e == '\n' || *e == '\r') 357 + break; 358 358 359 359 /* Replace end of line by nul. */ 360 360 if (*e != '\0') 361 - *e++ = '\0'; 361 + *e++ = '\0'; 362 362 363 363 if (b != e) 364 - lang_add_input_file (b, lang_input_file_is_search_file_enum, NULL); 364 + lang_add_input_file (b, lang_input_file_is_search_file_enum, NULL); 365 365 b = e; 366 366 } 367 367 return; ··· 388 388 389 389 case 'f': 390 390 /* This overrides --auxiliary. This option specifies a file containing 391 - a list of input files. */ 391 + a list of input files. */ 392 392 read_file_list (optarg); 393 393 break; 394 394
+20 -20
ld/emultempl/armelf.em
··· 101 101 /* Here we rummage through the found bfds to collect glue information. */ 102 102 LANG_FOR_EACH_INPUT_STATEMENT (is) 103 103 { 104 - /* Initialise mapping tables for code/data. */ 105 - bfd_elf32_arm_init_maps (is->the_bfd); 104 + /* Initialise mapping tables for code/data. */ 105 + bfd_elf32_arm_init_maps (is->the_bfd); 106 106 107 107 if (!bfd_elf32_arm_process_before_allocation (is->the_bfd, 108 108 &link_info) ··· 422 422 { 423 423 LANG_FOR_EACH_INPUT_STATEMENT (is) 424 424 { 425 - /* Figure out where VFP11 erratum veneers (and the labels returning 426 - from same) have been placed. */ 427 - bfd_elf32_arm_vfp11_fix_veneer_locations (is->the_bfd, &link_info); 425 + /* Figure out where VFP11 erratum veneers (and the labels returning 426 + from same) have been placed. */ 427 + bfd_elf32_arm_vfp11_fix_veneer_locations (is->the_bfd, &link_info); 428 428 429 429 /* Figure out where STM32L4XX erratum veneers (and the labels returning 430 430 from them) have been placed. */ ··· 531 531 bfd_elf32_arm_set_target_params (link_info.output_bfd, &link_info, &params); 532 532 533 533 stub_file = lang_add_input_file ("linker stubs", 534 - lang_input_file_is_fake_enum, 535 - NULL); 534 + lang_input_file_is_fake_enum, 535 + NULL); 536 536 stub_file->the_bfd = bfd_create ("linker stubs", link_info.output_bfd); 537 537 if (stub_file->the_bfd == NULL 538 538 || ! bfd_set_arch_mach (stub_file->the_bfd, 539 - bfd_get_arch (link_info.output_bfd), 540 - bfd_get_mach (link_info.output_bfd))) 539 + bfd_get_arch (link_info.output_bfd), 540 + bfd_get_mach (link_info.output_bfd))) 541 541 { 542 542 einfo (_("%X%P: can not create BFD %E\n")); 543 543 return; ··· 704 704 705 705 case OPTION_VFP11_DENORM_FIX: 706 706 if (strcmp (optarg, "none") == 0) 707 - params.vfp11_denorm_fix = BFD_ARM_VFP11_FIX_NONE; 707 + params.vfp11_denorm_fix = BFD_ARM_VFP11_FIX_NONE; 708 708 else if (strcmp (optarg, "scalar") == 0) 709 - params.vfp11_denorm_fix = BFD_ARM_VFP11_FIX_SCALAR; 709 + params.vfp11_denorm_fix = BFD_ARM_VFP11_FIX_SCALAR; 710 710 else if (strcmp (optarg, "vector") == 0) 711 - params.vfp11_denorm_fix = BFD_ARM_VFP11_FIX_VECTOR; 711 + params.vfp11_denorm_fix = BFD_ARM_VFP11_FIX_VECTOR; 712 712 else 713 - einfo (_("Unrecognized VFP11 fix type '\''%s'\''.\n"), optarg); 713 + einfo (_("Unrecognized VFP11 fix type '\''%s'\''.\n"), optarg); 714 714 break; 715 715 716 716 case OPTION_STM32L4XX_FIX: 717 717 if (!optarg) 718 - params.stm32l4xx_fix = BFD_ARM_STM32L4XX_FIX_DEFAULT; 718 + params.stm32l4xx_fix = BFD_ARM_STM32L4XX_FIX_DEFAULT; 719 719 else if (strcmp (optarg, "none") == 0) 720 - params.stm32l4xx_fix = BFD_ARM_STM32L4XX_FIX_NONE; 720 + params.stm32l4xx_fix = BFD_ARM_STM32L4XX_FIX_NONE; 721 721 else if (strcmp (optarg, "default") == 0) 722 - params.stm32l4xx_fix = BFD_ARM_STM32L4XX_FIX_DEFAULT; 722 + params.stm32l4xx_fix = BFD_ARM_STM32L4XX_FIX_DEFAULT; 723 723 else if (strcmp (optarg, "all") == 0) 724 - params.stm32l4xx_fix = BFD_ARM_STM32L4XX_FIX_ALL; 724 + params.stm32l4xx_fix = BFD_ARM_STM32L4XX_FIX_ALL; 725 725 else 726 - einfo (_("Unrecognized STM32L4XX fix type '\''%s'\''.\n"), optarg); 726 + einfo (_("Unrecognized STM32L4XX fix type '\''%s'\''.\n"), optarg); 727 727 break; 728 728 729 729 case OPTION_NO_ENUM_SIZE_WARNING: ··· 742 742 { 743 743 const char *end; 744 744 745 - group_size = bfd_scan_vma (optarg, &end, 0); 746 - if (*end) 745 + group_size = bfd_scan_vma (optarg, &end, 0); 746 + if (*end) 747 747 einfo (_("%P%F: invalid number `%s'\''\n"), optarg); 748 748 } 749 749 break;
+44 -44
ld/emultempl/avrelf.em
··· 51 51 avr_elf_set_global_bfd_parameters (void) 52 52 { 53 53 elf32_avr_setup_params (& link_info, 54 - stub_file->the_bfd, 55 - avr_stub_section, 56 - avr_no_stubs, 57 - avr_debug_stubs, 58 - avr_debug_relax, 59 - avr_pc_wrap_around, 60 - avr_replace_call_ret_sequences); 54 + stub_file->the_bfd, 55 + avr_stub_section, 56 + avr_no_stubs, 57 + avr_debug_stubs, 58 + avr_debug_relax, 59 + avr_pc_wrap_around, 60 + avr_replace_call_ret_sequences); 61 61 } 62 62 63 63 ··· 122 122 } 123 123 124 124 stub_file = lang_add_input_file ("linker stubs", 125 - lang_input_file_is_fake_enum, 126 - NULL); 125 + lang_input_file_is_fake_enum, 126 + NULL); 127 127 128 128 stub_file->the_bfd = bfd_create ("linker stubs", link_info.output_bfd); 129 129 if (stub_file->the_bfd == NULL 130 130 || !bfd_set_arch_mach (stub_file->the_bfd, 131 - bfd_get_arch (link_info.output_bfd), 132 - bfd_get_mach (link_info.output_bfd))) 131 + bfd_get_arch (link_info.output_bfd), 132 + bfd_get_mach (link_info.output_bfd))) 133 133 { 134 134 einfo (_("%X%P: can not create stub BFD %E\n")); 135 135 return; ··· 138 138 /* Now we add the stub section. */ 139 139 140 140 flags = (SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_CODE 141 - | SEC_HAS_CONTENTS | SEC_RELOC | SEC_IN_MEMORY | SEC_KEEP); 141 + | SEC_HAS_CONTENTS | SEC_RELOC | SEC_IN_MEMORY | SEC_KEEP); 142 142 avr_stub_section = bfd_make_section_anyway_with_flags (stub_file->the_bfd, 143 143 ".trampolines", 144 144 flags); ··· 151 151 152 152 return; 153 153 154 - err_ret: 155 - einfo (_("%X%P: can not make stub section: %E\n")); 156 - return; 154 + err_ret: 155 + einfo (_("%X%P: can not make stub section: %E\n")); 156 + return; 157 157 } 158 158 159 159 /* Re-calculates the size of the stubs so that we won't waste space. */ ··· 199 199 { 200 200 avr_link_relax = TRUE; 201 201 for (abfd = link_info.input_bfds; abfd != NULL; abfd = abfd->link.next) 202 - { 203 - /* Don't let the linker stubs prevent the final object being 204 - marked as link-relax ready. */ 205 - if ((elf_elfheader (abfd)->e_flags 206 - & EF_AVR_LINKRELAX_PREPARED) == 0 207 - && abfd != stub_file->the_bfd) 208 - { 209 - avr_link_relax = FALSE; 210 - break; 211 - } 212 - } 202 + { 203 + /* Don't let the linker stubs prevent the final object being 204 + marked as link-relax ready. */ 205 + if ((elf_elfheader (abfd)->e_flags 206 + & EF_AVR_LINKRELAX_PREPARED) == 0 207 + && abfd != stub_file->the_bfd) 208 + { 209 + avr_link_relax = FALSE; 210 + break; 211 + } 212 + } 213 213 } 214 214 else 215 215 { ··· 234 234 PARSE_AND_LIST_PROLOGUE=' 235 235 236 236 #define OPTION_NO_CALL_RET_REPLACEMENT 301 237 - #define OPTION_PMEM_WRAP_AROUND 302 238 - #define OPTION_NO_STUBS 303 239 - #define OPTION_DEBUG_STUBS 304 240 - #define OPTION_DEBUG_RELAX 305 237 + #define OPTION_PMEM_WRAP_AROUND 302 238 + #define OPTION_NO_STUBS 303 239 + #define OPTION_DEBUG_STUBS 304 240 + #define OPTION_DEBUG_RELAX 305 241 241 ' 242 242 243 243 PARSE_AND_LIST_LONGOPTS=' 244 244 { "no-call-ret-replacement", no_argument, 245 - NULL, OPTION_NO_CALL_RET_REPLACEMENT}, 245 + NULL, OPTION_NO_CALL_RET_REPLACEMENT}, 246 246 { "pmem-wrap-around", required_argument, 247 247 NULL, OPTION_PMEM_WRAP_AROUND}, 248 248 { "no-stubs", no_argument, ··· 286 286 287 287 case OPTION_PMEM_WRAP_AROUND: 288 288 { 289 - /* This variable is defined in the bfd library. */ 290 - if ((!strcmp (optarg,"32k")) || (!strcmp (optarg,"32K"))) 291 - avr_pc_wrap_around = 32768; 292 - else if ((!strcmp (optarg,"8k")) || (!strcmp (optarg,"8K"))) 293 - avr_pc_wrap_around = 8192; 294 - else if ((!strcmp (optarg,"16k")) || (!strcmp (optarg,"16K"))) 295 - avr_pc_wrap_around = 16384; 296 - else if ((!strcmp (optarg,"64k")) || (!strcmp (optarg,"64K"))) 297 - avr_pc_wrap_around = 0x10000; 298 - else 299 - return FALSE; 289 + /* This variable is defined in the bfd library. */ 290 + if ((!strcmp (optarg,"32k")) || (!strcmp (optarg,"32K"))) 291 + avr_pc_wrap_around = 32768; 292 + else if ((!strcmp (optarg,"8k")) || (!strcmp (optarg,"8K"))) 293 + avr_pc_wrap_around = 8192; 294 + else if ((!strcmp (optarg,"16k")) || (!strcmp (optarg,"16K"))) 295 + avr_pc_wrap_around = 16384; 296 + else if ((!strcmp (optarg,"64k")) || (!strcmp (optarg,"64K"))) 297 + avr_pc_wrap_around = 0x10000; 298 + else 299 + return FALSE; 300 300 } 301 301 break; 302 302 ··· 314 314 315 315 case OPTION_NO_CALL_RET_REPLACEMENT: 316 316 { 317 - /* This variable is defined in the bfd library. */ 318 - avr_replace_call_ret_sequences = FALSE; 317 + /* This variable is defined in the bfd library. */ 318 + avr_replace_call_ret_sequences = FALSE; 319 319 } 320 320 break; 321 321 '
+2 -2
ld/emultempl/beos.em
··· 81 81 #define OPTION_MINOR_OS_VERSION (OPTION_MINOR_IMAGE_VERSION + 1) 82 82 #define OPTION_MINOR_SUBSYSTEM_VERSION (OPTION_MINOR_OS_VERSION + 1) 83 83 #define OPTION_SECTION_ALIGNMENT (OPTION_MINOR_SUBSYSTEM_VERSION + 1) 84 - #define OPTION_STACK (OPTION_SECTION_ALIGNMENT + 1) 85 - #define OPTION_SUBSYSTEM (OPTION_STACK + 1) 84 + #define OPTION_STACK (OPTION_SECTION_ALIGNMENT + 1) 85 + #define OPTION_SUBSYSTEM (OPTION_STACK + 1) 86 86 #define OPTION_HEAP (OPTION_SUBSYSTEM + 1) 87 87 88 88 static void
+3 -3
ld/emultempl/hppaelf.em
··· 55 55 56 56 /* Enable this once we split millicode stuff from libgcc: 57 57 lang_add_input_file ("milli", 58 - lang_input_file_is_l_enum, 58 + lang_input_file_is_l_enum, 59 59 NULL); 60 60 */ 61 61 ··· 370 370 case OPTION_STUBGROUP_SIZE: 371 371 { 372 372 const char *end; 373 - group_size = bfd_scan_vma (optarg, &end, 0); 374 - if (*end) 373 + group_size = bfd_scan_vma (optarg, &end, 0); 374 + if (*end) 375 375 einfo (_("%P%F: invalid number `%s'\''\n"), optarg); 376 376 } 377 377 break;
+8 -8
ld/emultempl/m68kcoff.em
··· 72 72 asection *datasec; 73 73 74 74 /* As first-order business, make sure that each input BFD is COFF. It 75 - better be, as we are directly calling a COFF backend function. */ 75 + better be, as we are directly calling a COFF backend function. */ 76 76 if (bfd_get_flavour (abfd) != bfd_target_coff_flavour) 77 77 einfo (_("%F%B: all input objects must be COFF " 78 78 "for --embedded-relocs\n")); ··· 80 80 datasec = bfd_get_section_by_name (abfd, ".data"); 81 81 82 82 /* Note that we assume that the reloc_count field has already 83 - been set up. We could call bfd_get_reloc_upper_bound, but 84 - that returns the size of a memory buffer rather than a reloc 85 - count. We do not want to call bfd_canonicalize_reloc, 86 - because although it would always work it would force us to 87 - read in the relocs into BFD canonical form, which would waste 88 - a significant amount of time and memory. */ 83 + been set up. We could call bfd_get_reloc_upper_bound, but 84 + that returns the size of a memory buffer rather than a reloc 85 + count. We do not want to call bfd_canonicalize_reloc, 86 + because although it would always work it would force us to 87 + read in the relocs into BFD canonical form, which would waste 88 + a significant amount of time and memory. */ 89 89 if (datasec != NULL && datasec->reloc_count > 0) 90 90 { 91 91 asection *relsec; ··· 103 103 } 104 104 105 105 /* Double check that all other data sections are empty, as is 106 - required for embedded PIC code. */ 106 + required for embedded PIC code. */ 107 107 bfd_map_over_sections (abfd, check_sections, datasec); 108 108 } 109 109 }
+5 -5
ld/emultempl/m68kelf.em
··· 235 235 PARSE_AND_LIST_ARGS_CASES=' 236 236 case OPTION_GOT: 237 237 if (strcmp (optarg, "target") == 0) 238 - got_handling = GOT_HANDLING_TARGET_DEFAULT; 238 + got_handling = GOT_HANDLING_TARGET_DEFAULT; 239 239 else if (strcmp (optarg, "single") == 0) 240 - got_handling = 0; 240 + got_handling = 0; 241 241 else if (strcmp (optarg, "negative") == 0) 242 - got_handling = 1; 242 + got_handling = 1; 243 243 else if (strcmp (optarg, "multigot") == 0) 244 - got_handling = 2; 244 + got_handling = 2; 245 245 else 246 - einfo (_("Unrecognized --got argument '\''%s'\''.\n"), optarg); 246 + einfo (_("Unrecognized --got argument '\''%s'\''.\n"), optarg); 247 247 break; 248 248 ' 249 249
+2 -2
ld/emultempl/metagelf.em
··· 328 328 case OPTION_STUBGROUP_SIZE: 329 329 { 330 330 const char *end; 331 - group_size = bfd_scan_vma (optarg, &end, 0); 332 - if (*end) 331 + group_size = bfd_scan_vma (optarg, &end, 0); 332 + if (*end) 333 333 einfo (_("%P%F: invalid number `%s'\''\n"), optarg); 334 334 } 335 335 break;
+4 -4
ld/emultempl/msp430.em
··· 7 7 Copyright (C) 2014-2017 Free Software Foundation, Inc. 8 8 Written by Steve Chamberlain steve@cygnus.com 9 9 Extended for the MSP430 by Nick Clifton nickc@redhat.com 10 - 10 + 11 11 This file is part of the GNU Binutils. 12 12 13 13 This program is free software; you can redistribute it and/or modify ··· 197 197 break; 198 198 199 199 case lang_wild_statement_enum: 200 - amount += scan_children (l->wild_statement.children.head); 200 + amount += scan_children (l->wild_statement.children.head); 201 201 break; 202 202 203 203 case lang_data_statement_enum: ··· 214 214 215 215 return amount; 216 216 } 217 - 217 + 218 218 /* Place an orphan section. We use this to put .either sections 219 219 into either their lower or their upper equivalents. */ 220 220 ··· 258 258 } 259 259 else 260 260 name = (char *) secname; 261 - 261 + 262 262 lower_name = concat (".lower", name, NULL); 263 263 upper_name = concat (".upper", name, NULL); 264 264
+1 -1
ld/emultempl/nds32elf.em
··· 195 195 { 196 196 /* Initialize ex9 hash table. */ 197 197 if (!nds32_elf_ex9_init ()) 198 - return; 198 + return; 199 199 } 200 200 201 201 /* Call default after allocation callback.
+31 -31
ld/emultempl/pe.em
··· 242 242 (OPTION_EXCLUDE_LIBS + 1) 243 243 #define OPTION_DLL_DISABLE_RUNTIME_PSEUDO_RELOC \ 244 244 (OPTION_DLL_ENABLE_RUNTIME_PSEUDO_RELOC + 1) 245 - #define OPTION_LARGE_ADDRESS_AWARE (OPTION_DLL_DISABLE_RUNTIME_PSEUDO_RELOC + 1) 245 + #define OPTION_LARGE_ADDRESS_AWARE (OPTION_DLL_DISABLE_RUNTIME_PSEUDO_RELOC + 1) 246 246 #define OPTION_DISABLE_LARGE_ADDRESS_AWARE \ 247 - (OPTION_LARGE_ADDRESS_AWARE + 1) 247 + (OPTION_LARGE_ADDRESS_AWARE + 1) 248 248 #define OPTION_DLL_ENABLE_RUNTIME_PSEUDO_RELOC_V1 \ 249 249 (OPTION_DISABLE_LARGE_ADDRESS_AWARE + 1) 250 250 #define OPTION_DLL_ENABLE_RUNTIME_PSEUDO_RELOC_V2 \ ··· 253 253 (OPTION_DLL_ENABLE_RUNTIME_PSEUDO_RELOC_V2 + 1) 254 254 #define OPTION_USE_NUL_PREFIXED_IMPORT_TABLES \ 255 255 (OPTION_EXCLUDE_MODULES_FOR_IMPLIB + 1) 256 - #define OPTION_NO_LEADING_UNDERSCORE (OPTION_USE_NUL_PREFIXED_IMPORT_TABLES + 1) 257 - #define OPTION_LEADING_UNDERSCORE (OPTION_NO_LEADING_UNDERSCORE + 1) 256 + #define OPTION_NO_LEADING_UNDERSCORE (OPTION_USE_NUL_PREFIXED_IMPORT_TABLES + 1) 257 + #define OPTION_LEADING_UNDERSCORE (OPTION_NO_LEADING_UNDERSCORE + 1) 258 258 #define OPTION_ENABLE_LONG_SECTION_NAMES \ 259 259 (OPTION_LEADING_UNDERSCORE + 1) 260 260 #define OPTION_DISABLE_LONG_SECTION_NAMES \ ··· 531 531 int i; 532 532 533 533 static const struct 534 - { 535 - const int value; 536 - const char *entry; 537 - } 534 + { 535 + const int value; 536 + const char *entry; 537 + } 538 538 v[] = 539 539 { 540 540 { 1, "NtProcessStartup" }, ··· 560 560 else 561 561 { 562 562 for (i = 0; v[i].entry; i++) 563 - if (v[i].value == pe_subsystem) 564 - break; 563 + if (v[i].value == pe_subsystem) 564 + break; 565 565 566 566 /* If no match, use the default. */ 567 567 if (v[i].entry != NULL) 568 - entry = v[i].entry; 568 + entry = v[i].entry; 569 569 else 570 - entry = default_entry; 570 + entry = default_entry; 571 571 } 572 572 573 573 initial_symbol_char = (is_underscoring () != 0 ? "_" : ""); ··· 1109 1109 1110 1110 if (lead_at) 1111 1111 *cname = '_'; 1112 - if (at) 1112 + if (at) 1113 1113 * strchr (cname, '@') = 0; 1114 1114 sym = bfd_link_hash_lookup (link_info.hash, cname, FALSE, FALSE, TRUE); 1115 1115 ··· 1290 1290 1291 1291 status = bfd_bread (&b, (bfd_size_type) 1, abfd); 1292 1292 if (status < 1) 1293 - { 1294 - break; 1295 - } 1293 + { 1294 + break; 1295 + } 1296 1296 1297 1297 (*process) (&b, 1, arg); 1298 1298 filepos += 1; ··· 1317 1317 { 1318 1318 struct bfd_link_order *l = NULL; 1319 1319 for (l = asec->map_head.link_order; l != NULL; l = l->next) 1320 - { 1321 - if (l->type == bfd_indirect_link_order) 1322 - { 1323 - if (l->u.indirect.section == t->build_id.sec) 1324 - { 1325 - link_order = l; 1326 - break; 1327 - } 1328 - } 1329 - } 1320 + { 1321 + if (l->type == bfd_indirect_link_order) 1322 + { 1323 + if (l->u.indirect.section == t->build_id.sec) 1324 + { 1325 + link_order = l; 1326 + break; 1327 + } 1328 + } 1329 + } 1330 1330 1331 1331 if (link_order) 1332 - break; 1332 + break; 1333 1333 } 1334 1334 1335 1335 if (!link_order) 1336 1336 { 1337 1337 einfo (_("%P: warning: .buildid section discarded," 1338 - " --build-id ignored.\n")); 1338 + " --build-id ignored.\n")); 1339 1339 return TRUE; 1340 1340 } 1341 1341 ··· 1947 1947 struct bfd_link_hash_entry *h; 1948 1948 1949 1949 sprintf (buf, "%s%s", U (""), 1950 - pe_def_file->exports[i].internal_name); 1950 + pe_def_file->exports[i].internal_name); 1951 1951 1952 1952 h = bfd_link_hash_lookup (link_info.hash, buf, TRUE, TRUE, TRUE); 1953 1953 if (h == (struct bfd_link_hash_entry *) NULL) ··· 2342 2342 /* Alternate explicit import library for dll's. */ 2343 2343 { "%s.dll.a", FALSE }, 2344 2344 /* "libfoo.a" could be either an import lib or a static lib. 2345 - For backwards compatibility, libfoo.a needs to precede 2346 - libfoo.dll and foo.dll in the search. */ 2345 + For backwards compatibility, libfoo.a needs to precede 2346 + libfoo.dll and foo.dll in the search. */ 2347 2347 { "lib%s.a", FALSE }, 2348 2348 /* The 'native' spelling of an import lib name is "foo.lib". */ 2349 2349 { "%s.lib", FALSE },
+25 -25
ld/emultempl/pep.em
··· 493 493 int i; 494 494 495 495 static const struct 496 - { 497 - const int value; 498 - const char *entry; 499 - } 496 + { 497 + const int value; 498 + const char *entry; 499 + } 500 500 v[] = 501 501 { 502 502 { 1, "NtProcessStartup" }, ··· 518 518 else 519 519 { 520 520 for (i = 0; v[i].entry; i++) 521 - if (v[i].value == pep_subsystem) 522 - break; 521 + if (v[i].value == pep_subsystem) 522 + break; 523 523 524 524 /* If no match, use the default. */ 525 525 if (v[i].entry != NULL) 526 - entry = v[i].entry; 526 + entry = v[i].entry; 527 527 else 528 - entry = default_entry; 528 + entry = default_entry; 529 529 } 530 530 531 531 /* Now we check target's default for getting proper symbol_char. */ ··· 1257 1257 1258 1258 status = bfd_bread (&b, (bfd_size_type) 1, abfd); 1259 1259 if (status < 1) 1260 - { 1261 - break; 1262 - } 1260 + { 1261 + break; 1262 + } 1263 1263 1264 1264 (*process) (&b, 1, arg); 1265 1265 filepos += 1; ··· 1284 1284 { 1285 1285 struct bfd_link_order *l = NULL; 1286 1286 for (l = asec->map_head.link_order; l != NULL; l = l->next) 1287 - { 1288 - if (l->type == bfd_indirect_link_order) 1289 - { 1290 - if (l->u.indirect.section == t->build_id.sec) 1291 - { 1292 - link_order = l; 1293 - break; 1294 - } 1295 - } 1296 - } 1287 + { 1288 + if (l->type == bfd_indirect_link_order) 1289 + { 1290 + if (l->u.indirect.section == t->build_id.sec) 1291 + { 1292 + link_order = l; 1293 + break; 1294 + } 1295 + } 1296 + } 1297 1297 1298 1298 if (link_order) 1299 - break; 1299 + break; 1300 1300 } 1301 1301 1302 1302 if (!link_order) 1303 1303 { 1304 1304 einfo (_("%P: warning: .buildid section discarded," 1305 - " --build-id ignored.\n")); 1305 + " --build-id ignored.\n")); 1306 1306 return TRUE; 1307 1307 } 1308 1308 ··· 2115 2115 /* Alternate explicit import library for dll's. */ 2116 2116 { "%s.dll.a", FALSE }, 2117 2117 /* "libfoo.a" could be either an import lib or a static lib. 2118 - For backwards compatibility, libfoo.a needs to precede 2119 - libfoo.dll and foo.dll in the search. */ 2118 + For backwards compatibility, libfoo.a needs to precede 2119 + libfoo.dll and foo.dll in the search. */ 2120 2120 { "lib%s.a", FALSE }, 2121 2121 /* The 'native' spelling of an import lib name is "foo.lib". */ 2122 2122 { "%s.lib", FALSE },
+2 -2
ld/emultempl/ppc64elf.em
··· 826 826 case OPTION_STUBGROUP_SIZE: 827 827 { 828 828 const char *end; 829 - params.group_size = bfd_scan_vma (optarg, &end, 0); 830 - if (*end) 829 + params.group_size = bfd_scan_vma (optarg, &end, 0); 830 + if (*end) 831 831 einfo (_("%P%F: invalid number `%s'\''\n"), optarg); 832 832 } 833 833 break;
+2 -2
ld/emultempl/sh64elf.em
··· 170 170 break_1: 171 171 172 172 /* Check that all input sections have the same contents-type flags 173 - as the first input section. */ 173 + as the first input section. */ 174 174 { 175 175 LANG_FOR_EACH_INPUT_STATEMENT (f) 176 176 { ··· 302 302 break_1: 303 303 304 304 /* Check that all input sections have the same contents-type flags 305 - as the first input section. */ 305 + as the first input section. */ 306 306 { 307 307 LANG_FOR_EACH_INPUT_STATEMENT (f) 308 308 {
+3 -3
ld/emultempl/spu_ovl.S
··· 101 101 #define irq_stat save4 102 102 103 103 .text 104 - .align 4 104 + .align 4 105 105 .type __rv_pattern, @object 106 106 .size __rv_pattern, 16 107 107 __rv_pattern: ··· 126 126 * Load the previous overlay and jump to the caller return address. 127 127 * Updates __ovly_current. 128 128 */ 129 - .align 4 129 + .align 4 130 130 .global __ovly_return 131 131 .type __ovly_return, @function 132 132 __ovly_return: ··· 446 446 #endif 447 447 andc oldvma, oldvma, pbit # 0,2 77 448 448 lqd save1, -16($sp) # 1,6 77 449 - nop # 0,0 78 449 + nop # 0,0 78 450 450 #lnop 451 451 #nop 452 452 stqx oldvma, tab5, off5 # 1,6 79
+1 -1
ld/emultempl/spuelf.em
··· 421 421 if (is_spu_target ()) 422 422 { 423 423 if (params.local_store_lo < params.local_store_hi) 424 - { 424 + { 425 425 asection *s; 426 426 427 427 s = spu_elf_check_vma (&link_info);
+2 -2
ld/emultempl/tic6xdsbt.em
··· 103 103 the unwind table index. */ 104 104 unsigned int list_size = 10; 105 105 asection **sec_list = (asection **) 106 - xmalloc (list_size * sizeof (asection *)); 106 + xmalloc (list_size * sizeof (asection *)); 107 107 unsigned int sec_count = 0; 108 108 109 109 LANG_FOR_EACH_INPUT_STATEMENT (is) ··· 130 130 { 131 131 list_size *= 2; 132 132 sec_list = (asection **) 133 - xrealloc (sec_list, list_size * sizeof (asection *)); 133 + xrealloc (sec_list, list_size * sizeof (asection *)); 134 134 } 135 135 136 136 sec_list[sec_count++] = sec;
+9 -9
ld/emultempl/ticoff.em
··· 78 78 79 79 case OPTION_COFF_FORMAT: 80 80 if ((*optarg == '0' || *optarg == '1' || *optarg == '2') 81 - && optarg[1] == '\0') 82 - { 83 - static char buf[] = "coffX-${OUTPUT_FORMAT_TEMPLATE}"; 84 - coff_version = *optarg - '0'; 85 - buf[4] = *optarg; 86 - lang_add_output_format (buf, NULL, NULL, 0); 87 - } 81 + && optarg[1] == '\0') 82 + { 83 + static char buf[] = "coffX-${OUTPUT_FORMAT_TEMPLATE}"; 84 + coff_version = *optarg - '0'; 85 + buf[4] = *optarg; 86 + lang_add_output_format (buf, NULL, NULL, 0); 87 + } 88 88 else 89 - { 89 + { 90 90 einfo (_("%P%F: invalid COFF format version %s\n"), optarg); 91 - } 91 + } 92 92 break; 93 93 } 94 94 return FALSE;
+3 -3
ld/emultempl/vms.em
··· 52 52 53 53 static bfd_boolean 54 54 gld${EMULATION_NAME}_open_dynamic_archive (const char *arch ATTRIBUTE_UNUSED, 55 - search_dirs_type *search, 56 - lang_input_statement_type *entry) 55 + search_dirs_type *search, 56 + lang_input_statement_type *entry) 57 57 { 58 58 char *string; 59 59 ··· 198 198 if (elf_hash_table (&link_info)->dynamic_sections_created 199 199 && bed->elf_backend_size_dynamic_sections 200 200 && ! (*bed->elf_backend_size_dynamic_sections) (link_info.output_bfd, 201 - &link_info)) 201 + &link_info)) 202 202 einfo (_("%P%F: failed to set dynamic section sizes: %E\n")); 203 203 204 204 before_allocation_default ();
+14 -14
ld/genscripts.sh
··· 280 280 ( echo "/* Script for ld -r: link without relocation */" 281 281 . ${CUSTOMIZER_SCRIPT} 282 282 . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc 283 - ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xr 283 + ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xr 284 284 285 285 LD_FLAG=u 286 286 DATA_ALIGNMENT=${DATA_ALIGNMENT_u} ··· 288 288 ( echo "/* Script for ld -Ur: link w/out relocation, do create constructors */" 289 289 . ${CUSTOMIZER_SCRIPT} 290 290 . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc 291 - ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xu 291 + ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xu 292 292 293 293 LD_FLAG= 294 294 DATA_ALIGNMENT=${DATA_ALIGNMENT_} ··· 296 296 ( echo "/* Default linker script, for normal executables */" 297 297 . ${CUSTOMIZER_SCRIPT} 298 298 . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc 299 - ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.x 299 + ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.x 300 300 301 301 LD_FLAG=n 302 302 DATA_ALIGNMENT=${DATA_ALIGNMENT_n} 303 303 ( echo "/* Script for -n: mix text and data on same page */" 304 304 . ${CUSTOMIZER_SCRIPT} 305 305 . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc 306 - ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xn 306 + ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xn 307 307 308 308 LD_FLAG=N 309 309 DATA_ALIGNMENT=${DATA_ALIGNMENT_N} 310 310 ( echo "/* Script for -N: mix text and data on same page; don't align data */" 311 311 . ${CUSTOMIZER_SCRIPT} 312 312 . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc 313 - ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xbn 313 + ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xbn 314 314 315 315 if test -n "$GENERATE_COMBRELOC_SCRIPT"; then 316 316 DATA_ALIGNMENT=${DATA_ALIGNMENT_c-${DATA_ALIGNMENT_}} ··· 319 319 ( echo "/* Script for -z combreloc: combine and sort reloc sections */" 320 320 . ${CUSTOMIZER_SCRIPT} 321 321 . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc 322 - ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xc 322 + ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xc 323 323 rm -f ${COMBRELOC} 324 324 LD_FLAG=w 325 325 RELRO_NOW=" " ··· 327 327 ( echo "/* Script for -z combreloc -z now -z relro: combine and sort reloc sections */" 328 328 . ${CUSTOMIZER_SCRIPT} 329 329 . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc 330 - ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xw 330 + ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xw 331 331 rm -f ${COMBRELOC} 332 332 COMBRELOC= 333 333 unset RELRO_NOW ··· 341 341 echo "/* Script for ld --shared: link shared library */" 342 342 . ${CUSTOMIZER_SCRIPT} 343 343 . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc 344 - ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xs 344 + ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xs 345 345 if test -n "$GENERATE_COMBRELOC_SCRIPT"; then 346 346 LD_FLAG=cshared 347 347 DATA_ALIGNMENT=${DATA_ALIGNMENT_sc-${DATA_ALIGNMENT}} ··· 349 349 ( echo "/* Script for --shared -z combreloc: shared library, combine & sort relocs */" 350 350 . ${CUSTOMIZER_SCRIPT} 351 351 . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc 352 - ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xsc 352 + ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xsc 353 353 rm -f ${COMBRELOC} 354 354 LD_FLAG=wshared 355 355 RELRO_NOW=" " ··· 357 357 ( echo "/* Script for --shared -z combreloc -z now -z relro: shared library, combine & sort relocs */" 358 358 . ${CUSTOMIZER_SCRIPT} 359 359 . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc 360 - ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xsw 360 + ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xsw 361 361 rm -f ${COMBRELOC} 362 362 COMBRELOC= 363 363 unset RELRO_NOW ··· 373 373 echo "/* Script for ld -pie: link position independent executable */" 374 374 . ${CUSTOMIZER_SCRIPT} 375 375 . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc 376 - ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xd 376 + ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xd 377 377 if test -n "$GENERATE_COMBRELOC_SCRIPT"; then 378 378 LD_FLAG=cpie 379 379 DATA_ALIGNMENT=${DATA_ALIGNMENT_sc-${DATA_ALIGNMENT}} ··· 381 381 ( echo "/* Script for -pie -z combreloc: position independent executable, combine & sort relocs */" 382 382 . ${CUSTOMIZER_SCRIPT} 383 383 . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc 384 - ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xdc 384 + ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xdc 385 385 rm -f ${COMBRELOC} 386 386 LD_FLAG=wpie 387 387 RELRO_NOW=" " ··· 389 389 ( echo "/* Script for -pie -z combreloc -z now -z relro: position independent executable, combine & sort relocs */" 390 390 . ${CUSTOMIZER_SCRIPT} 391 391 . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc 392 - ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xdw 392 + ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xdw 393 393 rm -f ${COMBRELOC} 394 394 COMBRELOC= 395 395 unset RELRO_NOW ··· 404 404 echo "/* Script for ld --enable-auto-import: Like the default script except read only data is placed into .data */" 405 405 . ${CUSTOMIZER_SCRIPT} 406 406 . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc 407 - ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xa 407 + ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xa 408 408 fi 409 409 410 410 case "$COMPILE_IN: $EMULATION_LIBPATH " in
+2 -2
ld/ld.texinfo
··· 846 846 those commands to make use of a compiler based plugin it must first be 847 847 copied into the @file{$@{libdir@}/bfd-plugins} directory. All gcc 848 848 based linker plugins are backward compatible, so it is sufficient to 849 - just copy in the newest one. 849 + just copy in the newest one. 850 850 851 851 @kindex --push-state 852 852 @cindex push state governing input file handling ··· 1142 1142 setting the @code{DF_1_GLOBAUDIT} bit in the @code{DT_FLAGS_1} dynamic 1143 1143 tag. Global auditing requires that any auditing library defined via 1144 1144 the @option{--depaudit} or @option{-P} command line options be run for 1145 - all dynamic objects loaded by the application. 1145 + all dynamic objects loaded by the application. 1146 1146 1147 1147 @item initfirst 1148 1148 This option is only meaningful when building a shared object.
+66 -66
ld/ldgram.y
··· 199 199 200 200 mri_script_lines: 201 201 mri_script_lines mri_script_command NEWLINE 202 - | 202 + | 203 203 ; 204 204 205 205 mri_script_command: 206 206 CHIP exp 207 207 | CHIP exp ',' exp 208 - | NAME { 208 + | NAME { 209 209 einfo(_("%P%F: unrecognised keyword in MRI style script '%s'\n"),$1); 210 210 } 211 - | LIST { 211 + | LIST { 212 212 config.map_filename = "-"; 213 213 } 214 - | ORDER ordernamelist 215 - | ENDWORD 216 - | PUBLIC NAME '=' exp 217 - { mri_public($2, $4); } 218 - | PUBLIC NAME ',' exp 219 - { mri_public($2, $4); } 220 - | PUBLIC NAME exp 221 - { mri_public($2, $3); } 222 - | FORMAT NAME 214 + | ORDER ordernamelist 215 + | ENDWORD 216 + | PUBLIC NAME '=' exp 217 + { mri_public($2, $4); } 218 + | PUBLIC NAME ',' exp 219 + { mri_public($2, $4); } 220 + | PUBLIC NAME exp 221 + { mri_public($2, $3); } 222 + | FORMAT NAME 223 223 { mri_format($2); } 224 224 | SECT NAME ',' exp 225 225 { mri_output_section($2, $4);} ··· 237 237 { mri_alignmod($2,$4); } 238 238 | ABSOLUTE mri_abs_name_list 239 239 | LOAD mri_load_name_list 240 - | NAMEWORD NAME 240 + | NAMEWORD NAME 241 241 { mri_name($2); } 242 242 | ALIAS NAME ',' NAME 243 243 { mri_alias($2,$4,0);} 244 244 | ALIAS NAME ',' INT 245 245 { mri_alias ($2, 0, (int) $4.integer); } 246 - | BASE exp 246 + | BASE exp 247 247 { mri_base($2); } 248 248 | TRUNCATE INT 249 249 { mri_truncate ((unsigned int) $2.integer); } ··· 255 255 { ldlex_popstate (); } 256 256 | START NAME 257 257 { lang_add_entry ($2, FALSE); } 258 - | 258 + | 259 259 ; 260 260 261 261 ordernamelist: 262 - ordernamelist ',' NAME { mri_order($3); } 263 - | ordernamelist NAME { mri_order($2); } 264 - | 262 + ordernamelist ',' NAME { mri_order($3); } 263 + | ordernamelist NAME { mri_order($2); } 264 + | 265 265 ; 266 266 267 267 mri_load_name_list: ··· 271 271 ; 272 272 273 273 mri_abs_name_list: 274 - NAME 275 - { mri_only_load($1); } 274 + NAME 275 + { mri_only_load($1); } 276 276 | mri_abs_name_list ',' NAME 277 - { mri_only_load($3); } 277 + { mri_only_load($3); } 278 278 ; 279 279 280 280 casesymlist: ··· 302 302 { ldlex_both(); } 303 303 ifile_list 304 304 { ldlex_popstate(); } 305 - ; 305 + ; 306 306 307 307 ifile_list: 308 308 ifile_list ifile_p1 309 - | 309 + | 310 310 ; 311 311 312 312 ··· 320 320 | floating_point_support 321 321 | statement_anywhere 322 322 | version 323 - | ';' 323 + | ';' 324 324 | TARGET_K '(' NAME ')' 325 325 { lang_add_target($3); } 326 326 | SEARCH_DIR '(' filename ')' 327 327 { ldfile_add_library_path ($3, FALSE); } 328 328 | OUTPUT '(' filename ')' 329 329 { lang_add_output($3, 1); } 330 - | OUTPUT_FORMAT '(' NAME ')' 330 + | OUTPUT_FORMAT '(' NAME ')' 331 331 { lang_add_output_format ($3, (char *) NULL, 332 332 (char *) NULL, 1); } 333 333 | OUTPUT_FORMAT '(' NAME ',' NAME ',' NAME ')' 334 334 { lang_add_output_format ($3, $5, $7, 1); } 335 - | OUTPUT_ARCH '(' NAME ')' 335 + | OUTPUT_ARCH '(' NAME ')' 336 336 { ldfile_set_output_arch ($3, bfd_arch_unknown); } 337 337 | FORCE_COMMON_ALLOCATION 338 338 { command_line.force_common_definition = TRUE ; } ··· 345 345 { lang_enter_group (); } 346 346 '(' input_list ')' 347 347 { lang_leave_group (); } 348 - | MAP '(' filename ')' 348 + | MAP '(' filename ')' 349 349 { lang_add_map($3); } 350 350 | INCLUDE filename 351 351 { ldlex_script (); ldfile_open_command_file($2); } ··· 455 455 $$.exclude_name_list = NULL; 456 456 $$.section_flag_list = NULL; 457 457 } 458 - | EXCLUDE_FILE '(' exclude_name_list ')' wildcard_name 458 + | EXCLUDE_FILE '(' exclude_name_list ')' wildcard_name 459 459 { 460 460 $$.name = $5; 461 461 $$.sorted = none; ··· 632 632 tmp.section_flag_list = $1; 633 633 lang_add_wild (&tmp, NULL, ldgram_had_keep); 634 634 } 635 - | '[' section_name_list ']' 635 + | '[' section_name_list ']' 636 636 { 637 637 lang_add_wild (NULL, $2, ldgram_had_keep); 638 638 } 639 - | sect_flags '[' section_name_list ']' 639 + | sect_flags '[' section_name_list ']' 640 640 { 641 641 struct wildcard_spec tmp; 642 642 tmp.name = NULL; ··· 665 665 ; 666 666 667 667 statement: 668 - assignment end 668 + assignment end 669 669 | CREATE_OBJECT_SYMBOLS 670 670 { 671 - lang_add_attribute(lang_object_symbols_statement_enum); 672 - } 673 - | ';' 674 - | CONSTRUCTORS 671 + lang_add_attribute(lang_object_symbols_statement_enum); 672 + } 673 + | ';' 674 + | CONSTRUCTORS 675 675 { 676 676 677 677 lang_add_attribute(lang_constructors_statement_enum); ··· 682 682 lang_add_attribute (lang_constructors_statement_enum); 683 683 } 684 684 | input_section_spec 685 - | length '(' mustbe_exp ')' 686 - { 687 - lang_add_data ((int) $1, $3); 688 - } 685 + | length '(' mustbe_exp ')' 686 + { 687 + lang_add_data ((int) $1, $3); 688 + } 689 689 690 690 | FILL '(' fill_exp ')' 691 - { 692 - lang_add_fill ($3); 693 - } 691 + { 692 + lang_add_fill ($3); 693 + } 694 694 | ASSERT_K {ldlex_expression ();} '(' exp ',' NAME ')' end 695 695 { ldlex_popstate (); 696 696 lang_add_assignment (exp_assert ($4, $6)); } ··· 702 702 703 703 statement_list: 704 704 statement_list statement 705 - | statement 705 + | statement 706 706 ; 707 707 708 708 statement_list_opt: ··· 717 717 { $$ = $1; } 718 718 | LONG 719 719 { $$ = $1; } 720 - | SHORT 720 + | SHORT 721 721 { $$ = $1; } 722 722 | BYTE 723 723 { $$ = $1; } ··· 733 733 fill_opt: 734 734 '=' fill_exp 735 735 { $$ = $2; } 736 - | { $$ = (fill_type *) 0; } 736 + | { $$ = (fill_type *) 0; } 737 737 ; 738 738 739 739 assign_op: ··· 741 741 { $$ = '+'; } 742 742 | MINUSEQ 743 743 { $$ = '-'; } 744 - | MULTEQ 744 + | MULTEQ 745 745 { $$ = '*'; } 746 - | DIVEQ 746 + | DIVEQ 747 747 { $$ = '/'; } 748 - | LSHIFTEQ 748 + | LSHIFTEQ 749 749 { $$ = LSHIFT; } 750 - | RSHIFTEQ 750 + | RSHIFTEQ 751 751 { $$ = RSHIFT; } 752 - | ANDEQ 752 + | ANDEQ 753 753 { $$ = '&'; } 754 - | OREQ 754 + | OREQ 755 755 { $$ = '|'; } 756 756 757 757 ; ··· 804 804 ; 805 805 806 806 807 - memory_spec: NAME 807 + memory_spec: NAME 808 808 { region = lang_memory_region_lookup ($1, TRUE); } 809 809 attributes_opt ':' 810 810 origin_spec opt_comma length_spec ··· 824 824 ; 825 825 826 826 length_spec: 827 - LENGTH '=' mustbe_exp 827 + LENGTH '=' mustbe_exp 828 828 { 829 829 region->length_exp = $3; 830 830 } ··· 946 946 { $$ = exp_binop (NE , $1, $3); } 947 947 | exp LE exp 948 948 { $$ = exp_binop (LE , $1, $3); } 949 - | exp GE exp 949 + | exp GE exp 950 950 { $$ = exp_binop (GE , $1, $3); } 951 951 | exp '<' exp 952 952 { $$ = exp_binop ('<' , $1, $3); } ··· 968 968 { $$ = exp_nameop (DEFINED, $3); } 969 969 | INT 970 970 { $$ = exp_bigintop ($1.integer, $1.str); } 971 - | SIZEOF_HEADERS 971 + | SIZEOF_HEADERS 972 972 { $$ = exp_nameop (SIZEOF_HEADERS,0); } 973 973 974 974 | ALIGNOF '(' NAME ')' ··· 993 993 { $$ = exp_binop (DATA_SEGMENT_RELRO_END, $5, $3); } 994 994 | DATA_SEGMENT_END '(' exp ')' 995 995 { $$ = exp_unop (DATA_SEGMENT_END, $3); } 996 - | SEGMENT_START '(' NAME ',' exp ')' 997 - { /* The operands to the expression node are 996 + | SEGMENT_START '(' NAME ',' exp ')' 997 + { /* The operands to the expression node are 998 998 placed in the opposite order from the way 999 999 in which they appear in the script as 1000 1000 that allows us to reuse more code in ··· 1022 1022 1023 1023 1024 1024 memspec_at_opt: 1025 - AT '>' NAME { $$ = $3; } 1026 - | { $$ = 0; } 1027 - ; 1025 + AT '>' NAME { $$ = $3; } 1026 + | { $$ = 0; } 1027 + ; 1028 1028 1029 1029 opt_at: 1030 1030 AT '(' exp ')' { $$ = $3; } ··· 1053 1053 | { $$ = 0; } 1054 1054 ; 1055 1055 1056 - section: NAME { ldlex_expression(); } 1056 + section: NAME { ldlex_expression(); } 1057 1057 opt_exp_with_type 1058 1058 opt_at 1059 1059 opt_align ··· 1067 1067 $5, $7, $4, $9, $6); 1068 1068 } 1069 1069 statement_list_opt 1070 - '}' { ldlex_popstate (); ldlex_expression (); } 1070 + '}' { ldlex_popstate (); ldlex_expression (); } 1071 1071 memspec_opt memspec_at_opt phdr_opt fill_opt 1072 1072 { 1073 1073 ldlex_popstate (); ··· 1119 1119 ; 1120 1120 1121 1121 atype: 1122 - '(' type ')' 1123 - | /* EMPTY */ { sectype = normal_section; } 1124 - | '(' ')' { sectype = normal_section; } 1122 + '(' type ')' 1123 + | /* EMPTY */ { sectype = normal_section; } 1124 + | '(' ')' { sectype = normal_section; } 1125 1125 ; 1126 1126 1127 1127 opt_exp_with_type: ··· 1402 1402 { 1403 1403 $$ = lang_new_vers_pattern (NULL, $1, ldgram_vers_current_lang, FALSE); 1404 1404 } 1405 - | NAME 1405 + | NAME 1406 1406 { 1407 1407 $$ = lang_new_vers_pattern (NULL, $1, ldgram_vers_current_lang, TRUE); 1408 1408 }
+33 -33
ld/ldlang.c
··· 227 227 228 228 static bfd_boolean 229 229 walk_wild_file_in_exclude_list (struct name_list *exclude_list, 230 - lang_input_statement_type *file) 230 + lang_input_statement_type *file) 231 231 { 232 232 struct name_list *list_tmp; 233 233 ··· 2367 2367 if ((flags & (SEC_LINK_ONCE | SEC_GROUP)) == (SEC_LINK_ONCE | SEC_GROUP)) 2368 2368 { 2369 2369 if (link_info.resolve_section_groups) 2370 - flags &= ~(SEC_LINK_ONCE | SEC_LINK_DUPLICATES | SEC_RELOC); 2370 + flags &= ~(SEC_LINK_ONCE | SEC_LINK_DUPLICATES | SEC_RELOC); 2371 2371 else 2372 - flags &= ~(SEC_LINK_DUPLICATES | SEC_RELOC); 2372 + flags &= ~(SEC_LINK_DUPLICATES | SEC_RELOC); 2373 2373 } 2374 2374 else if (!bfd_link_relocatable (&link_info)) 2375 2375 flags &= ~(SEC_LINK_ONCE | SEC_LINK_DUPLICATES | SEC_RELOC); ··· 4425 4425 name_list *tmp; 4426 4426 minfo ("EXCLUDE_FILE(%s", w->exclude_name_list->name); 4427 4427 for (tmp = w->exclude_name_list->next; tmp; tmp = tmp->next) 4428 - minfo (" %s", tmp->name); 4428 + minfo (" %s", tmp->name); 4429 4429 minfo (") "); 4430 4430 } 4431 4431 ··· 4444 4444 int closing_paren = 0; 4445 4445 4446 4446 switch (sec->spec.sorted) 4447 - { 4448 - case none: 4449 - break; 4447 + { 4448 + case none: 4449 + break; 4450 4450 4451 - case by_name: 4452 - minfo ("SORT_BY_NAME("); 4453 - closing_paren = 1; 4454 - break; 4451 + case by_name: 4452 + minfo ("SORT_BY_NAME("); 4453 + closing_paren = 1; 4454 + break; 4455 4455 4456 - case by_alignment: 4457 - minfo ("SORT_BY_ALIGNMENT("); 4458 - closing_paren = 1; 4459 - break; 4456 + case by_alignment: 4457 + minfo ("SORT_BY_ALIGNMENT("); 4458 + closing_paren = 1; 4459 + break; 4460 4460 4461 - case by_name_alignment: 4462 - minfo ("SORT_BY_NAME(SORT_BY_ALIGNMENT("); 4463 - closing_paren = 2; 4464 - break; 4461 + case by_name_alignment: 4462 + minfo ("SORT_BY_NAME(SORT_BY_ALIGNMENT("); 4463 + closing_paren = 2; 4464 + break; 4465 4465 4466 - case by_alignment_name: 4467 - minfo ("SORT_BY_ALIGNMENT(SORT_BY_NAME("); 4468 - closing_paren = 2; 4469 - break; 4466 + case by_alignment_name: 4467 + minfo ("SORT_BY_ALIGNMENT(SORT_BY_NAME("); 4468 + closing_paren = 2; 4469 + break; 4470 4470 4471 - case by_none: 4472 - minfo ("SORT_NONE("); 4473 - closing_paren = 1; 4474 - break; 4471 + case by_none: 4472 + minfo ("SORT_NONE("); 4473 + closing_paren = 1; 4474 + break; 4475 4475 4476 - case by_init_priority: 4477 - minfo ("SORT_BY_INIT_PRIORITY("); 4478 - closing_paren = 1; 4479 - break; 4480 - } 4476 + case by_init_priority: 4477 + minfo ("SORT_BY_INIT_PRIORITY("); 4478 + closing_paren = 1; 4479 + break; 4480 + } 4481 4481 4482 4482 if (sec->spec.exclude_name_list != NULL) 4483 4483 { ··· 4492 4492 else 4493 4493 minfo ("*"); 4494 4494 for (;closing_paren > 0; closing_paren--) 4495 - minfo (")"); 4495 + minfo (")"); 4496 4496 if (sec->next) 4497 4497 minfo (" "); 4498 4498 }
+35 -35
ld/ldlex.l
··· 79 79 INPUTLIST definitely in a script, a filename-list 80 80 BOTH either EXPRESSION or SCRIPT 81 81 DEFSYMEXP in an argument to -defsym 82 - MRI in an MRI script 82 + MRI in an MRI script 83 83 VERS_START starting a Sun style mapfile 84 84 VERS_SCRIPT a Sun style mapfile 85 85 VERS_NODE a node within a Sun style mapfile ··· 135 135 <BOTH,SCRIPT,EXPRESSION,VERS_START,VERS_NODE,VERS_SCRIPT,INPUTLIST>"/*" { comment (); } 136 136 137 137 138 - <DEFSYMEXP>"-" { RTOKEN('-');} 139 - <DEFSYMEXP>"+" { RTOKEN('+');} 138 + <DEFSYMEXP>"-" { RTOKEN('-');} 139 + <DEFSYMEXP>"+" { RTOKEN('+');} 140 140 <DEFSYMEXP>{SYMBOLNAMECHAR1}{SYMBOLCHARN}* { yylval.name = xstrdup (yytext); return NAME; } 141 - <DEFSYMEXP>"=" { RTOKEN('='); } 141 + <DEFSYMEXP>"=" { RTOKEN('='); } 142 142 143 143 <MRI,EXPRESSION>"$"([0-9A-Fa-f])+ { 144 - yylval.integer = bfd_scan_vma (yytext + 1, 0, 16); 144 + yylval.integer = bfd_scan_vma (yytext + 1, 0, 16); 145 145 yylval.bigint.str = NULL; 146 146 return INT; 147 147 } ··· 231 231 <BOTH,SCRIPT,EXPRESSION,MRI>"/" { RTOKEN('/');} 232 232 <BOTH,SCRIPT,EXPRESSION,MRI>"%" { RTOKEN('%');} 233 233 <BOTH,SCRIPT,EXPRESSION,MRI>"<" { RTOKEN('<');} 234 - <BOTH,SCRIPT,EXPRESSION,MRI>"=" { RTOKEN('=');} 234 + <BOTH,SCRIPT,EXPRESSION,MRI>"=" { RTOKEN('=');} 235 235 <BOTH,SCRIPT,EXPRESSION,MRI>"}" { RTOKEN('}') ; } 236 236 <BOTH,SCRIPT,EXPRESSION,MRI>"{" { RTOKEN('{'); } 237 237 <BOTH,SCRIPT,EXPRESSION,MRI,INPUTLIST>")" { RTOKEN(')');} ··· 327 327 <EXPRESSION,BOTH,SCRIPT>"EXCLUDE_FILE" { RTOKEN(EXCLUDE_FILE); } 328 328 <EXPRESSION,BOTH,SCRIPT>"CONSTANT" { RTOKEN(CONSTANT);} 329 329 <MRI>"#".*\n? { ++ lineno; } 330 - <MRI>"\n" { ++ lineno; RTOKEN(NEWLINE); } 330 + <MRI>"\n" { ++ lineno; RTOKEN(NEWLINE); } 331 331 <MRI>"*".* { /* Mri comment line */ } 332 332 <MRI>";".* { /* Mri comment line */ } 333 - <MRI>"END" { RTOKEN(ENDWORD); } 333 + <MRI>"END" { RTOKEN(ENDWORD); } 334 334 <MRI>"ALIGNMOD" { RTOKEN(ALIGNMOD);} 335 335 <MRI>"ALIGN" { RTOKEN(ALIGN_K);} 336 - <MRI>"CHIP" { RTOKEN(CHIP); } 337 - <MRI>"BASE" { RTOKEN(BASE); } 338 - <MRI>"ALIAS" { RTOKEN(ALIAS); } 339 - <MRI>"TRUNCATE" { RTOKEN(TRUNCATE); } 340 - <MRI>"LOAD" { RTOKEN(LOAD); } 341 - <MRI>"PUBLIC" { RTOKEN(PUBLIC); } 342 - <MRI>"ORDER" { RTOKEN(ORDER); } 343 - <MRI>"NAME" { RTOKEN(NAMEWORD); } 344 - <MRI>"FORMAT" { RTOKEN(FORMAT); } 345 - <MRI>"CASE" { RTOKEN(CASE); } 346 - <MRI>"START" { RTOKEN(START); } 347 - <MRI>"LIST".* { RTOKEN(LIST); /* LIST and ignore to end of line */ } 336 + <MRI>"CHIP" { RTOKEN(CHIP); } 337 + <MRI>"BASE" { RTOKEN(BASE); } 338 + <MRI>"ALIAS" { RTOKEN(ALIAS); } 339 + <MRI>"TRUNCATE" { RTOKEN(TRUNCATE); } 340 + <MRI>"LOAD" { RTOKEN(LOAD); } 341 + <MRI>"PUBLIC" { RTOKEN(PUBLIC); } 342 + <MRI>"ORDER" { RTOKEN(ORDER); } 343 + <MRI>"NAME" { RTOKEN(NAMEWORD); } 344 + <MRI>"FORMAT" { RTOKEN(FORMAT); } 345 + <MRI>"CASE" { RTOKEN(CASE); } 346 + <MRI>"START" { RTOKEN(START); } 347 + <MRI>"LIST".* { RTOKEN(LIST); /* LIST and ignore to end of line */ } 348 348 <MRI>"SECT" { RTOKEN(SECT); } 349 349 <EXPRESSION,BOTH,SCRIPT,MRI>"ABSOLUTE" { RTOKEN(ABSOLUTE); } 350 - <MRI>"end" { RTOKEN(ENDWORD); } 350 + <MRI>"end" { RTOKEN(ENDWORD); } 351 351 <MRI>"alignmod" { RTOKEN(ALIGNMOD);} 352 352 <MRI>"align" { RTOKEN(ALIGN_K);} 353 - <MRI>"chip" { RTOKEN(CHIP); } 354 - <MRI>"base" { RTOKEN(BASE); } 355 - <MRI>"alias" { RTOKEN(ALIAS); } 356 - <MRI>"truncate" { RTOKEN(TRUNCATE); } 357 - <MRI>"load" { RTOKEN(LOAD); } 358 - <MRI>"public" { RTOKEN(PUBLIC); } 359 - <MRI>"order" { RTOKEN(ORDER); } 360 - <MRI>"name" { RTOKEN(NAMEWORD); } 361 - <MRI>"format" { RTOKEN(FORMAT); } 362 - <MRI>"case" { RTOKEN(CASE); } 363 - <MRI>"extern" { RTOKEN(EXTERN); } 364 - <MRI>"start" { RTOKEN(START); } 365 - <MRI>"list".* { RTOKEN(LIST); /* LIST and ignore to end of line */ } 353 + <MRI>"chip" { RTOKEN(CHIP); } 354 + <MRI>"base" { RTOKEN(BASE); } 355 + <MRI>"alias" { RTOKEN(ALIAS); } 356 + <MRI>"truncate" { RTOKEN(TRUNCATE); } 357 + <MRI>"load" { RTOKEN(LOAD); } 358 + <MRI>"public" { RTOKEN(PUBLIC); } 359 + <MRI>"order" { RTOKEN(ORDER); } 360 + <MRI>"name" { RTOKEN(NAMEWORD); } 361 + <MRI>"format" { RTOKEN(FORMAT); } 362 + <MRI>"case" { RTOKEN(CASE); } 363 + <MRI>"extern" { RTOKEN(EXTERN); } 364 + <MRI>"start" { RTOKEN(START); } 365 + <MRI>"list".* { RTOKEN(LIST); /* LIST and ignore to end of line */ } 366 366 <MRI>"sect" { RTOKEN(SECT); } 367 367 <EXPRESSION,BOTH,SCRIPT,MRI>"absolute" { RTOKEN(ABSOLUTE); } 368 368 ··· 463 463 464 464 <VERS_START,VERS_NODE,VERS_SCRIPT>#.* { /* Eat up comments */ } 465 465 466 - <VERS_START,VERS_NODE,VERS_SCRIPT,INPUTLIST>[ \t\r]+ { /* Eat up whitespace */ } 466 + <VERS_START,VERS_NODE,VERS_SCRIPT,INPUTLIST>[ \t\r]+ { /* Eat up whitespace */ } 467 467 468 468 <<EOF>> { 469 469 include_stack_ptr--;
+21 -21
ld/lexsup.c
··· 770 770 case 'd': 771 771 command_line.force_common_definition = TRUE; 772 772 break; 773 - case OPTION_FORCE_GROUP_ALLOCATION: 774 - command_line.force_group_allocation = TRUE; 775 - break; 773 + case OPTION_FORCE_GROUP_ALLOCATION: 774 + command_line.force_group_allocation = TRUE; 775 + break; 776 776 case OPTION_DEFSYM: 777 777 lex_string = optarg; 778 778 lex_redirect (optarg, "--defsym", ++defsym_count); ··· 828 828 if (command_line.auxiliary_filters == NULL) 829 829 { 830 830 command_line.auxiliary_filters = (char **) 831 - xmalloc (2 * sizeof (char *)); 831 + xmalloc (2 * sizeof (char *)); 832 832 command_line.auxiliary_filters[0] = optarg; 833 833 command_line.auxiliary_filters[1] = NULL; 834 834 } ··· 841 841 for (p = command_line.auxiliary_filters; *p != NULL; p++) 842 842 ++c; 843 843 command_line.auxiliary_filters = (char **) 844 - xrealloc (command_line.auxiliary_filters, 845 - (c + 2) * sizeof (char *)); 844 + xrealloc (command_line.auxiliary_filters, 845 + (c + 2) * sizeof (char *)); 846 846 command_line.auxiliary_filters[c] = optarg; 847 847 command_line.auxiliary_filters[c + 1] = NULL; 848 848 } ··· 952 952 link_info.unresolved_syms_in_shared_libs 953 953 = how_to_report_unresolved_symbols; 954 954 } 955 - else if (strcmp (optarg, "ignore-in-shared-libs") == 0) 955 + else if (strcmp (optarg, "ignore-in-shared-libs") == 0) 956 956 { 957 957 link_info.unresolved_syms_in_objects 958 958 = how_to_report_unresolved_symbols; ··· 1130 1130 char *buf; 1131 1131 1132 1132 buf = (char *) xmalloc (strlen (command_line.rpath_link) 1133 - + strlen (optarg) 1134 - + 2); 1133 + + strlen (optarg) 1134 + + 2); 1135 1135 sprintf (buf, "%s%c%s", command_line.rpath_link, 1136 1136 config.rpath_separator, optarg); 1137 1137 free (command_line.rpath_link); ··· 1198 1198 case OPTION_SORT_COMMON: 1199 1199 if (optarg == NULL 1200 1200 || strcmp (optarg, N_("descending")) == 0) 1201 - config.sort_common = sort_descending; 1202 - else if (strcmp (optarg, N_("ascending")) == 0) 1201 + config.sort_common = sort_descending; 1202 + else if (strcmp (optarg, N_("ascending")) == 0) 1203 1203 config.sort_common = sort_ascending; 1204 1204 else 1205 1205 einfo (_("%P%F: invalid common section sorting option: %s\n"), ··· 1308 1308 case 'u': 1309 1309 ldlang_add_undef (optarg, TRUE); 1310 1310 break; 1311 - case OPTION_REQUIRE_DEFINED_SYMBOL: 1312 - ldlang_add_require_defined (optarg); 1311 + case OPTION_REQUIRE_DEFINED_SYMBOL: 1312 + ldlang_add_require_defined (optarg); 1313 1313 break; 1314 1314 case OPTION_UNIQUE: 1315 1315 if (optarg != NULL) ··· 1522 1522 config.hash_table_size = 1021; 1523 1523 break; 1524 1524 1525 - case OPTION_HASH_SIZE: 1525 + case OPTION_HASH_SIZE: 1526 1526 { 1527 1527 bfd_size_type new_size; 1528 1528 1529 - new_size = strtoul (optarg, NULL, 0); 1530 - if (new_size) 1531 - config.hash_table_size = new_size; 1532 - else 1533 - einfo (_("%P%X: --hash-size needs a numeric argument\n")); 1534 - } 1535 - break; 1529 + new_size = strtoul (optarg, NULL, 0); 1530 + if (new_size) 1531 + config.hash_table_size = new_size; 1532 + else 1533 + einfo (_("%P%X: --hash-size needs a numeric argument\n")); 1534 + } 1535 + break; 1536 1536 1537 1537 case OPTION_PUSH_STATE: 1538 1538 input_flags.pushed = xmemdup (&input_flags,
+119 -119
ld/pe-dll.c
··· 552 552 553 553 /* Return false if n is in the d->exports table. */ 554 554 if (bsearch (&key, d->exports, d->num_exports, 555 - sizeof (pe_def_file->exports[0]), pe_export_sort)) 555 + sizeof (pe_def_file->exports[0]), pe_export_sort)) 556 556 return 0; 557 557 558 558 if (pe_dll_do_default_excludes) ··· 692 692 { 693 693 struct coff_link_hash_entry *sym_hash; 694 694 sym_hash = coff_link_hash_lookup (coff_hash_table (info), 695 - ac->symbol_name, FALSE, FALSE, FALSE); 695 + ac->symbol_name, FALSE, FALSE, FALSE); 696 696 if (sym_hash && sym_hash->root.type == bfd_link_hash_common 697 - && sym_hash->root.u.c.p->alignment_power < (unsigned) ac->alignment) 697 + && sym_hash->root.u.c.p->alignment_power < (unsigned) ac->alignment) 698 698 { 699 699 sym_hash->root.u.c.p->alignment_power = (unsigned) ac->alignment; 700 700 } ··· 736 736 && ((symbols[j]->flags & BSF_GLOBAL) 737 737 || (symbols[j]->flags == 0))); 738 738 if (link_info.version_info && would_export) 739 - would_export 740 - = !bfd_hide_sym_by_version (link_info.version_info, 741 - symbols[j]->name); 739 + would_export 740 + = !bfd_hide_sym_by_version (link_info.version_info, 741 + symbols[j]->name); 742 742 if (would_export) 743 743 { 744 744 const char *sn = symbols[j]->name; ··· 747 747 { 748 748 char *name; 749 749 if (is_import (sn)) 750 - continue; 750 + continue; 751 751 752 752 name = xmalloc (strlen ("__imp_") + strlen (sn) + 1); 753 753 sprintf (name, "%s%s", "__imp_", sn); ··· 772 772 NULL, &is_dup); 773 773 /* Fill data flag properly, from dlltool.c. */ 774 774 if (!is_dup) 775 - p->flag_data = !(symbols[j]->flags & BSF_FUNCTION); 775 + p->flag_data = !(symbols[j]->flags & BSF_FUNCTION); 776 776 } 777 777 } 778 778 } ··· 806 806 char *tmp_at = strrchr (tmp, '@'); 807 807 808 808 if (tmp_at) 809 - *tmp_at = 0; 809 + *tmp_at = 0; 810 810 else 811 - einfo (_("%P%X: Cannot export %s: invalid export name\n"), 811 + einfo (_("%P%X: Cannot export %s: invalid export name\n"), 812 812 pe_def_file->exports[i].name); 813 813 pe_def_file->exports[i].name = tmp; 814 - resort_needed = TRUE; 814 + resort_needed = TRUE; 815 815 } 816 816 } 817 817 } ··· 820 820 by removing leading @. */ 821 821 if (resort_needed) 822 822 qsort (pe_def_file->exports, NE, sizeof (pe_def_file->exports[0]), 823 - pe_export_sort); 823 + pe_export_sort); 824 824 825 825 if (pe_dll_stdcall_aliases) 826 826 { ··· 841 841 pe_def_file->exports[i].internal_name, 842 842 -1, NULL, &is_dup); 843 843 if (is_dup) 844 - free (tmp); 844 + free (tmp); 845 845 } 846 846 } 847 847 } ··· 953 953 } 954 954 } 955 955 /* Check for forward exports. These are indicated in DEF files by an 956 - export directive of the form NAME1 = MODULE-NAME.EXTERNAL-NAME 956 + export directive of the form NAME1 = MODULE-NAME.EXTERNAL-NAME 957 957 but we must take care not to be fooled when the user wants to export 958 958 a symbol that actually really has a dot in it, so we only check 959 959 for them here, after real defined symbols have already been matched. */ ··· 1093 1093 /* Now we need to assign ordinals to those that don't have them. */ 1094 1094 for (i = 0; i < NE; i++) 1095 1095 { 1096 - if (exported_symbol_sections[i] || 1097 - pe_def_file->exports[i].flag_forward) 1096 + if (exported_symbol_sections[i] 1097 + || pe_def_file->exports[i].flag_forward) 1098 1098 { 1099 1099 if (pe_def_file->exports[i].ordinal != -1) 1100 1100 { ··· 1126 1126 1127 1127 next_ordinal = min_ordinal; 1128 1128 for (i = 0; i < NE; i++) 1129 - if ((exported_symbol_sections[i] || 1130 - pe_def_file->exports[i].flag_forward) && 1131 - pe_def_file->exports[i].ordinal == -1) 1129 + if ((exported_symbol_sections[i] 1130 + || pe_def_file->exports[i].flag_forward) 1131 + && pe_def_file->exports[i].ordinal == -1) 1132 1132 { 1133 1133 while (exported_symbols[next_ordinal - min_ordinal] != -1) 1134 1134 next_ordinal++; ··· 1166 1166 1167 1167 name = xmalloc (strlen (pe_def_file->exports[i].internal_name) + 2); 1168 1168 if (pe_details->underscored 1169 - && *pe_def_file->exports[i].internal_name != '@') 1169 + && *pe_def_file->exports[i].internal_name != '@') 1170 1170 { 1171 1171 *name = '_'; 1172 1172 strcpy (name + 1, pe_def_file->exports[i].internal_name); ··· 1234 1234 Scan alphabetically - ie the ordering in the exports[] table, 1235 1235 rather than by ordinal - the ordering in the exported_symbol[] 1236 1236 table. See dlltool.c and: 1237 - http://sources.redhat.com/ml/binutils/2003-04/msg00379.html 1237 + http://sources.redhat.com/ml/binutils/2003-04/msg00379.html 1238 1238 for more information. */ 1239 1239 hint = 0; 1240 1240 for (s = 0; s < NE; s++) 1241 1241 { 1242 1242 struct bfd_section *ssec = exported_symbol_sections[s]; 1243 - if (pe_def_file->exports[s].ordinal != -1 && 1244 - (pe_def_file->exports[s].flag_forward || ssec != NULL)) 1243 + if (pe_def_file->exports[s].ordinal != -1 1244 + && (pe_def_file->exports[s].flag_forward || ssec != NULL)) 1245 1245 { 1246 1246 int ord = pe_def_file->exports[s].ordinal; 1247 1247 1248 1248 if (pe_def_file->exports[s].flag_forward) 1249 1249 { 1250 1250 bfd_put_32 (abfd, ERVA (enamestr), 1251 - eaddresses + 4 * (ord - min_ordinal)); 1251 + eaddresses + 4 * (ord - min_ordinal)); 1252 1252 1253 1253 strcpy (enamestr, pe_def_file->exports[s].internal_name); 1254 1254 enamestr += strlen (pe_def_file->exports[s].internal_name) + 1; ··· 1260 1260 + ssec->output_offset); 1261 1261 1262 1262 bfd_put_32 (abfd, srva - image_base, 1263 - eaddresses + 4 * (ord - min_ordinal)); 1263 + eaddresses + 4 * (ord - min_ordinal)); 1264 1264 } 1265 1265 1266 1266 if (!pe_def_file->exports[s].flag_noname) ··· 1880 1880 } 1881 1881 1882 1882 /* .section .idata$2 1883 - .global __head_my_dll 1883 + .global __head_my_dll 1884 1884 __head_my_dll: 1885 - .rva hname 1886 - .long 0 1887 - .long 0 1888 - .rva __my_dll_iname 1889 - .rva fthunk 1885 + .rva hname 1886 + .long 0 1887 + .long 0 1888 + .rva __my_dll_iname 1889 + .rva fthunk 1890 1890 1891 - .section .idata$5 1892 - .long 0 1891 + .section .idata$5 1892 + .long 0 1893 1893 fthunk: 1894 1894 1895 - .section .idata$4 1896 - .long 0 1895 + .section .idata$4 1896 + .long 0 1897 1897 hname: */ 1898 1898 1899 1899 static bfd * ··· 1974 1974 } 1975 1975 1976 1976 /* .section .idata$4 1977 - .long 0 1977 + .long 0 1978 1978 [.long 0] for PE+ 1979 - .section .idata$5 1980 - .long 0 1979 + .section .idata$5 1980 + .long 0 1981 1981 [.long 0] for PE+ 1982 - .section idata$7 1983 - .global __my_dll_iname 1982 + .section idata$7 1983 + .global __my_dll_iname 1984 1984 __my_dll_iname: 1985 - .asciz "my.dll" */ 1985 + .asciz "my.dll" */ 1986 1986 1987 1987 static bfd * 1988 1988 make_tail (bfd *parent) ··· 2044 2044 } 2045 2045 2046 2046 /* .text 2047 - .global _function 2048 - .global ___imp_function 2049 - .global __imp__function 2047 + .global _function 2048 + .global ___imp_function 2049 + .global __imp__function 2050 2050 _function: 2051 - jmp *__imp__function: 2051 + jmp *__imp__function: 2052 2052 2053 - .section idata$7 2054 - .long __head_my_dll 2053 + .section idata$7 2054 + .long __head_my_dll 2055 2055 2056 - .section .idata$5 2056 + .section .idata$5 2057 2057 ___imp_function: 2058 2058 __imp__function: 2059 2059 iat? 2060 - .section .idata$4 2060 + .section .idata$4 2061 2061 iat? 2062 - .section .idata$6 2062 + .section .idata$6 2063 2063 ID<ordinal>: 2064 - .short <hint> 2065 - .asciz "function" xlate? (add underscore, kill at) */ 2064 + .short <hint> 2065 + .asciz "function" xlate? (add underscore, kill at) */ 2066 2066 2067 2067 static const unsigned char jmp_ix86_bytes[] = 2068 2068 { ··· 2070 2070 }; 2071 2071 2072 2072 /* _function: 2073 - mov.l ip+8,r0 2074 - mov.l @r0,r0 2075 - jmp @r0 2076 - nop 2077 - .dw __imp_function */ 2073 + mov.l ip+8,r0 2074 + mov.l @r0,r0 2075 + jmp @r0 2076 + nop 2077 + .dw __imp_function */ 2078 2078 2079 2079 static const unsigned char jmp_sh_bytes[] = 2080 2080 { ··· 2082 2082 }; 2083 2083 2084 2084 /* _function: 2085 - lui $t0,<high:__imp_function> 2086 - lw $t0,<low:__imp_function> 2087 - jr $t0 2088 - nop */ 2085 + lui $t0,<high:__imp_function> 2086 + lw $t0,<low:__imp_function> 2087 + jr $t0 2088 + nop */ 2089 2089 2090 2090 static const unsigned char jmp_mips_bytes[] = 2091 2091 { ··· 2211 2211 /* Mark this object as SAFESEH compatible. */ 2212 2212 quick_symbol (abfd, "", "@feat.00", "", bfd_abs_section_ptr, 2213 2213 BSF_LOCAL, 1); 2214 - quick_reloc (abfd, 2, BFD_RELOC_32, 2); 2214 + quick_reloc (abfd, 2, BFD_RELOC_32, 2); 2215 2215 #endif 2216 2216 break; 2217 2217 case PE_ARCH_sh: ··· 2223 2223 quick_reloc (abfd, 4, BFD_RELOC_LO16, 2); 2224 2224 break; 2225 2225 case PE_ARCH_arm: 2226 - case PE_ARCH_arm_epoc: 2227 - case PE_ARCH_arm_wince: 2226 + case PE_ARCH_arm_epoc: 2227 + case PE_ARCH_arm_wince: 2228 2228 quick_reloc (abfd, 8, BFD_RELOC_32, 2); 2229 2229 break; 2230 2230 default: ··· 2432 2432 } 2433 2433 2434 2434 /* .section .idata$2 2435 - .rva __nm_thnk_SYM (singleton thunk with name of func) 2436 - .long 0 2437 - .long 0 2438 - .rva __my_dll_iname (name of dll) 2439 - .rva __fuNN_SYM (pointer to reference (address) in text) */ 2435 + .rva __nm_thnk_SYM (singleton thunk with name of func) 2436 + .long 0 2437 + .long 0 2438 + .rva __my_dll_iname (name of dll) 2439 + .rva __fuNN_SYM (pointer to reference (address) in text) */ 2440 2440 2441 2441 static bfd * 2442 2442 make_import_fixup_entry (const char *name, ··· 2492 2492 } 2493 2493 2494 2494 /* .section .rdata_runtime_pseudo_reloc 2495 - .long addend 2496 - .rva __fuNN_SYM (pointer to reference (address) in text) */ 2495 + .long addend 2496 + .rva __fuNN_SYM (pointer to reference (address) in text) */ 2497 2497 2498 2498 static bfd * 2499 2499 make_runtime_pseudo_reloc (const char *name ATTRIBUTE_UNUSED, ··· 2577 2577 } 2578 2578 2579 2579 /* .section .rdata 2580 - .rva __pei386_runtime_relocator */ 2580 + .rva __pei386_runtime_relocator */ 2581 2581 2582 2582 static bfd * 2583 2583 pe_create_runtime_relocator_reference (bfd *parent) ··· 2655 2655 add_bfd_to_link (b, b->filename, &link_info); 2656 2656 2657 2657 /* If we ever use autoimport, we have to cast text section writable. 2658 - But not for version 2. */ 2658 + But not for version 2. */ 2659 2659 if (link_info.pei386_runtime_pseudo_reloc != 2) 2660 - { 2661 - config.text_read_only = FALSE; 2662 - link_info.output_bfd->flags &= ~WP_TEXT; 2663 - } 2660 + { 2661 + config.text_read_only = FALSE; 2662 + link_info.output_bfd->flags &= ~WP_TEXT; 2663 + } 2664 2664 if (link_info.pei386_runtime_pseudo_reloc == 2) 2665 - { 2665 + { 2666 2666 b = make_singleton_name_imp (name, link_info.output_bfd); 2667 - add_bfd_to_link (b, b->filename, &link_info); 2667 + add_bfd_to_link (b, b->filename, &link_info); 2668 2668 } 2669 2669 } 2670 2670 ··· 2679 2679 add_bfd_to_link (b, b->filename, &link_info); 2680 2680 } 2681 2681 2682 - if ((link_info.pei386_runtime_pseudo_reloc != 0 && addend != 0) 2683 - || link_info.pei386_runtime_pseudo_reloc == 2) 2684 - { 2685 - if (pe_dll_extra_pe_debug) 2686 - printf ("creating runtime pseudo-reloc entry for %s (addend=%d)\n", 2687 - fixup_name, (int) addend); 2682 + if ((link_info.pei386_runtime_pseudo_reloc != 0 && addend != 0) 2683 + || link_info.pei386_runtime_pseudo_reloc == 2) 2684 + { 2685 + if (pe_dll_extra_pe_debug) 2686 + printf ("creating runtime pseudo-reloc entry for %s (addend=%d)\n", 2687 + fixup_name, (int) addend); 2688 2688 2689 - b = make_runtime_pseudo_reloc (name, fixup_name, addend, rel->howto->bitsize, 2690 - link_info.output_bfd); 2691 - add_bfd_to_link (b, b->filename, &link_info); 2689 + b = make_runtime_pseudo_reloc (name, fixup_name, addend, rel->howto->bitsize, 2690 + link_info.output_bfd); 2691 + add_bfd_to_link (b, b->filename, &link_info); 2692 2692 2693 - if (runtime_pseudo_relocs_created == 0) 2694 - { 2695 - b = pe_create_runtime_relocator_reference (link_info.output_bfd); 2696 - add_bfd_to_link (b, b->filename, &link_info); 2697 - } 2698 - runtime_pseudo_relocs_created++; 2699 - } 2700 - else if (addend != 0) 2701 - einfo (_("%P%X%C: variable '%T' can't be auto-imported. Please read the documentation for ld's --enable-auto-import for details.\n"), 2702 - s->owner, s, rel->address, sym->name); 2693 + if (runtime_pseudo_relocs_created == 0) 2694 + { 2695 + b = pe_create_runtime_relocator_reference (link_info.output_bfd); 2696 + add_bfd_to_link (b, b->filename, &link_info); 2697 + } 2698 + runtime_pseudo_relocs_created++; 2699 + } 2700 + else if (addend != 0) 2701 + einfo (_("%P%X%C: variable '%T' can't be auto-imported. Please read the documentation for ld's --enable-auto-import for details.\n"), 2702 + s->owner, s, rel->address, sym->name); 2703 2703 } 2704 2704 2705 2705 ··· 2753 2753 found = (filename_cmp (ex->string, ibfd->filename) == 0); 2754 2754 } 2755 2755 /* If it matched, we must open a fresh BFD for it (the original 2756 - input BFD is still needed for the DLL's final link) and add 2757 - it into the archive member chain. */ 2756 + input BFD is still needed for the DLL's final link) and add 2757 + it into the archive member chain. */ 2758 2758 if (found) 2759 2759 { 2760 2760 bfd *newbfd = bfd_openr (ibfd->my_archive ··· 2913 2913 { 2914 2914 h = bfd_link_hash_lookup (linfo->hash, kv->oname, FALSE, FALSE, FALSE); 2915 2915 if (h->type == bfd_link_hash_undefined) 2916 - goto return_h; 2916 + goto return_h; 2917 2917 } 2918 2918 2919 2919 if (lname[0] == '?') ··· 2922 2922 if (at || lname[0] == '@') 2923 2923 { 2924 2924 if (lname[0] == '@') 2925 - { 2925 + { 2926 2926 if (pe_details->underscored) 2927 2927 lname[0] = '_'; 2928 2928 else ··· 2938 2938 } 2939 2939 } 2940 2940 if (at) 2941 - *strchr (lname, '@') = 0; 2941 + *strchr (lname, '@') = 0; 2942 2942 key.key = lname; 2943 2943 kv = bsearch (&key, udef_table, undef_count, 2944 2944 sizeof (struct key_value), undef_sort_cmp); ··· 2979 2979 { 2980 2980 h = bfd_link_hash_lookup (linfo->hash, kv->oname, FALSE, FALSE, FALSE); 2981 2981 if (h->type == bfd_link_hash_undefined) 2982 - goto return_h; 2982 + goto return_h; 2983 2983 } 2984 2984 2985 2985 return_NULL: ··· 2991 2991 2992 2992 static bfd_boolean 2993 2993 pe_undef_count (struct bfd_link_hash_entry *h ATTRIBUTE_UNUSED, 2994 - void *inf ATTRIBUTE_UNUSED) 2994 + void *inf ATTRIBUTE_UNUSED) 2995 2995 { 2996 2996 if (h->type == bfd_link_hash_undefined) 2997 2997 undef_count++; ··· 3009 3009 at = strchr (udef_table[undef_count].key 3010 3010 + (udef_table[undef_count].key[0] == '@'), '@'); 3011 3011 if (at) 3012 - at[1] = 0; 3012 + at[1] = 0; 3013 3013 udef_table[undef_count].oname = h->root.string; 3014 3014 undef_count++; 3015 3015 } ··· 3073 3073 for (i = 0; i < pe_def_file->num_imports && imp[i].module != module; i++) 3074 3074 ; 3075 3075 if (i >= pe_def_file->num_imports) 3076 - continue; 3076 + continue; 3077 3077 3078 3078 dll_filename = module->name; 3079 3079 dll_symname = xstrdup (module->name); ··· 3117 3117 blhe = bfd_link_hash_lookup (linfo->hash, name, 3118 3118 FALSE, FALSE, FALSE); 3119 3119 if (blhe) 3120 - is_undef = (blhe->type == bfd_link_hash_undefined); 3120 + is_undef = (blhe->type == bfd_link_hash_undefined); 3121 3121 } 3122 3122 else 3123 3123 { ··· 3131 3131 blhe = pe_find_cdecl_alias_match (linfo, name); 3132 3132 include_jmp_stub = TRUE; 3133 3133 if (blhe) 3134 - is_undef = (blhe->type == bfd_link_hash_undefined); 3134 + is_undef = (blhe->type == bfd_link_hash_undefined); 3135 3135 } 3136 3136 3137 3137 free (name); ··· 3380 3380 /* Skip unwanted symbols, which are 3381 3381 exported in buggy auto-import releases. */ 3382 3382 if (! CONST_STRNEQ (erva + name_rva, "__nm_")) 3383 - { 3383 + { 3384 3384 int is_dup = 0; 3385 - /* is_data is true if the address is in the data, rdata or bss 3385 + /* is_data is true if the address is in the data, rdata or bss 3386 3386 segment. */ 3387 - is_data = 3387 + is_data = 3388 3388 (func_rva >= data_start && func_rva < data_end) 3389 3389 || (func_rva >= rdata_start && func_rva < rdata_end) 3390 3390 || (func_rva >= bss_start && func_rva < bss_end); 3391 3391 3392 3392 imp = def_file_add_import (pe_def_file, erva + name_rva, 3393 3393 dllname, i, NULL, NULL, &is_dup); 3394 - /* Mark symbol type. */ 3395 - if (!is_dup) 3396 - imp->data = is_data; 3394 + /* Mark symbol type. */ 3395 + if (!is_dup) 3396 + imp->data = is_data; 3397 3397 3398 - if (pe_dll_extra_pe_debug) 3398 + if (pe_dll_extra_pe_debug) 3399 3399 printf ("%s dll-name: %s sym: %s addr: 0x%lx %s\n", 3400 3400 __FUNCTION__, dllname, erva + name_rva, 3401 3401 (unsigned long) func_rva, is_data ? "(data)" : ""); 3402 - } 3402 + } 3403 3403 } 3404 3404 3405 3405 return TRUE; ··· 3504 3504 pe_bfd_is_dll (bfd *abfd) 3505 3505 { 3506 3506 return (bfd_get_format (abfd) == bfd_object 3507 - && obj_pe (abfd) 3508 - && pe_data (abfd)->dll); 3507 + && obj_pe (abfd) 3508 + && pe_data (abfd)->dll); 3509 3509 }
+1 -1
ld/plugin.c
··· 1014 1014 if (!onloadfn) 1015 1015 onloadfn = (ld_plugin_onload) dlsym (curplug->dlhandle, "_onload"); 1016 1016 if (!onloadfn) 1017 - einfo (_("%P%F: %s: error loading plugin: %s\n"), 1017 + einfo (_("%P%F: %s: error loading plugin: %s\n"), 1018 1018 curplug->name, dlerror ()); 1019 1019 set_tv_plugin_args (curplug, &my_tv[tv_header_size]); 1020 1020 called_plugin = curplug;
+1 -1
ld/po/Make-in
··· 239 239 posrcprefix="../"; \ 240 240 fi; \ 241 241 rm -f $@-t $@ \ 242 - && (sed -e '/^#/d' -e '/^[ ]*$$/d' \ 242 + && (sed -e '/^#/d' -e '/^[ ]*$$/d' \ 243 243 -e "s@.*@ $$posrcprefix& \\\\@" < $(srcdir)/$@.in \ 244 244 | sed -e '$$s/\\$$//') > $@-t \ 245 245 && chmod a-w $@-t \
+1 -1
ld/scripttempl/DWARF.sc
··· 1 1 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 2 - # 2 + # 3 3 # Copying and distribution of this file, with or without modification, 4 4 # are permitted in any medium without royalty provided the copyright 5 5 # notice and this notice are preserved.
+2 -2
ld/scripttempl/aix.sc
··· 4 4 # specified by the -H option. 5 5 # 6 6 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 7 - # 7 + # 8 8 # Copying and distribution of this file, with or without modification, 9 9 # are permitted in any medium without royalty provided the copyright 10 10 # notice and this notice are preserved. ··· 67 67 .loader : { 68 68 *(.loader) 69 69 } 70 - 70 + 71 71 .debug : { 72 72 *(.debug) 73 73 }
+1 -1
ld/scripttempl/alpha.sc
··· 4 4 # defaults are appropriate for an Alpha running OSF/1. 5 5 # 6 6 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 7 - # 7 + # 8 8 # Copying and distribution of this file, with or without modification, 9 9 # are permitted in any medium without royalty provided the copyright 10 10 # notice and this notice are preserved.
+1 -1
ld/scripttempl/alphavms.sc
··· 2 2 # Tristan Gingold <gingold@adacore.com>. 3 3 # 4 4 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 5 - # 5 + # 6 6 # Copying and distribution of this file, with or without modification, 7 7 # are permitted in any medium without royalty provided the copyright 8 8 # notice and this notice are preserved.
+1 -1
ld/scripttempl/aout.sc
··· 1 1 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 2 - # 2 + # 3 3 # Copying and distribution of this file, with or without modification, 4 4 # are permitted in any medium without royalty provided the copyright 5 5 # notice and this notice are preserved.
+6 -6
ld/scripttempl/arclinux.sc
··· 54 54 # INPUT_FILES - INPUT command of files to always include 55 55 # WRITABLE_RODATA - if set, the .rodata section should be writable 56 56 # INIT_START, INIT_END - statements just before and just after 57 - # combination of .init sections. 57 + # combination of .init sections. 58 58 # FINI_START, FINI_END - statements just before and just after 59 - # combination of .fini sections. 59 + # combination of .fini sections. 60 60 # STACK_ADDR - start of a .stack section. 61 61 # OTHER_SYMBOLS - symbols to place right at the end of the script. 62 62 # ETEXT_NAME - name of a symbol for the end of the text section, ··· 427 427 .rel.dyn ${RELOCATING-0} : 428 428 { 429 429 EOF 430 - sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rela\./d;/__rela_iplt_/d;s/^.*: { *\(.*\)}$/ \1/' $COMBRELOC >> ldscripts/dyntmp.$$ 430 + sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rela\./d;/__rela_iplt_/d;s/^.*: { *\(.*\)}$/ \1/' $COMBRELOC >> ldscripts/dyntmp.$$ 431 431 cat >> ldscripts/dyntmp.$$ <<EOF 432 432 } 433 433 .rela.dyn ${RELOCATING-0} : 434 434 { 435 435 EOF 436 - sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rel\./d;/__rel_iplt_/d;s/^.*: { *\(.*\)}/ \1/' $COMBRELOC >> ldscripts/dyntmp.$$ 436 + sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rel\./d;/__rel_iplt_/d;s/^.*: { *\(.*\)}/ \1/' $COMBRELOC >> ldscripts/dyntmp.$$ 437 437 cat >> ldscripts/dyntmp.$$ <<EOF 438 438 } 439 439 EOF ··· 463 463 cat ldscripts/dyntmp.$$ 464 464 else 465 465 if test -z "${NO_REL_RELOCS}"; then 466 - sed -e '/^[ ]*\.rela\.[^}]*$/,/}/d;/^[ ]*\.rela\./d;/__rela_iplt_/d' ldscripts/dyntmp.$$ 466 + sed -e '/^[ ]*\.rela\.[^}]*$/,/}/d;/^[ ]*\.rela\./d;/__rela_iplt_/d' ldscripts/dyntmp.$$ 467 467 fi 468 468 if test -z "${NO_RELA_RELOCS}"; then 469 - sed -e '/^[ ]*\.rel\.[^}]*$/,/}/d;/^[ ]*\.rel\./d;/__rel_iplt_/d' ldscripts/dyntmp.$$ 469 + sed -e '/^[ ]*\.rel\.[^}]*$/,/}/d;/^[ ]*\.rel\./d;/__rel_iplt_/d' ldscripts/dyntmp.$$ 470 470 fi 471 471 fi 472 472 rm -f ldscripts/dyntmp.$$
+1 -1
ld/scripttempl/armaout.sc
··· 1 1 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 2 - # 2 + # 3 3 # Copying and distribution of this file, with or without modification, 4 4 # are permitted in any medium without royalty provided the copyright 5 5 # notice and this notice are preserved.
+16 -16
ld/scripttempl/armbpabi.sc
··· 4 4 # that apply; only BPABI-specific variables will be noted here. 5 5 # 6 6 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 7 - # 7 + # 8 8 # Copying and distribution of this file, with or without modification, 9 9 # are permitted in any medium without royalty provided the copyright 10 10 # notice and this notice are preserved. ··· 52 52 SDATA="/* We want the small data sections together, so single-instruction offsets 53 53 can access them all, and initialized data all before uninitialized, so 54 54 we can shorten the on-disk segment size. */ 55 - .sdata ${RELOCATING-0} : 55 + .sdata ${RELOCATING-0} : 56 56 { 57 57 ${RELOCATING+${SDATA_START_SYMBOLS}} 58 58 *(.sdata${RELOCATING+ .sdata.* .gnu.linkonce.s.*}) ··· 88 88 KEEP (*(.fini_array)) 89 89 ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (__fini_array_end = .);}} 90 90 }" 91 - CTOR=".ctors ${CONSTRUCTING-0} : 91 + CTOR=".ctors ${CONSTRUCTING-0} : 92 92 { 93 93 ${CONSTRUCTING+${CTOR_START}} 94 94 /* gcc uses crtbegin.o to find the start of ··· 166 166 at non-zero addresses. Could be a Solaris ld bug, could be a GNU ld 167 167 bug. But for now assigning the zero vmas works. */} 168 168 169 - /* ARM's proprietary toolchain generate these symbols to match the start 169 + /* ARM's proprietary toolchain generate these symbols to match the start 170 170 and end of particular sections of the image. SymbianOS uses these 171 - symbols. We provide them for compatibility with ARM's toolchains. 172 - These symbols should be bound locally; each shared object may define 173 - its own version of these symbols. */ 174 - 171 + symbols. We provide them for compatibility with ARM's toolchains. 172 + These symbols should be bound locally; each shared object may define 173 + its own version of these symbols. */ 174 + 175 175 VERSION 176 - { 176 + { 177 177 /* Give these a dummy version to work around linker lameness. 178 178 The name used shouldn't matter as these are all local symbols. */ 179 - __GNU { 180 - local: 179 + __GNU { 180 + local: 181 181 Image\$\$ER_RO\$\$Base; 182 182 Image\$\$ER_RO\$\$Limit; 183 183 SHT\$\$INIT_ARRAY\$\$Base; 184 184 SHT\$\$INIT_ARRAY\$\$Limit; 185 - .ARM.exidx\$\$Base; 185 + .ARM.exidx\$\$Base; 186 186 .ARM.exidx\$\$Limit; 187 187 }; 188 188 } ··· 203 203 204 204 EOF 205 205 cat <<EOF 206 - .init ${RELOCATING-0} : 207 - { 206 + .init ${RELOCATING-0} : 207 + { 208 208 ${RELOCATING+${INIT_START}} 209 209 KEEP (*(.init)) 210 210 ${RELOCATING+${INIT_END}} ··· 393 393 .rel.dyn 0 : 394 394 { 395 395 EOF 396 - sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rela\./d;s/^.*: { *\(.*\)}$/ \1/' $COMBRELOC 396 + sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rela\./d;s/^.*: { *\(.*\)}$/ \1/' $COMBRELOC 397 397 cat <<EOF 398 398 } 399 399 .rela.dyn 0 : 400 400 { 401 401 EOF 402 - sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rel\./d;s/^.*: { *\(.*\)}/ \1/' $COMBRELOC 402 + sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rel\./d;s/^.*: { *\(.*\)}/ \1/' $COMBRELOC 403 403 cat <<EOF 404 404 } 405 405 EOF
+7 -7
ld/scripttempl/armcoff.sc
··· 2 2 # Based on i386coff.sc by Ian Taylor <ian@cygnus.com>. 3 3 # 4 4 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 5 - # 5 + # 6 6 # Copying and distribution of this file, with or without modification, 7 7 # are permitted in any medium without royalty provided the copyright 8 8 # notice and this notice are preserved. ··· 49 49 *(.glue_7t) 50 50 *(.glue_7) 51 51 *(.rdata) 52 - ${CONSTRUCTING+ ___CTOR_LIST__ = .; __CTOR_LIST__ = . ; 52 + ${CONSTRUCTING+ ___CTOR_LIST__ = .; __CTOR_LIST__ = . ; 53 53 LONG (-1); *(.ctors); *(.ctor); LONG (0); } 54 - ${CONSTRUCTING+ ___DTOR_LIST__ = .; __DTOR_LIST__ = . ; 54 + ${CONSTRUCTING+ ___DTOR_LIST__ = .; __DTOR_LIST__ = . ; 55 55 LONG (-1); *(.dtors); *(.dtor); LONG (0); } 56 56 *(.fini) 57 57 ${RELOCATING+ etext = .;} ··· 60 60 .data ${RELOCATING+${DATA_ADDR-0x40000 + (ALIGN(0x8) & 0xfffc0fff)}} : { 61 61 ${RELOCATING+ __data_start__ = . ;} 62 62 *(.data*) 63 - 63 + 64 64 ${RELOCATING+*(.gcc_exc*)} 65 65 ${RELOCATING+___EH_FRAME_BEGIN__ = . ;} 66 66 ${RELOCATING+*(.eh_fram*)} 67 67 ${RELOCATING+___EH_FRAME_END__ = . ;} 68 68 ${RELOCATING+LONG(0);} 69 - 69 + 70 70 ${RELOCATING+ __data_end__ = . ;} 71 71 ${RELOCATING+ edata = .;} 72 72 ${RELOCATING+ _edata = .;} ··· 74 74 ${CONSTRUCTING+${RELOCATING-$CTOR}} 75 75 ${CONSTRUCTING+${RELOCATING-$DTOR}} 76 76 .bss ${RELOCATING+ ALIGN(0x8)} : 77 - { 77 + { 78 78 ${RELOCATING+ __bss_start__ = . ;} 79 79 *(.bss) 80 80 *(COMMON) ··· 85 85 ${RELOCATING+ _end = .;} 86 86 ${RELOCATING+ __end__ = .;} 87 87 88 - .stab 0 ${RELOCATING+(NOLOAD)} : 88 + .stab 0 ${RELOCATING+(NOLOAD)} : 89 89 { 90 90 [ .stab ] 91 91 }
+3 -3
ld/scripttempl/avr.sc
··· 1 1 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 2 - # 2 + # 3 3 # Copying and distribution of this file, with or without modification, 4 4 # are permitted in any medium without royalty provided the copyright 5 5 # notice and this notice are preserved. ··· 129 129 ${RELOCATING+ *libc.a:*(.progmem.data)} 130 130 131 131 ${RELOCATING+ *(.progmem.*)} 132 - 132 + 133 133 ${RELOCATING+. = ALIGN(2);} 134 134 135 135 /* For code that needs to reside in the lower 128k progmem. */ ··· 331 331 .stab.exclstr 0 : { *(.stab.exclstr) } 332 332 .stab.index 0 : { *(.stab.index) } 333 333 .stab.indexstr 0 : { *(.stab.indexstr) } 334 - .comment 0 : { *(.comment) } 334 + .comment 0 : { *(.comment) } 335 335 .note.gnu.build-id : { *(.note.gnu.build-id) } 336 336 EOF 337 337
+2 -2
ld/scripttempl/crisaout.sc
··· 1 1 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 2 - # 2 + # 3 3 # Copying and distribution of this file, with or without modification, 4 4 # are permitted in any medium without royalty provided the copyright 5 5 # notice and this notice are preserved. ··· 22 22 ${CONSTRUCTING+ __Stext = .;} 23 23 ${RELOCATING+*(.startup)} 24 24 *(.text) 25 - ${CONSTRUCTING+__start = DEFINED(__start) ? __start : 25 + ${CONSTRUCTING+__start = DEFINED(__start) ? __start : 26 26 DEFINED(_start) ? _start : 27 27 DEFINED(start) ? start : 28 28 DEFINED(.startup) ? .startup + 2 : 2;}
+2 -2
ld/scripttempl/delta68.sc
··· 1 1 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 2 - # 2 + # 3 3 # Copying and distribution of this file, with or without modification, 4 4 # are permitted in any medium without royalty provided the copyright 5 5 # notice and this notice are preserved. ··· 45 45 ${RELOCATING+ __.data.end = .}; 46 46 } 47 47 .bss ${RELOCATING+ SIZEOF(.data) + ADDR(.data)} : 48 - { 48 + { 49 49 ${RELOCATING+ __.bss.start = .}; 50 50 *(.bss) 51 51 *(COMMON)
+1 -1
ld/scripttempl/dlx.sc
··· 1 1 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 2 - # 2 + # 3 3 # Copying and distribution of this file, with or without modification, 4 4 # are permitted in any medium without royalty provided the copyright 5 5 # notice and this notice are preserved.
+7 -7
ld/scripttempl/elf.sc
··· 1 1 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 2 - # 2 + # 3 3 # Copying and distribution of this file, with or without modification, 4 4 # are permitted in any medium without royalty provided the copyright 5 5 # notice and this notice are preserved. ··· 54 54 # INPUT_FILES - INPUT command of files to always include 55 55 # WRITABLE_RODATA - if set, the .rodata section should be writable 56 56 # INIT_START, INIT_END - statements just before and just after 57 - # combination of .init sections. 57 + # combination of .init sections. 58 58 # FINI_START, FINI_END - statements just before and just after 59 - # combination of .fini sections. 59 + # combination of .fini sections. 60 60 # STACK_ADDR - start of a .stack section. 61 61 # OTHER_SYMBOLS - symbols to place right at the end of the script. 62 62 # ETEXT_NAME - name of a symbol for the end of the text section, ··· 429 429 .rel.dyn ${RELOCATING-0} : 430 430 { 431 431 EOF 432 - sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rela\./d;/__rela_iplt_/d;s/^.*: { *\(.*\)}$/ \1/' $COMBRELOC >> ldscripts/dyntmp.$$ 432 + sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rela\./d;/__rela_iplt_/d;s/^.*: { *\(.*\)}$/ \1/' $COMBRELOC >> ldscripts/dyntmp.$$ 433 433 cat >> ldscripts/dyntmp.$$ <<EOF 434 434 } 435 435 .rela.dyn ${RELOCATING-0} : 436 436 { 437 437 EOF 438 - sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rel\./d;/__rel_iplt_/d;s/^.*: { *\(.*\)}/ \1/' $COMBRELOC >> ldscripts/dyntmp.$$ 438 + sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rel\./d;/__rel_iplt_/d;s/^.*: { *\(.*\)}/ \1/' $COMBRELOC >> ldscripts/dyntmp.$$ 439 439 cat >> ldscripts/dyntmp.$$ <<EOF 440 440 } 441 441 EOF ··· 465 465 cat ldscripts/dyntmp.$$ 466 466 else 467 467 if test -z "${NO_REL_RELOCS}"; then 468 - sed -e '/^[ ]*\.rela\.[^}]*$/,/}/d;/^[ ]*\.rela\./d;/__rela_iplt_/d' ldscripts/dyntmp.$$ 468 + sed -e '/^[ ]*\.rela\.[^}]*$/,/}/d;/^[ ]*\.rela\./d;/__rela_iplt_/d' ldscripts/dyntmp.$$ 469 469 fi 470 470 if test -z "${NO_RELA_RELOCS}"; then 471 - sed -e '/^[ ]*\.rel\.[^}]*$/,/}/d;/^[ ]*\.rel\./d;/__rel_iplt_/d' ldscripts/dyntmp.$$ 471 + sed -e '/^[ ]*\.rel\.[^}]*$/,/}/d;/^[ ]*\.rel\./d;/__rel_iplt_/d' ldscripts/dyntmp.$$ 472 472 fi 473 473 fi 474 474 rm -f ldscripts/dyntmp.$$
+19 -19
ld/scripttempl/elf32cr16.sc
··· 1 1 # Linker Script for National Semiconductor's CR16-ELF32. 2 2 # 3 3 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 4 - # 4 + # 5 5 # Copying and distribution of this file, with or without modification, 6 6 # are permitted in any medium without royalty provided the copyright 7 7 # notice and this notice are preserved. ··· 28 28 /* Define memory regions. */ 29 29 MEMORY 30 30 { 31 - rom : ORIGIN = 0x2, LENGTH = 3M 32 - ram : ORIGIN = 4M, LENGTH = 10M 31 + rom : ORIGIN = 0x2, LENGTH = 3M 32 + ram : ORIGIN = 4M, LENGTH = 10M 33 33 } 34 34 35 35 /* Many sections come in three flavours. There is the 'real' section, ··· 50 50 SECTIONS 51 51 { 52 52 .init : 53 - { 54 - __INIT_START = .; 53 + { 54 + __INIT_START = .; 55 55 KEEP (*(.init)) 56 - __INIT_END = .; 56 + __INIT_END = .; 57 57 } > rom 58 58 59 59 .fini : 60 - { 61 - __FINI_START = .; 60 + { 61 + __FINI_START = .; 62 62 KEEP (*(.fini)) 63 - __FINI_END = .; 63 + __FINI_END = .; 64 64 } > rom 65 65 66 66 .jcr : 67 - { 67 + { 68 68 KEEP (*(.jcr)) 69 69 } > rom 70 70 71 - .text : 71 + .text : 72 72 { 73 73 __TEXT_START = .; 74 74 *(.text) *(.text.*) *(.gnu.linkonce.t.*) ··· 82 82 __RDATA_END = .; 83 83 } > rom 84 84 85 - .ctor ALIGN(4) : 86 - { 87 - __CTOR_START = .; 85 + .ctor ALIGN(4) : 86 + { 87 + __CTOR_START = .; 88 88 /* The compiler uses crtbegin.o to find the start 89 89 of the constructors, so we make sure it is 90 90 first. Because this is a wildcard, it ··· 105 105 KEEP (*(EXCLUDE_FILE (*crtend*.o) .ctors)) 106 106 KEEP (*(SORT(.ctors.*))) 107 107 KEEP (*(.ctors)) 108 - __CTOR_END = .; 108 + __CTOR_END = .; 109 109 } > rom 110 110 111 - .dtor ALIGN(4) : 112 - { 113 - __DTOR_START = .; 111 + .dtor ALIGN(4) : 112 + { 113 + __DTOR_START = .; 114 114 KEEP (*crtbegin*.o(.dtors)) 115 115 KEEP (*(EXCLUDE_FILE (*crtend*.o) .dtors)) 116 116 KEEP (*(SORT(.dtors.*))) 117 117 KEEP (*(.dtors)) 118 - __DTOR_END = .; 118 + __DTOR_END = .; 119 119 } > rom 120 120 121 121 .data :
+4 -4
ld/scripttempl/elf32cr16c.sc
··· 1 1 # Linker Script for National Semiconductor's CR16C-ELF32. 2 2 # 3 3 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 4 - # 4 + # 5 5 # Copying and distribution of this file, with or without modification, 6 6 # are permitted in any medium without royalty provided the copyright 7 7 # notice and this notice are preserved. ··· 26 26 { 27 27 near_rom : ORIGIN = 0x4, LENGTH = 512K - 4 28 28 near_ram : ORIGIN = 512K, LENGTH = 512K - 64K 29 - rom : ORIGIN = 1M, LENGTH = 3M 30 - ram : ORIGIN = 4M, LENGTH = 10M 29 + rom : ORIGIN = 1M, LENGTH = 3M 30 + ram : ORIGIN = 4M, LENGTH = 10M 31 31 } 32 32 33 33 SECTIONS ··· 38 38 there. The alignment to 4 bytes is compatible for both the CR16C 39 39 bus width (2 bytes) and CR16CPlus bus width (4 bytes). */ 40 40 41 - .text : { __TEXT_START = .; *(.text) __TEXT_END = .; } > rom 41 + .text : { __TEXT_START = .; *(.text) __TEXT_END = .; } > rom 42 42 .rdata : { __RDATA_START = .; *(.rdata_4) *(.rdata_2) *(.rdata_1) __RDATA_END = .; } > near_rom 43 43 .ctor ALIGN(4) : { __CTOR_LIST = .; *(.ctors) __CTOR_END = .; } > near_rom 44 44 .dtor ALIGN(4) : { __DTOR_LIST = .; *(.dtors) __DTOR_END = .; } > near_rom
+20 -20
ld/scripttempl/elf32crx.sc
··· 1 1 # Linker Script for National Semiconductor's CRX-ELF32. 2 2 # 3 3 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 4 - # 4 + # 5 5 # Copying and distribution of this file, with or without modification, 6 6 # are permitted in any medium without royalty provided the copyright 7 7 # notice and this notice are preserved. ··· 30 30 /* Define memory regions. */ 31 31 MEMORY 32 32 { 33 - rom : ORIGIN = 0x2, LENGTH = 3M 34 - ram : ORIGIN = 4M, LENGTH = 10M 33 + rom : ORIGIN = 0x2, LENGTH = 3M 34 + ram : ORIGIN = 4M, LENGTH = 10M 35 35 } 36 36 37 37 /* Many sections come in three flavours. There is the 'real' section, ··· 52 52 SECTIONS 53 53 { 54 54 .init : 55 - { 56 - __INIT_START = .; 55 + { 56 + __INIT_START = .; 57 57 KEEP (*(.init)) 58 - __INIT_END = .; 58 + __INIT_END = .; 59 59 } > rom 60 60 61 61 .fini : 62 - { 63 - __FINI_START = .; 62 + { 63 + __FINI_START = .; 64 64 KEEP (*(.fini)) 65 - __FINI_END = .; 65 + __FINI_END = .; 66 66 } > rom 67 67 68 68 .jcr : 69 - { 69 + { 70 70 KEEP (*(.jcr)) 71 71 } > rom 72 72 73 - .text : 73 + .text : 74 74 { 75 75 __TEXT_START = .; 76 76 *(.text) *(.text.*) *(.gnu.linkonce.t.*) ··· 84 84 __RDATA_END = .; 85 85 } > rom 86 86 87 - .ctor ALIGN(4) : 88 - { 89 - __CTOR_START = .; 87 + .ctor ALIGN(4) : 88 + { 89 + __CTOR_START = .; 90 90 /* The compiler uses crtbegin.o to find the start 91 91 of the constructors, so we make sure it is 92 92 first. Because this is a wildcard, it ··· 99 99 100 100 KEEP (*crtbegin.o(.ctors)) 101 101 KEEP (*crtbegin?.o(.ctors)) 102 - 102 + 103 103 /* We don't want to include the .ctor section from 104 104 the crtend.o file until after the sorted ctors. 105 105 The .ctor section from the crtend file contains the ··· 108 108 KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o) .ctors)) 109 109 KEEP (*(SORT(.ctors.*))) 110 110 KEEP (*(.ctors)) 111 - __CTOR_END = .; 111 + __CTOR_END = .; 112 112 } > rom 113 113 114 - .dtor ALIGN(4) : 115 - { 116 - __DTOR_START = .; 114 + .dtor ALIGN(4) : 115 + { 116 + __DTOR_START = .; 117 117 KEEP (*crtbegin.o(.dtors)) 118 118 KEEP (*crtbegin?.o(.dtors)) 119 119 KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o) .dtors)) 120 120 KEEP (*(SORT(.dtors.*))) 121 121 KEEP (*(.dtors)) 122 - __DTOR_END = .; 122 + __DTOR_END = .; 123 123 } > rom 124 124 125 125 .data :
+11 -11
ld/scripttempl/elf32msp430.sc
··· 1 1 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 2 - # 2 + # 3 3 # Copying and distribution of this file, with or without modification, 4 4 # are permitted in any medium without royalty provided the copyright 5 5 # notice and this notice are preserved. ··· 7 7 HEAP_SECTION_MSP430=" " 8 8 HEAP_MEMORY_MSP430=" " 9 9 10 - if test ${GOT_HEAP_MSP-0} -ne 0 11 - then 10 + if test ${GOT_HEAP_MSP-0} -ne 0 11 + then 12 12 HEAP_SECTION_MSP430=".heap ${RELOCATING-0} : 13 13 { 14 14 ${RELOCATING+ PROVIDE (__heap_data_start = .) ; } ··· 18 18 ${RELOCATING+ PROVIDE (__heap_bottom = .) ; } 19 19 ${RELOCATING+ PROVIDE (__heap_top = ${HEAP_START} + ${HEAP_LENGTH}) ; } 20 20 } ${RELOCATING+ > heap}" 21 - HEAP_MEMORY_MSP430="heap(rwx) : ORIGIN = $HEAP_START, LENGTH = $HEAP_LENGTH" 21 + HEAP_MEMORY_MSP430="heap(rwx) : ORIGIN = $HEAP_START, LENGTH = $HEAP_LENGTH" 22 22 fi 23 23 24 24 ··· 34 34 35 35 MEMORY 36 36 { 37 - text (rx) : ORIGIN = $ROM_START, LENGTH = $ROM_SIZE 38 - data (rwx) : ORIGIN = $RAM_START, LENGTH = $RAM_SIZE 39 - vectors (rw) : ORIGIN = 0xffe0, LENGTH = 0x20 37 + text (rx) : ORIGIN = $ROM_START, LENGTH = $ROM_SIZE 38 + data (rwx) : ORIGIN = $RAM_START, LENGTH = $RAM_SIZE 39 + vectors (rw) : ORIGIN = 0xffe0, LENGTH = 0x20 40 40 bootloader(rx) : ORIGIN = 0x0c00, LENGTH = 1K 41 41 infomem(rx) : ORIGIN = 0x1000, LENGTH = 256 42 42 infomemnobits(rx) : ORIGIN = 0x1000, LENGTH = 256 ··· 53 53 ${RELOCATING+. = ALIGN(2);} 54 54 *(.bootloader.*) 55 55 } ${RELOCATING+ > bootloader} 56 - 56 + 57 57 /* Information memory. */ 58 58 .infomem ${RELOCATING-0} : 59 59 { ··· 270 270 271 271 __romdatastart = LOADADDR(.data); 272 272 __romdatacopysize = SIZEOF(.data); 273 - 273 + 274 274 .bss ${RELOCATING+ SIZEOF(.data) + ADDR(.data)} : 275 275 { 276 276 ${RELOCATING+. = ALIGN(2);} ··· 304 304 305 305 /* Stabs for profiling information*/ 306 306 .profiler 0 : { *(.profiler) } 307 - 307 + 308 308 /* Stabs debugging sections. */ 309 - .stab 0 : { *(.stab) } 309 + .stab 0 : { *(.stab) } 310 310 .stabstr 0 : { *(.stabstr) } 311 311 .stab.excl 0 : { *(.stab.excl) } 312 312 .stab.exclstr 0 : { *(.stab.exclstr) }
+7 -7
ld/scripttempl/elf32msp430_3.sc
··· 1 1 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 2 - # 2 + # 3 3 # Copying and distribution of this file, with or without modification, 4 4 # are permitted in any medium without royalty provided the copyright 5 5 # notice and this notice are preserved. ··· 17 17 MEMORY 18 18 { 19 19 text (rx) : ORIGIN = $ROM_START, LENGTH = $ROM_SIZE 20 - data (rwx) : ORIGIN = $RAM_START, LENGTH = $RAM_SIZE 20 + data (rwx) : ORIGIN = $RAM_START, LENGTH = $RAM_SIZE 21 21 vectors (rw) : ORIGIN = 0xffe0, LENGTH = 0x20 22 22 } 23 23 ··· 137 137 } ${RELOCATING+ > text} 138 138 139 139 .data ${RELOCATING-0} : 140 - { 140 + { 141 141 ${RELOCATING+ PROVIDE (__data_start = .) ; } 142 142 ${RELOCATING+. = ALIGN(2);} 143 143 *(.data) ··· 146 146 ${RELOCATING+. = ALIGN(2);} 147 147 ${RELOCATING+ _edata = . ; } 148 148 } ${RELOCATING+ > data ${RELOCATING+AT> text}} 149 - 149 + 150 150 __romdatastart = LOADADDR(.data); 151 151 __romdatacopysize = SIZEOF(.data); 152 - 152 + 153 153 .bss ${RELOCATING+ SIZEOF(.data) + ADDR(.data)} : 154 154 { 155 155 ${RELOCATING+. = ALIGN(2);} ··· 193 193 } 194 194 195 195 /* Stabs debugging sections. */ 196 - .stab 0 : { *(.stab) } 196 + .stab 0 : { *(.stab) } 197 197 .stabstr 0 : { *(.stabstr) } 198 198 .stab.excl 0 : { *(.stab.excl) } 199 199 .stab.exclstr 0 : { *(.stab.exclstr) } 200 200 .stab.index 0 : { *(.stab.index) } 201 201 .stab.indexstr 0 : { *(.stab.indexstr) } 202 202 .comment 0 : { *(.comment) } 203 - 203 + 204 204 EOF 205 205 206 206 . $srcdir/scripttempl/DWARF.sc
+16 -16
ld/scripttempl/elf32sh-symbian.sc
··· 1 1 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 2 - # 2 + # 3 3 # Copying and distribution of this file, with or without modification, 4 4 # are permitted in any medium without royalty provided the copyright 5 5 # notice and this notice are preserved. ··· 29 29 # DATA_PLT - .plt should be in data segment, not text segment. 30 30 # BSS_PLT - .plt should be in bss segment 31 31 # TEXT_DYNAMIC - .dynamic in text segment, not data segment. 32 - # EMBEDDED - whether this is for an embedded system. 32 + # EMBEDDED - whether this is for an embedded system. 33 33 # SHLIB_TEXT_START_ADDR - if set, add to SIZEOF_HEADERS to set 34 34 # start address of shared library. 35 35 # INPUT_FILES - INPUT command of files to always include 36 36 # WRITABLE_RODATA - if set, the .rodata section should be writable 37 37 # INIT_START, INIT_END - statements just before and just after 38 - # combination of .init sections. 38 + # combination of .init sections. 39 39 # FINI_START, FINI_END - statements just before and just after 40 - # combination of .fini sections. 40 + # combination of .fini sections. 41 41 # STACK_ADDR - start of a .stack section. 42 42 # OTHER_SYMBOLS - symbols to place right at the end of the script. 43 43 # ··· 104 104 KEEP (*(.fini_array)) 105 105 ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (__fini_array_end = .);}} 106 106 }" 107 - CTOR=".ctors ALIGN(4) : 107 + CTOR=".ctors ALIGN(4) : 108 108 { 109 109 ${CONSTRUCTING+${CTOR_START}} 110 110 /* gcc uses crtbegin.o to find the start of ··· 191 191 ${CREATE_SHLIB+${RELOCATING+. = ${SHLIB_TEXT_START_ADDR:-0};}} 192 192 ${CREATE_PIE+${RELOCATING+. = ${SHLIB_TEXT_START_ADDR:-0};}} 193 193 ${CREATE_SHLIB-${INTERP}} 194 - 194 + 195 195 ${INITIAL_READONLY_SECTIONS} 196 196 197 - .init ALIGN(4) : 198 - { 197 + .init ALIGN(4) : 198 + { 199 199 ${RELOCATING+${INIT_START}} 200 200 KEEP (*(.init)) 201 201 ${RELOCATING+${INIT_END}} ··· 209 209 *(.gnu.warning) 210 210 ${RELOCATING+${OTHER_TEXT_SECTIONS}} 211 211 } =${NOP-0} 212 - 212 + 213 213 ${RELOCATING+${CTOR}} 214 214 ${RELOCATING+${DTOR}} 215 - 215 + 216 216 .fini ALIGN(4) : 217 217 { 218 218 ${RELOCATING+${FINI_START}} 219 219 KEEP (*(.fini)) 220 220 ${RELOCATING+${FINI_END}} 221 221 } =${NOP-0} 222 - 222 + 223 223 ${RELOCATING+PROVIDE (__etext = .);} 224 224 ${RELOCATING+PROVIDE (_etext = .);} 225 225 ${RELOCATING+PROVIDE (etext = .);} 226 - 226 + 227 227 ${WRITABLE_RODATA-${RODATA}} 228 228 .rodata1 ALIGN(4) : { *(.rodata1) } 229 - 229 + 230 230 ExportTable ALIGN(4) : { KEEP (*(ExportTable)) } 231 231 .eh_frame_hdr ALIGN(4) : { *(.eh_frame_hdr) } :text 232 232 ··· 252 252 *(.data${RELOCATING+ .data.* .gnu.linkonce.d.*}) 253 253 ${CONSTRUCTING+SORT(CONSTRUCTORS)} 254 254 } :data 255 - 255 + 256 256 .data1 ALIGN(4) : { *(.data1) } :data 257 257 .tdata ALIGN(4) : { *(.tdata${RELOCATING+ .tdata.* .gnu.linkonce.td.*}) } :data 258 258 .tbss ALIGN(4) : { *(.tbss${RELOCATING+ .tbss.* .gnu.linkonce.tb.*})${RELOCATING+ *(.tcommon)} } :data ··· 331 331 .rel.dyn ${RELOCATING-0} : 332 332 { 333 333 EOF 334 - sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rela\./d;s/^.*: { *\(.*\)}$/ \1/' $COMBRELOC 334 + sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rela\./d;s/^.*: { *\(.*\)}$/ \1/' $COMBRELOC 335 335 cat <<EOF 336 336 } 337 337 .rela.dyn ${RELOCATING-0} : 338 338 { 339 339 EOF 340 - sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rel\./d;s/^.*: { *\(.*\)}/ \1/' $COMBRELOC 340 + sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rel\./d;s/^.*: { *\(.*\)}/ \1/' $COMBRELOC 341 341 cat <<EOF 342 342 } 343 343 EOF
+23 -23
ld/scripttempl/elf32xc16x.sc
··· 1 1 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 2 - # 2 + # 3 3 # Copying and distribution of this file, with or without modification, 4 4 # are permitted in any medium without royalty provided the copyright 5 5 # notice and this notice are preserved. ··· 16 16 ${RELOCATING+ENTRY ("_start")} 17 17 MEMORY 18 18 { 19 - 20 - vectarea : o =0x00000, l = 0x0300 21 - 19 + 20 + vectarea : o =0x00000, l = 0x0300 21 + 22 22 introm : o = 0x00400, l = 0x16000 23 23 /* The stack starts at the top of main ram. */ 24 - 24 + 25 25 dram : o = 0x8000 , l = 0xffff 26 26 /* At the very top of the address space is the 8-bit area. */ 27 - 28 - ldata : o =0x4000 ,l = 0x0200 27 + 28 + ldata : o =0x4000 ,l = 0x0200 29 29 } 30 30 31 31 SECTIONS 32 32 { 33 33 .init : 34 - { 35 - *(.init) 36 - } ${RELOCATING+ >introm} 37 - 34 + { 35 + *(.init) 36 + } ${RELOCATING+ >introm} 37 + 38 38 .text : 39 39 { 40 - *(.rodata) 40 + *(.rodata) 41 41 *(.text.*) 42 42 *(.text) 43 - ${RELOCATING+ _etext = . ; } 43 + ${RELOCATING+ _etext = . ; } 44 44 } ${RELOCATING+ > introm} 45 45 .data : 46 46 { 47 47 *(.data) 48 48 *(.data.*) 49 - 49 + 50 50 ${RELOCATING+ _edata = . ; } 51 51 } ${RELOCATING+ > dram} 52 52 ··· 58 58 ${RELOCATING+ _end = . ; } 59 59 } ${RELOCATING+ > dram} 60 60 61 - .ldata : 62 - { 63 - *(.ldata) 64 - } ${RELOCATING+ > ldata} 61 + .ldata : 62 + { 63 + *(.ldata) 64 + } ${RELOCATING+ > ldata} 65 + 65 66 66 - 67 - .vects : 68 - { 69 - *(.vects) 70 - } ${RELOCATING+ > vectarea} 67 + .vects : 68 + { 69 + *(.vects) 70 + } ${RELOCATING+ > vectarea} 71 71 72 72 } 73 73 EOF
+24 -27
ld/scripttempl/elf32xc16xl.sc
··· 1 1 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 2 - # 2 + # 3 3 # Copying and distribution of this file, with or without modification, 4 4 # are permitted in any medium without royalty provided the copyright 5 5 # notice and this notice are preserved. ··· 16 16 ${RELOCATING+ENTRY ("_start")} 17 17 MEMORY 18 18 { 19 - vectarea : o =0xc00000, l = 0x0300 20 - 19 + vectarea : o =0xc00000, l = 0x0300 20 + 21 21 introm : o = 0xc00300, l = 0x16000 22 22 /* The stack starts at the top of main ram. */ 23 - 23 + 24 24 dram : o = 0x8000 , l = 0xffff 25 25 /* At the very top of the address space is the 8-bit area. */ 26 - 27 - ldata : o =0x4000 ,l = 0x0200 26 + 27 + ldata : o =0x4000 ,l = 0x0200 28 28 } 29 29 SECTIONS 30 30 { 31 31 /*.vects : 32 - { 33 - *(.vects) 34 - } ${RELOCATING+ > vectarea} */ 32 + { 33 + *(.vects) 34 + } ${RELOCATING+ > vectarea} */ 35 35 .init : 36 - { 37 - *(.init) 38 - } ${RELOCATING+ >introm} 39 - 36 + { 37 + *(.init) 38 + } ${RELOCATING+ >introm} 39 + 40 40 .text : 41 41 { 42 - *(.rodata) 42 + *(.rodata) 43 43 *(.text.*) 44 44 *(.text) 45 - ${RELOCATING+ _etext = . ; } 45 + ${RELOCATING+ _etext = . ; } 46 46 } ${RELOCATING+ > introm} 47 47 .data : 48 48 { 49 49 *(.data) 50 50 *(.data.*) 51 - 51 + 52 52 ${RELOCATING+ _edata = . ; } 53 53 } ${RELOCATING+ > dram} 54 54 ··· 60 60 ${RELOCATING+ _end = . ; } 61 61 } ${RELOCATING+ > dram} 62 62 63 - .ldata : 64 - { 65 - *(.ldata) 66 - } ${RELOCATING+ > ldata} 63 + .ldata : 64 + { 65 + *(.ldata) 66 + } ${RELOCATING+ > ldata} 67 67 68 - 69 - .vects : 70 - { 71 - *(.vects) 72 - } ${RELOCATING+ > vectarea} 73 - 74 - 68 + .vects : 69 + { 70 + *(.vects) 71 + } ${RELOCATING+ > vectarea} 75 72 } 76 73 EOF
+24 -24
ld/scripttempl/elf32xc16xs.sc
··· 1 1 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 2 - # 2 + # 3 3 # Copying and distribution of this file, with or without modification, 4 4 # are permitted in any medium without royalty provided the copyright 5 5 # notice and this notice are preserved. ··· 16 16 ${RELOCATING+ENTRY ("_start")} 17 17 MEMORY 18 18 { 19 - vectarea : o =0xc00000, l = 0x0300 20 - 19 + vectarea : o =0xc00000, l = 0x0300 20 + 21 21 introm : o = 0xc00300, l = 0x16000 22 22 /* The stack starts at the top of main ram. */ 23 - 23 + 24 24 dram : o = 0x8000 , l = 0xffff 25 25 /* At the very top of the address space is the 8-bit area. */ 26 - 27 - ldata : o =0x4000 ,l = 0x0200 26 + 27 + ldata : o =0x4000 ,l = 0x0200 28 28 } 29 29 SECTIONS 30 30 { 31 31 /*.vects : 32 - { 33 - *(.vects) 34 - } ${RELOCATING+ > vectarea} */ 32 + { 33 + *(.vects) 34 + } ${RELOCATING+ > vectarea} */ 35 35 .init : 36 - { 37 - *(.init) 38 - } ${RELOCATING+ >introm} 39 - 36 + { 37 + *(.init) 38 + } ${RELOCATING+ >introm} 39 + 40 40 .text : 41 41 { 42 - *(.rodata) 42 + *(.rodata) 43 43 *(.text.*) 44 44 *(.text) 45 - ${RELOCATING+ _etext = . ; } 45 + ${RELOCATING+ _etext = . ; } 46 46 } ${RELOCATING+ > introm} 47 47 .data : 48 48 { 49 49 *(.data) 50 50 *(.data.*) 51 - 51 + 52 52 ${RELOCATING+ _edata = . ; } 53 53 } ${RELOCATING+ > dram} 54 54 ··· 60 60 ${RELOCATING+ _end = . ; } 61 61 } ${RELOCATING+ > dram} 62 62 63 - .ldata : 64 - { 65 - *(.ldata) 66 - } ${RELOCATING+ > ldata} 63 + .ldata : 64 + { 65 + *(.ldata) 66 + } ${RELOCATING+ > ldata} 67 67 68 - .vects : 69 - { 70 - *(.vects) 71 - } ${RELOCATING+ > vectarea} 68 + .vects : 69 + { 70 + *(.vects) 71 + } ${RELOCATING+ > vectarea} 72 72 } 73 73 EOF
+14 -14
ld/scripttempl/elf64hppa.sc
··· 1 1 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 2 - # 2 + # 3 3 # Copying and distribution of this file, with or without modification, 4 4 # are permitted in any medium without royalty provided the copyright 5 5 # notice and this notice are preserved. ··· 45 45 # NO_RELA_RELOCS - Don't include .rela.* sections in script 46 46 # NON_ALLOC_DYN - Place dynamic sections after data segment. 47 47 # TEXT_DYNAMIC - .dynamic in text segment, not data segment. 48 - # EMBEDDED - whether this is for an embedded system. 48 + # EMBEDDED - whether this is for an embedded system. 49 49 # SHLIB_TEXT_START_ADDR - if set, add to SIZEOF_HEADERS to set 50 50 # start address of shared library. 51 51 # INPUT_FILES - INPUT command of files to always include 52 52 # WRITABLE_RODATA - if set, the .rodata section should be writable 53 53 # INIT_START, INIT_END - statements just before and just after 54 - # combination of .init sections. 54 + # combination of .init sections. 55 55 # FINI_START, FINI_END - statements just before and just after 56 - # combination of .fini sections. 56 + # combination of .fini sections. 57 57 # STACK_ADDR - start of a .stack section. 58 58 # OTHER_SYMBOLS - symbols to place right at the end of the script. 59 59 # ETEXT_NAME - name of a symbol for the end of the text section, ··· 147 147 SDATA="/* We want the small data sections together, so single-instruction offsets 148 148 can access them all, and initialized data all before uninitialized, so 149 149 we can shorten the on-disk segment size. */ 150 - .sdata ${RELOCATING-0} : 150 + .sdata ${RELOCATING-0} : 151 151 { 152 152 ${RELOCATING+${SDATA_START_SYMBOLS}} 153 153 ${CREATE_SHLIB+*(.sdata2 .sdata2.* .gnu.linkonce.s2.*)} ··· 219 219 KEEP (*(.fini_array)) 220 220 ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (${USER_LABEL_PREFIX}__fini_array_end = .);}} 221 221 }" 222 - CTOR=".ctors ${CONSTRUCTING-0} : 222 + CTOR=".ctors ${CONSTRUCTING-0} : 223 223 { 224 224 ${CONSTRUCTING+${CTOR_START}} 225 225 /* gcc uses crtbegin.o to find the start of ··· 359 359 .rel.dyn ${RELOCATING-0} : 360 360 { 361 361 EOF 362 - sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rela\./d;s/^.*: { *\(.*\)}$/ \1/' $COMBRELOC >> ldscripts/dyntmp.$$ 362 + sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rela\./d;s/^.*: { *\(.*\)}$/ \1/' $COMBRELOC >> ldscripts/dyntmp.$$ 363 363 cat >> ldscripts/dyntmp.$$ <<EOF 364 364 } 365 365 .rel.ifunc.dyn ${RELOCATING-0} : ··· 369 369 .rela.dyn ${RELOCATING-0} : 370 370 { 371 371 EOF 372 - sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rel\./d;s/^.*: { *\(.*\)}/ \1/' $COMBRELOC >> ldscripts/dyntmp.$$ 372 + sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rel\./d;s/^.*: { *\(.*\)}/ \1/' $COMBRELOC >> ldscripts/dyntmp.$$ 373 373 cat >> ldscripts/dyntmp.$$ <<EOF 374 374 } 375 375 .rela.ifunc.dyn ${RELOCATING-0} : ··· 390 390 cat ldscripts/dyntmp.$$ 391 391 else 392 392 if test -z "${NO_REL_RELOCS}"; then 393 - sed -e '/^[ ]*\.rela\.[^}]*$/,/}/d' -e '/^[ ]*\.rela\./d' ldscripts/dyntmp.$$ 393 + sed -e '/^[ ]*\.rela\.[^}]*$/,/}/d' -e '/^[ ]*\.rela\./d' ldscripts/dyntmp.$$ 394 394 fi 395 395 if test -z "${NO_RELA_RELOCS}"; then 396 - sed -e '/^[ ]*\.rel\.[^}]*$/,/}/d' -e '/^[ ]*\.rel\./d' ldscripts/dyntmp.$$ 396 + sed -e '/^[ ]*\.rel\.[^}]*$/,/}/d' -e '/^[ ]*\.rel\./d' ldscripts/dyntmp.$$ 397 397 fi 398 398 fi 399 399 rm -f ldscripts/dyntmp.$$ 400 400 fi 401 401 402 402 cat <<EOF 403 - .init ${RELOCATING-0} : 404 - { 403 + .init ${RELOCATING-0} : 404 + { 405 405 ${RELOCATING+${INIT_START}} 406 406 KEEP (*(.init)) 407 407 ${RELOCATING+${INIT_END}} ··· 524 524 cat ldscripts/dyntmp.$$ 525 525 else 526 526 if test -z "${NO_REL_RELOCS}"; then 527 - sed -e '/^[ ]*\.rela\.[^}]*$/,/}/d' -e '/^[ ]*\.rela\./d' ldscripts/dyntmp.$$ 527 + sed -e '/^[ ]*\.rela\.[^}]*$/,/}/d' -e '/^[ ]*\.rela\./d' ldscripts/dyntmp.$$ 528 528 fi 529 529 if test -z "${NO_RELA_RELOCS}"; then 530 - sed -e '/^[ ]*\.rel\.[^}]*$/,/}/d' -e '/^[ ]*\.rel\./d' ldscripts/dyntmp.$$ 530 + sed -e '/^[ ]*\.rel\.[^}]*$/,/}/d' -e '/^[ ]*\.rel\./d' ldscripts/dyntmp.$$ 531 531 fi 532 532 fi 533 533 rm -f ldscripts/dyntmp.$$
+7 -7
ld/scripttempl/elf_chaos.sc
··· 1 1 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 2 - # 2 + # 3 3 # Copying and distribution of this file, with or without modification, 4 4 # are permitted in any medium without royalty provided the copyright 5 5 # notice and this notice are preserved. ··· 31 31 # DATA_PLT - .plt should be in data segment, not text segment. 32 32 # BSS_PLT - .plt should be in bss segment 33 33 # TEXT_DYNAMIC - .dynamic in text segment, not data segment. 34 - # EMBEDDED - whether this is for an embedded system. 34 + # EMBEDDED - whether this is for an embedded system. 35 35 # SHLIB_TEXT_START_ADDR - if set, add to SIZEOF_HEADERS to set 36 36 # start address of shared library. 37 37 # INPUT_FILES - INPUT command of files to always include 38 38 # WRITABLE_RODATA - if set, the .rodata section should be writable 39 39 # INIT_START, INIT_END - statements just before and just after 40 - # combination of .init sections. 40 + # combination of .init sections. 41 41 # FINI_START, FINI_END - statements just before and just after 42 - # combination of .fini sections. 42 + # combination of .fini sections. 43 43 # STACK_ADDR - start of a .stack section. 44 44 # OTHER_SYMBOLS - symbols to place right at the end of the script. 45 45 # ··· 95 95 SDATA="/* We want the small data sections together, so single-instruction offsets 96 96 can access them all, and initialized data all before uninitialized, so 97 97 we can shorten the on-disk segment size. */ 98 - .sdata ${RELOCATING-0} : 98 + .sdata ${RELOCATING-0} : 99 99 { 100 100 ${RELOCATING+${SDATA_START_SYMBOLS}} 101 101 *(.sdata${RELOCATING+ .sdata.* .gnu.linkonce.s.*}) ··· 226 226 .rel.dyn ${RELOCATING-0} : 227 227 { 228 228 EOF 229 - sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rela\./d;s/^.*: { *\(.*\)}$/ \1/' $COMBRELOC 229 + sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rela\./d;s/^.*: { *\(.*\)}$/ \1/' $COMBRELOC 230 230 cat <<EOF 231 231 } 232 232 .rela.dyn ${RELOCATING-0} : 233 233 { 234 234 EOF 235 - sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rel\./d;s/^.*: { *\(.*\)}/ \1/' $COMBRELOC 235 + sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rel\./d;s/^.*: { *\(.*\)}/ \1/' $COMBRELOC 236 236 cat <<EOF 237 237 } 238 238 EOF
+15 -15
ld/scripttempl/elfarc.sc
··· 26 26 # DATA_PLT - .plt should be in data segment, not text segment. 27 27 # BSS_PLT - .plt should be in bss segment 28 28 # TEXT_DYNAMIC - .dynamic in text segment, not data segment. 29 - # EMBEDDED - whether this is for an embedded system. 29 + # EMBEDDED - whether this is for an embedded system. 30 30 # SHLIB_TEXT_START_ADDR - if set, add to SIZEOF_HEADERS to set 31 31 # start address of shared library. 32 32 # INPUT_FILES - INPUT command of files to always include 33 33 # WRITABLE_RODATA - if set, the .rodata section should be writable 34 34 # INIT_START, INIT_END - statements just before and just after 35 - # combination of .init sections. 35 + # combination of .init sections. 36 36 # FINI_START, FINI_END - statements just before and just after 37 - # combination of .fini sections. 37 + # combination of .fini sections. 38 38 # STACK_ADDR - start of a .stack section. 39 39 # OTHER_END_SYMBOLS - symbols to place right at the end of the script. 40 40 # ··· 103 103 SDATA="/* We want the small data sections together, so single-instruction offsets 104 104 can access them all, and initialized data all before uninitialized, so 105 105 we can shorten the on-disk segment size. */ 106 - .sdata ${RELOCATING-0} : 106 + .sdata ${RELOCATING-0} : 107 107 { 108 108 ${RELOCATING+${SDATA_START_SYMBOLS}} 109 109 *(.sdata${RELOCATING+ .sdata.* .gnu.linkonce.s.*}) ··· 118 118 REL_SBSS2=".rel.sbss2 ${RELOCATING-0} : { *(.rel.sbss2${RELOCATING+ .rel.sbss2.* .rel.gnu.linkonce.sb2.*}) } 119 119 .rela.sbss2 ${RELOCATING-0} : { *(.rela.sbss2${RELOCATING+ .rela.sbss2.* .rela.gnu.linkonce.sb2.*}) }" 120 120 fi 121 - CTOR=".ctors ${CONSTRUCTING-0} : 121 + CTOR=".ctors ${CONSTRUCTING-0} : 122 122 { 123 123 ${CONSTRUCTING+${CTOR_START}} 124 124 /* gcc uses crtbegin.o to find the start of ··· 238 238 .rel.dyn ${RELOCATING-0} : 239 239 { 240 240 EOF 241 - sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rela\./d;s/^.*: { *\(.*\)}$/ \1/' $COMBRELOC 241 + sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rela\./d;s/^.*: { *\(.*\)}$/ \1/' $COMBRELOC 242 242 cat <<EOF 243 243 } 244 244 .rela.dyn ${RELOCATING-0} : 245 245 { 246 246 EOF 247 - sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rel\./d;s/^.*: { *\(.*\)}/ \1/' $COMBRELOC 247 + sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rel\./d;s/^.*: { *\(.*\)}/ \1/' $COMBRELOC 248 248 cat <<EOF 249 249 } 250 250 EOF ··· 254 254 .rela.plt ${RELOCATING-0} : { *(.rela.plt) } 255 255 ${OTHER_PLT_RELOC_SECTIONS} 256 256 257 - .init ${RELOCATING-0} : 258 - { 257 + .init ${RELOCATING-0} : 258 + { 259 259 ${RELOCATING+${INIT_START}} 260 260 KEEP (*(.init)) 261 261 ${RELOCATING+${INIT_END}} ··· 382 382 the setting from ldflags prevails. */ 383 383 .heap ${RELOCATING-0} : 384 384 { 385 - ${RELOCATING+ __start_heap = . ; } 386 - ${RELOCATING+ . = . + (DEFINED(__HEAP_SIZE) ? __HEAP_SIZE : (DEFINED(__DEFAULT_HEAP_SIZE) ? __DEFAULT_HEAP_SIZE : 20k)) ; } 387 - ${RELOCATING+ __end_heap = . ; } 385 + ${RELOCATING+ __start_heap = . ; } 386 + ${RELOCATING+ . = . + (DEFINED(__HEAP_SIZE) ? __HEAP_SIZE : (DEFINED(__DEFAULT_HEAP_SIZE) ? __DEFAULT_HEAP_SIZE : 20k)) ; } 387 + ${RELOCATING+ __end_heap = . ; } 388 388 } 389 389 390 390 ${RELOCATING+. = ALIGN(0x8);} 391 391 .stack ${RELOCATING-0} : 392 392 { 393 - ${RELOCATING+ __stack = . ; } 394 - ${RELOCATING+ . = . + (DEFINED(__STACK_SIZE) ? __STACK_SIZE : (DEFINED(__DEFAULT_STACK_SIZE) ? __DEFAULT_STACK_SIZE : 64k)) ; } 395 - ${RELOCATING+ __stack_top = . ; } 393 + ${RELOCATING+ __stack = . ; } 394 + ${RELOCATING+ . = . + (DEFINED(__STACK_SIZE) ? __STACK_SIZE : (DEFINED(__DEFAULT_STACK_SIZE) ? __DEFAULT_STACK_SIZE : 64k)) ; } 395 + ${RELOCATING+ __stack_top = . ; } 396 396 } 397 397 398 398 /* Stabs debugging sections. */
+1 -1
ld/scripttempl/elfarcv2.sc
··· 19 19 test -z "${ALIGNMENT}" && ALIGNMENT="${ELFSIZE} / 8" 20 20 test "$LD_FLAG" = "N" && DATA_ADDR=. 21 21 22 - CTOR=".ctors ${CONSTRUCTING-0} : 22 + CTOR=".ctors ${CONSTRUCTING-0} : 23 23 { 24 24 ${CONSTRUCTING+${CTOR_START}} 25 25 /* gcc uses crtbegin.o to find the start of
+6 -6
ld/scripttempl/elfd10v.sc
··· 1 1 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 2 - # 2 + # 3 3 # Copying and distribution of this file, with or without modification, 4 4 # are permitted in any medium without royalty provided the copyright 5 5 # notice and this notice are preserved. ··· 9 9 test -z "${LITTLE_OUTPUT_FORMAT}" && LITTLE_OUTPUT_FORMAT=${OUTPUT_FORMAT} 10 10 if [ -z "$MACHINE" ]; then OUTPUT_ARCH=${ARCH}; else OUTPUT_ARCH=${ARCH}:${MACHINE}; fi 11 11 test "$LD_FLAG" = "N" && DATA_ADDR=. 12 - INTERP=".interp ${RELOCATING-0} : { *(.interp) }" 13 - PLT=".plt ${RELOCATING-0} : { *(.plt) }" 12 + INTERP=".interp ${RELOCATING-0} : { *(.interp) }" 13 + PLT=".plt ${RELOCATING-0} : { *(.plt) }" 14 14 15 15 16 - CTOR=".ctors ${CONSTRUCTING-0} : 16 + CTOR=".ctors ${CONSTRUCTING-0} : 17 17 { 18 18 ${CONSTRUCTING+${CTOR_START}} 19 19 /* gcc uses crtbegin.o to find the start of ··· 83 83 There are other memory regions available on 84 84 the TS3 (eg ROM, FLASH, etc) but these are not 85 85 used by this script. */ 86 - 86 + 87 87 INSN : org = 0x01000000, len = 256K 88 88 DATA : org = 0x02000000, len = 48K 89 89 90 90 /* This is a fake memory region at the top of the 91 91 on-chip RAM, used as the start of the 92 92 (descending) stack. */ 93 - 93 + 94 94 STACK : org = 0x0200BFFC, len = 4 95 95 } 96 96
+3 -3
ld/scripttempl/elfd30v.sc
··· 1 1 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 2 - # 2 + # 3 3 # Copying and distribution of this file, with or without modification, 4 4 # are permitted in any medium without royalty provided the copyright 5 5 # notice and this notice are preserved. 6 6 7 - CTOR=".ctors ${CONSTRUCTING-0} : 7 + CTOR=".ctors ${CONSTRUCTING-0} : 8 8 { 9 9 ${CONSTRUCTING+ __CTOR_LIST__ = .; } 10 10 /* gcc uses crtbegin.o to find the start of ··· 206 206 207 207 . $srcdir/scripttempl/DWARF.sc 208 208 209 - cat <<EOF 209 + cat <<EOF 210 210 PROVIDE (__stack = ${STACK_START_ADDR}); 211 211 } 212 212 EOF
+2 -2
ld/scripttempl/elfi370.sc
··· 1 1 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 2 - # 2 + # 3 3 # Copying and distribution of this file, with or without modification, 4 4 # are permitted in any medium without royalty provided the copyright 5 5 # notice and this notice are preserved. ··· 199 199 200 200 . $srcdir/scripttempl/DWARF.sc 201 201 202 - cat <<EOF 202 + cat <<EOF 203 203 ${ATTRS_SECTIONS} 204 204 ${OTHER_SECTIONS} 205 205 }
+11 -11
ld/scripttempl/elfm68hc11.sc
··· 1 1 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 2 - # 2 + # 3 3 # Copying and distribution of this file, with or without modification, 4 4 # are permitted in any medium without royalty provided the copyright 5 5 # notice and this notice are preserved. ··· 18 18 # .data section. 19 19 # OTHER_BSS_SYMBOLS - symbols that appear at the start of the 20 20 # .bss section besides __bss_start. 21 - # EMBEDDED - whether this is for an embedded system. 21 + # EMBEDDED - whether this is for an embedded system. 22 22 # 23 23 # When adding sections, do note that the names of some sections are used 24 24 # when specifying the start address of the next. ··· 29 29 if [ -z "$MACHINE" ]; then OUTPUT_ARCH=${ARCH}; else OUTPUT_ARCH=${ARCH}:${MACHINE}; fi 30 30 test "$LD_FLAG" = "N" && DATA_ADDR=. 31 31 32 - CTOR=".ctors ${CONSTRUCTING-0} : 32 + CTOR=".ctors ${CONSTRUCTING-0} : 33 33 { 34 34 ${CONSTRUCTING+ PROVIDE (__CTOR_LIST__ = .); } 35 35 ${CONSTRUCTING+${CTOR_START}} ··· 57 57 Bootstrap 0x00c0 58 58 Test 0xbfc0 59 59 60 - In general, the vectors address is 0xffc0. This can be overriden 60 + In general, the vectors address is 0xffc0. This can be overriden 61 61 with the '-defsym vectors_addr=0xbfc0' ld option. 62 62 63 63 Note: for the bootstrap mode, the interrupt vectors are at 0xbfc0 but ··· 239 239 ${RELOCATING+*(.rela.gnu.linkonce.s.*)} 240 240 } 241 241 .rel.sbss ${RELOCATING-0} : 242 - { 242 + { 243 243 *(.rel.sbss) 244 244 ${RELOCATING+*(.rel.sbss.*)} 245 245 ${RELOCATING+*(.rel.gnu.linkonce.sb.*)} ··· 250 250 ${RELOCATING+*(.rela.sbss.*)} 251 251 ${RELOCATING+*(.rel.gnu.linkonce.sb.*)} 252 252 } 253 - .rel.bss ${RELOCATING-0} : 254 - { 253 + .rel.bss ${RELOCATING-0} : 254 + { 255 255 *(.rel.bss) 256 256 ${RELOCATING+*(.rel.bss.*)} 257 257 ${RELOCATING+*(.rel.gnu.linkonce.b.*)} 258 258 } 259 - .rela.bss ${RELOCATING-0} : 260 - { 259 + .rela.bss ${RELOCATING-0} : 260 + { 261 261 *(.rela.bss) 262 262 ${RELOCATING+*(.rela.bss.*)} 263 263 ${RELOCATING+*(.rela.gnu.linkonce.b.*)} ··· 300 300 } ${RELOCATING+ > page0} 301 301 302 302 /* Start of text section. */ 303 - .stext ${RELOCATING-0} : 303 + .stext ${RELOCATING-0} : 304 304 { 305 305 *(.stext) 306 306 } ${RELOCATING+ > ${TEXT_MEMORY}} 307 307 308 308 .init ${RELOCATING-0} : 309 309 { 310 - *(.init) 310 + *(.init) 311 311 } ${RELOCATING+=${NOP-0}} 312 312 313 313 ${RELOCATING-${INSTALL_RELOC}}
+11 -11
ld/scripttempl/elfm68hc12.sc
··· 1 1 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 2 - # 2 + # 3 3 # Copying and distribution of this file, with or without modification, 4 4 # are permitted in any medium without royalty provided the copyright 5 5 # notice and this notice are preserved. ··· 18 18 # .data section. 19 19 # OTHER_BSS_SYMBOLS - symbols that appear at the start of the 20 20 # .bss section besides __bss_start. 21 - # EMBEDDED - whether this is for an embedded system. 21 + # EMBEDDED - whether this is for an embedded system. 22 22 # 23 23 # When adding sections, do note that the names of some sections are used 24 24 # when specifying the start address of the next. ··· 29 29 if [ -z "$MACHINE" ]; then OUTPUT_ARCH=${ARCH}; else OUTPUT_ARCH=${ARCH}:${MACHINE}; fi 30 30 test "$LD_FLAG" = "N" && DATA_ADDR=. 31 31 32 - CTOR=".ctors ${CONSTRUCTING-0} : 32 + CTOR=".ctors ${CONSTRUCTING-0} : 33 33 { 34 34 ${CONSTRUCTING+ PROVIDE (__CTOR_LIST__ = .); } 35 35 ${CONSTRUCTING+${CTOR_START}} ··· 57 57 Bootstrap 0x00c0 58 58 Test 0xbfc0 59 59 60 - In general, the vectors address is 0xffc0. This can be overriden 60 + In general, the vectors address is 0xffc0. This can be overriden 61 61 with the '-defsym vectors_addr=0xbfc0' ld option. 62 62 63 63 Note: for the bootstrap mode, the interrupt vectors are at 0xbfc0 but ··· 239 239 ${RELOCATING+*(.rela.gnu.linkonce.s.*)} 240 240 } 241 241 .rel.sbss ${RELOCATING-0} : 242 - { 242 + { 243 243 *(.rel.sbss) 244 244 ${RELOCATING+*(.rel.sbss.*)} 245 245 ${RELOCATING+*(.rel.gnu.linkonce.sb.*)} ··· 250 250 ${RELOCATING+*(.rela.sbss.*)} 251 251 ${RELOCATING+*(.rel.gnu.linkonce.sb.*)} 252 252 } 253 - .rel.bss ${RELOCATING-0} : 254 - { 253 + .rel.bss ${RELOCATING-0} : 254 + { 255 255 *(.rel.bss) 256 256 ${RELOCATING+*(.rel.bss.*)} 257 257 ${RELOCATING+*(.rel.gnu.linkonce.b.*)} 258 258 } 259 - .rela.bss ${RELOCATING-0} : 260 - { 259 + .rela.bss ${RELOCATING-0} : 260 + { 261 261 *(.rela.bss) 262 262 ${RELOCATING+*(.rela.bss.*)} 263 263 ${RELOCATING+*(.rela.gnu.linkonce.b.*)} ··· 299 299 } ${RELOCATING+ > page0} 300 300 301 301 /* Start of text section. */ 302 - .stext ${RELOCATING-0} : 302 + .stext ${RELOCATING-0} : 303 303 { 304 304 *(.stext) 305 305 } ${RELOCATING+ > ${TEXT_MEMORY}} 306 306 307 307 .init ${RELOCATING-0} : 308 308 { 309 - *(.init) 309 + *(.init) 310 310 } ${RELOCATING+=${NOP-0}} 311 311 312 312 ${RELOCATING-${INSTALL_RELOC}}
+18 -18
ld/scripttempl/elfmicroblaze.sc
··· 1 1 # Adapted from mips.sc 2 2 # 3 3 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 4 - # 4 + # 5 5 # Copying and distribution of this file, with or without modification, 6 6 # are permitted in any medium without royalty provided the copyright 7 7 # notice and this notice are preserved. ··· 13 13 14 14 #test -z "$TEXT_START_ADDR" && TEXT_START_ADDR="0x0" 15 15 16 - CTOR=".ctors ${CONSTRUCTING-0} : 16 + CTOR=".ctors ${CONSTRUCTING-0} : 17 17 { 18 18 ${CONSTRUCTING+${CTOR_START}} 19 19 /* gcc uses crtbegin.o to find the start of ··· 63 63 64 64 ${RELOCATING+ENTRY (${ENTRY})} 65 65 66 - _TEXT_START_ADDR = DEFINED(_TEXT_START_ADDR) ? _TEXT_START_ADDR : 0x50; 66 + _TEXT_START_ADDR = DEFINED(_TEXT_START_ADDR) ? _TEXT_START_ADDR : 0x50; 67 67 _HEAP_SIZE = DEFINED(_HEAP_SIZE) ? _HEAP_SIZE : 0x0; 68 68 _STACK_SIZE = DEFINED(_STACK_SIZE) ? _STACK_SIZE : 0x400; 69 69 ··· 121 121 } 122 122 ${RELOCATING+. = ALIGN(4);} 123 123 .sbss2 : { 124 - ${RELOCATING+PROVIDE (__sbss2_start = .);} 124 + ${RELOCATING+PROVIDE (__sbss2_start = .);} 125 125 ${RELOCATING+*(.sbss2)} 126 126 ${RELOCATING+*(.sbss2.*)} 127 127 ${RELOCATING+*(.gnu.linkonce.sb2.*)} ··· 140 140 ${CONSTRUCTING+CONSTRUCTORS}; /* Is this needed? */ 141 141 } 142 142 ${RELOCATING+ _edata = . ;} 143 - 143 + 144 144 /* Added to handle pic code */ 145 - .got : { 145 + .got : { 146 146 ${RELOCATING+*(.got)} 147 147 } 148 148 149 - .got1 : { 149 + .got1 : { 150 150 ${RELOCATING+*(.got1)} 151 151 } 152 152 153 - .got2 : { 153 + .got2 : { 154 154 ${RELOCATING+*(.got2)} 155 155 } 156 156 157 157 /* Added by Sathya to handle C++ exceptions */ 158 - .eh_frame : { 158 + .eh_frame : { 159 159 ${RELOCATING+*(.eh_frame)} 160 160 } 161 - 162 - .jcr : { 161 + 162 + .jcr : { 163 163 ${RELOCATING+*(.jcr)} 164 164 } 165 165 166 - .gcc_except_table : { 166 + .gcc_except_table : { 167 167 ${RELOCATING+*(.gcc_except_table)} 168 168 } 169 169 ··· 178 178 } 179 179 ${RELOCATING+. = ALIGN(4);} 180 180 .sbss : { 181 - ${RELOCATING+PROVIDE (__sbss_start = .);} 181 + ${RELOCATING+PROVIDE (__sbss_start = .);} 182 182 ${RELOCATING+*(.sbss)} 183 183 ${RELOCATING+*(.sbss.*)} 184 184 ${RELOCATING+*(.gnu.linkonce.sb.*)} ··· 192 192 ${RELOCATING+ . = ALIGN(4);} 193 193 ${RELOCATING+ _fbss = .;} 194 194 .bss : { 195 - ${RELOCATING+PROVIDE (__bss_start = .);} 195 + ${RELOCATING+PROVIDE (__bss_start = .);} 196 196 ${RELOCATING+*(.bss)} 197 197 ${RELOCATING+*(.bss.*)} 198 198 ${RELOCATING+*(.gnu.linkonce.b.*)} 199 199 ${RELOCATING+*(COMMON)} 200 200 ${RELOCATING+. = ALIGN(. != 0 ? 4 : 1);} 201 - 201 + 202 202 ${RELOCATING+PROVIDE (__bss_end = .);} 203 203 204 204 } ··· 210 210 ${RELOCATING+ _heap_start = .;} 211 211 ${RELOCATING+ . += _HEAP_SIZE;} 212 212 ${RELOCATING+ _heap_end = .;} 213 - } 213 + } 214 214 215 215 ${RELOCATING+ . = ALIGN(4);} 216 216 ··· 222 222 ${RELOCATING+ _end = .;} 223 223 } 224 224 225 - .tdata : { 225 + .tdata : { 226 226 ${RELOCATING+*(.tdata)} 227 227 ${RELOCATING+*(.tdata.*)} 228 228 ${RELOCATING+*(.gnu.linkonce.td.*)} 229 229 } 230 - .tbss : { 230 + .tbss : { 231 231 ${RELOCATING+*(.tbss)} 232 232 ${RELOCATING+*(.tbss.*)} 233 233 ${RELOCATING+*(.gnu.linkonce.tb.*)}
+11 -11
ld/scripttempl/elfxgate.sc
··· 1 1 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 2 - # 2 + # 3 3 # Copying and distribution of this file, with or without modification, 4 4 # are permitted in any medium without royalty provided the copyright 5 5 # notice and this notice are preserved. ··· 18 18 # .data section. 19 19 # OTHER_BSS_SYMBOLS - symbols that appear at the start of the 20 20 # .bss section besides __bss_start. 21 - # EMBEDDED - whether this is for an embedded system. 21 + # EMBEDDED - whether this is for an embedded system. 22 22 # 23 23 # When adding sections, do note that the names of some sections are used 24 24 # when specifying the start address of the next. ··· 29 29 if [ -z "$MACHINE" ]; then OUTPUT_ARCH=${ARCH}; else OUTPUT_ARCH=${ARCH}:${MACHINE}; fi 30 30 test "$LD_FLAG" = "N" && DATA_ADDR=. 31 31 32 - CTOR=".ctors ${CONSTRUCTING-0} : 32 + CTOR=".ctors ${CONSTRUCTING-0} : 33 33 { 34 34 ${CONSTRUCTING+ PROVIDE (__CTOR_LIST__ = .); } 35 35 ${CONSTRUCTING+${CTOR_START}} ··· 57 57 Bootstrap 0x00c0 58 58 Test 0xbfc0 59 59 60 - In general, the vectors address is 0xffc0. This can be overriden 60 + In general, the vectors address is 0xffc0. This can be overriden 61 61 with the '-defsym vectors_addr=0xbfc0' ld option. 62 62 63 63 Note: for the bootstrap mode, the interrupt vectors are at 0xbfc0 but ··· 239 239 ${RELOCATING+*(.rela.gnu.linkonce.s.*)} 240 240 } 241 241 .rel.sbss ${RELOCATING-0} : 242 - { 242 + { 243 243 *(.rel.sbss) 244 244 ${RELOCATING+*(.rel.sbss.*)} 245 245 ${RELOCATING+*(.rel.gnu.linkonce.sb.*)} ··· 250 250 ${RELOCATING+*(.rela.sbss.*)} 251 251 ${RELOCATING+*(.rel.gnu.linkonce.sb.*)} 252 252 } 253 - .rel.bss ${RELOCATING-0} : 254 - { 253 + .rel.bss ${RELOCATING-0} : 254 + { 255 255 *(.rel.bss) 256 256 ${RELOCATING+*(.rel.bss.*)} 257 257 ${RELOCATING+*(.rel.gnu.linkonce.b.*)} 258 258 } 259 - .rela.bss ${RELOCATING-0} : 260 - { 259 + .rela.bss ${RELOCATING-0} : 260 + { 261 261 *(.rela.bss) 262 262 ${RELOCATING+*(.rela.bss.*)} 263 263 ${RELOCATING+*(.rela.gnu.linkonce.b.*)} ··· 299 299 } ${RELOCATING+ > page0} 300 300 301 301 /* Start of text section. */ 302 - .stext ${RELOCATING-0} : 302 + .stext ${RELOCATING-0} : 303 303 { 304 304 *(.stext) 305 305 } ${RELOCATING+ > ${TEXT_MEMORY}} 306 306 307 307 .init ${RELOCATING-0} : 308 308 { 309 - *(.init) 309 + *(.init) 310 310 } ${RELOCATING+=${NOP-0}} 311 311 312 312 ${RELOCATING-${INSTALL_RELOC}}
+13 -13
ld/scripttempl/elfxtensa.sc
··· 1 1 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 2 - # 2 + # 3 3 # Copying and distribution of this file, with or without modification, 4 4 # are permitted in any medium without royalty provided the copyright 5 5 # notice and this notice are preserved. ··· 45 45 # NO_RELA_RELOCS - Don't include .rela.* sections in script 46 46 # NON_ALLOC_DYN - Place dynamic sections after data segment. 47 47 # TEXT_DYNAMIC - .dynamic in text segment, not data segment. 48 - # EMBEDDED - whether this is for an embedded system. 48 + # EMBEDDED - whether this is for an embedded system. 49 49 # SHLIB_TEXT_START_ADDR - if set, add to SIZEOF_HEADERS to set 50 50 # start address of shared library. 51 51 # INPUT_FILES - INPUT command of files to always include 52 52 # WRITABLE_RODATA - if set, the .rodata section should be writable 53 53 # INIT_START, INIT_END - statements just before and just after 54 - # combination of .init sections. 54 + # combination of .init sections. 55 55 # FINI_START, FINI_END - statements just before and just after 56 - # combination of .fini sections. 56 + # combination of .fini sections. 57 57 # STACK_ADDR - start of a .stack section. 58 58 # OTHER_SYMBOLS - symbols to place right at the end of the script. 59 59 # ETEXT_NAME - name of a symbol for the end of the text section, ··· 98 98 # 99 99 # plus Xtensa-specific literal sections: 100 100 # .literal .gnu.linkonce.literal.foo 101 - # .lit4 .gnu.linkonce.lit4.foo 101 + # .lit4 .gnu.linkonce.lit4.foo 102 102 # 103 103 # plus Xtensa-specific "property table" sections: 104 104 # .xt.lit .gnu.linkonce.p.foo ··· 164 164 SDATA="/* We want the small data sections together, so single-instruction offsets 165 165 can access them all, and initialized data all before uninitialized, so 166 166 we can shorten the on-disk segment size. */ 167 - .sdata ${RELOCATING-0} : 167 + .sdata ${RELOCATING-0} : 168 168 { 169 169 ${RELOCATING+${SDATA_START_SYMBOLS}} 170 170 ${CREATE_SHLIB+*(.sdata2 .sdata2.* .gnu.linkonce.s2.*)} ··· 236 236 KEEP (*(.fini_array)) 237 237 ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (${USER_LABEL_PREFIX}__fini_array_end = .);}} 238 238 }" 239 - CTOR=".ctors ${CONSTRUCTING-0} : 239 + CTOR=".ctors ${CONSTRUCTING-0} : 240 240 { 241 241 ${CONSTRUCTING+${CTOR_START}} 242 242 /* gcc uses crtbegin.o to find the start of ··· 370 370 .rel.dyn ${RELOCATING-0} : 371 371 { 372 372 EOF 373 - sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rela\./d;s/^.*: { *\(.*\)}$/ \1/' $COMBRELOC >> ldscripts/dyntmp.$$ 373 + sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rela\./d;s/^.*: { *\(.*\)}$/ \1/' $COMBRELOC >> ldscripts/dyntmp.$$ 374 374 cat >> ldscripts/dyntmp.$$ <<EOF 375 375 } 376 376 .rela.dyn ${RELOCATING-0} : 377 377 { 378 378 EOF 379 - sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rel\./d;s/^.*: { *\(.*\)}/ \1/' $COMBRELOC >> ldscripts/dyntmp.$$ 379 + sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rel\./d;s/^.*: { *\(.*\)}/ \1/' $COMBRELOC >> ldscripts/dyntmp.$$ 380 380 cat >> ldscripts/dyntmp.$$ <<EOF 381 381 } 382 382 EOF ··· 393 393 cat ldscripts/dyntmp.$$ 394 394 else 395 395 if test -z "${NO_REL_RELOCS}"; then 396 - sed -e '/^[ ]*\.rela\.[^}]*$/,/}/d' -e '/^[ ]*\.rela\./d' ldscripts/dyntmp.$$ 396 + sed -e '/^[ ]*\.rela\.[^}]*$/,/}/d' -e '/^[ ]*\.rela\./d' ldscripts/dyntmp.$$ 397 397 fi 398 398 if test -z "${NO_RELA_RELOCS}"; then 399 - sed -e '/^[ ]*\.rel\.[^}]*$/,/}/d' -e '/^[ ]*\.rel\./d' ldscripts/dyntmp.$$ 399 + sed -e '/^[ ]*\.rel\.[^}]*$/,/}/d' -e '/^[ ]*\.rel\./d' ldscripts/dyntmp.$$ 400 400 fi 401 401 fi 402 402 rm -f ldscripts/dyntmp.$$ ··· 534 534 cat ldscripts/dyntmp.$$ 535 535 else 536 536 if test -z "${NO_REL_RELOCS}"; then 537 - sed -e '/^[ ]*\.rela\.[^}]*$/,/}/d' -e '/^[ ]*\.rela\./d' ldscripts/dyntmp.$$ 537 + sed -e '/^[ ]*\.rela\.[^}]*$/,/}/d' -e '/^[ ]*\.rela\./d' ldscripts/dyntmp.$$ 538 538 fi 539 539 if test -z "${NO_RELA_RELOCS}"; then 540 - sed -e '/^[ ]*\.rel\.[^}]*$/,/}/d' -e '/^[ ]*\.rel\./d' ldscripts/dyntmp.$$ 540 + sed -e '/^[ ]*\.rel\.[^}]*$/,/}/d' -e '/^[ ]*\.rel\./d' ldscripts/dyntmp.$$ 541 541 fi 542 542 fi 543 543 rm -f ldscripts/dyntmp.$$
+50 -50
ld/scripttempl/epiphany_4x4.sc
··· 1 1 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 2 - # 2 + # 3 3 # Copying and distribution of this file, with or without modification, 4 4 # are permitted in any medium without royalty provided the copyright 5 5 # notice and this notice are preserved. ··· 45 45 # NO_RELA_RELOCS - Don't include .rela.* sections in script 46 46 # NON_ALLOC_DYN - Place dynamic sections after data segment. 47 47 # TEXT_DYNAMIC - .dynamic in text segment, not data segment. 48 - # EMBEDDED - whether this is for an embedded system. 48 + # EMBEDDED - whether this is for an embedded system. 49 49 # SHLIB_TEXT_START_ADDR - if set, add to SIZEOF_HEADERS to set 50 50 # start address of shared library. 51 51 # INPUT_FILES - INPUT command of files to always include 52 52 # WRITABLE_RODATA - if set, the .rodata section should be writable 53 53 # INIT_START, INIT_END - statements just before and just after 54 - # combination of .init sections. 54 + # combination of .init sections. 55 55 # FINI_START, FINI_END - statements just before and just after 56 - # combination of .fini sections. 56 + # combination of .fini sections. 57 57 # OTHER_SYMBOLS - symbols to place right at the end of the script. 58 58 # ETEXT_NAME - name of a symbol for the end of the text section, 59 59 # normally etext. ··· 147 147 SDATA="/* We want the small data sections together, so single-instruction offsets 148 148 can access them all, and initialized data all before uninitialized, so 149 149 we can shorten the on-disk segment size. */ 150 - .sdata ${RELOCATING-0} : 150 + .sdata ${RELOCATING-0} : 151 151 { 152 152 ${RELOCATING+${SDATA_START_SYMBOLS}} 153 153 ${CREATE_SHLIB+*(.sdata2 .sdata2.* .gnu.linkonce.s2.*)} ··· 205 205 *(.ldata${RELOCATING+ .ldata.* .gnu.linkonce.l.*}) 206 206 ${RELOCATING+. = ALIGN(. != 0 ? ${ALIGNMENT} : 1);} 207 207 }" 208 - CTOR=".ctors ADDR(.text) + SIZEOF(.text) ${CONSTRUCTING-0} : 208 + CTOR=".ctors ADDR(.text) + SIZEOF(.text) ${CONSTRUCTING-0} : 209 209 { 210 210 ${CONSTRUCTING+${CTOR_START}} 211 211 /* gcc uses crtbegin.o to find the start of ··· 230 230 KEEP (*(SORT(.ctors.*))) 231 231 KEEP (*(.ctors)) 232 232 ${CONSTRUCTING+${CTOR_END}} 233 - } /*> INTERNAL_RAM*/" 233 + } /*> INTERNAL_RAM*/" 234 234 DTOR=".dtors ADDR(.ctors) + SIZEOF(.ctors) ${CONSTRUCTING-0} : 235 235 { 236 236 ${CONSTRUCTING+${DTOR_START}} ··· 291 291 292 292 MEMORY 293 293 { 294 - EXTERNAL_DRAM_0 (WXAI) : ORIGIN = 0x80000000, LENGTH = 0x1000000 /*.text, data, rodata, bss and .stack*/ 294 + EXTERNAL_DRAM_0 (WXAI) : ORIGIN = 0x80000000, LENGTH = 0x1000000 /*.text, data, rodata, bss and .stack*/ 295 295 EXTERNAL_DRAM_1 (WXAI) : ORIGIN = 0x81000000, LENGTH = 0x1000000 /*.heap */ 296 - 296 + 297 297 EXTERNAL_SRAM (WXAI) : ORIGIN = 0x92000000, LENGTH = 8K /* small external RAM, used for testing*/ 298 - 298 + 299 299 /* run time lib and crt0*/ 300 300 RESERVED_CRT0_RAM (WXAI) : ORIGIN = 0, LENGTH = 0x400 301 - 301 + 302 302 /* user program, per bank usage */ 303 303 BANK0_SRAM (WXAI) : ORIGIN = LENGTH(RESERVED_CRT0_RAM), LENGTH = 8K - LENGTH(RESERVED_CRT0_RAM) 304 304 BANK1_SRAM (WXAI) : ORIGIN = 0x2000, LENGTH = 8K 305 305 BANK2_SRAM (WXAI) : ORIGIN = 0x4000, LENGTH = 8K 306 306 BANK3_SRAM (WXAI) : ORIGIN = 0x6000, LENGTH = 8K 307 - 307 + 308 308 /* user program, continious placement */ 309 309 INTERNAL_RAM (WXAI) : ORIGIN = LENGTH(RESERVED_CRT0_RAM), LENGTH = 32K - LENGTH(RESERVED_CRT0_RAM) 310 - 311 - MMR (WAI) : ORIGIN = 0xF000, LENGTH = 32K 312 - 313 - /* multi cores space */ 310 + 311 + MMR (WAI) : ORIGIN = 0xF000, LENGTH = 32K 312 + 313 + /* multi cores space */ 314 314 CORE_0x20_0x24_INTERNAL_RAM : ORIGIN = 0x82400000+LENGTH(RESERVED_CRT0_RAM), LENGTH = 32K- LENGTH(RESERVED_CRT0_RAM) 315 315 CORE_0x20_0x25_INTERNAL_RAM : ORIGIN = 0x82500000+LENGTH(RESERVED_CRT0_RAM), LENGTH = 32K- LENGTH(RESERVED_CRT0_RAM) 316 316 CORE_0x20_0x26_INTERNAL_RAM : ORIGIN = 0x82600000+LENGTH(RESERVED_CRT0_RAM), LENGTH = 32K- LENGTH(RESERVED_CRT0_RAM) ··· 328 328 CORE_0x23_0x26_INTERNAL_RAM : ORIGIN = 0x8e600000+LENGTH(RESERVED_CRT0_RAM), LENGTH = 32K- LENGTH(RESERVED_CRT0_RAM) 329 329 CORE_0x23_0x27_INTERNAL_RAM : ORIGIN = 0x8e700000+LENGTH(RESERVED_CRT0_RAM), LENGTH = 32K- LENGTH(RESERVED_CRT0_RAM) 330 330 CORE_0x24_0x24_INTERNAL_RAM : ORIGIN = 0x82000000+LENGTH(RESERVED_CRT0_RAM), LENGTH = 32K- LENGTH(RESERVED_CRT0_RAM) 331 - 331 + 332 332 } 333 333 334 334 ··· 338 338 IVT 0 : {*.o(IVT) } > RESERVED_CRT0_RAM 339 339 RESERVED_CRT0 : {*.o(RESERVED_CRT0) } > RESERVED_CRT0_RAM 340 340 RESERVED_CRT0 : {*.o(reserved_crt0) } > RESERVED_CRT0_RAM 341 - 341 + 342 342 CORE_RAM_0 : {*.o(core_ram_0) } > BANK0_SRAM 343 343 CORE_RAM_1 : {*.o(core_ram_1) } > BANK1_SRAM 344 344 CORE_RAM_2 : {*.o(core_ram_2) } > BANK2_SRAM 345 345 CORE_RAM_3 : {*.o(core_ram_3) } > BANK3_SRAM 346 - 346 + 347 347 SRAM_SOUTH : {*.o(sram) } > EXTERNAL_SRAM 348 348 DRAM_WEST : {*.o(dram) } > EXTERNAL_DRAM_1 349 - 349 + 350 350 CORE_INTERNAL : {*.o(core_ram_internal) } /*> INTERNAL_RAM*/ 351 - 351 + 352 352 /* the newlib (libc and libm) library is maped to the dedicated section */ 353 - 353 + 354 354 __new_lib_start_external_ = ( ORIGIN(EXTERNAL_DRAM_0) + __PROG_SIZE_FOR_CORE__ *__CORE_NUM_ ); 355 355 __new_lib_start_ = DEFINED(__USE_INTERNAL_MEM_FOR_NEW_LIB_) ? ORIGIN(BANK1_SRAM) : __new_lib_start_external_ ; 356 - 356 + 357 357 NEW_LIB_RO ${RELOCATING+__new_lib_start_} : { lib_a-*.o(.text .rodata ) *.o(libgloss_epiphany) } /* > INTERNAL_RAM*/ 358 - GNU_C_BUILTIN_LIB_RO ADDR(NEW_LIB_RO) + SIZEOF(NEW_LIB_RO) : { 359 - *mulsi3.o(.text .rodata) *modsi3.o(.text .rodata) 360 - *divsi3.o(.text .rodata) *udivsi3.o(.text .rodata) 361 - *umodsi3.o(.text .rodata) _*.o(.text .rodata) 362 - } 363 - 364 - NEW_LIB_WR ADDR(GNU_C_BUILTIN_LIB_RO) + SIZEOF(GNU_C_BUILTIN_LIB_RO) : { lib_a-*.o(.data ) } /* > INTERNAL_RAM*/ 365 - 366 - 367 - __init_start = DEFINED(__USE_INTERNAL_MEM_) ? ORIGIN(BANK1_SRAM) : (ADDR(NEW_LIB_WR) + SIZEOF(NEW_LIB_WR) ) ; 358 + GNU_C_BUILTIN_LIB_RO ADDR(NEW_LIB_RO) + SIZEOF(NEW_LIB_RO) : { 359 + *mulsi3.o(.text .rodata) *modsi3.o(.text .rodata) 360 + *divsi3.o(.text .rodata) *udivsi3.o(.text .rodata) 361 + *umodsi3.o(.text .rodata) _*.o(.text .rodata) 362 + } 363 + 364 + NEW_LIB_WR ADDR(GNU_C_BUILTIN_LIB_RO) + SIZEOF(GNU_C_BUILTIN_LIB_RO) : { lib_a-*.o(.data ) } /* > INTERNAL_RAM*/ 365 + 366 + 367 + __init_start = DEFINED(__USE_INTERNAL_MEM_) ? ORIGIN(BANK1_SRAM) : (ADDR(NEW_LIB_WR) + SIZEOF(NEW_LIB_WR) ) ; 368 368 __init_start = DEFINED(__USE_INTERNAL_MEM_FOR_NEW_LIB_) ? ADDR(NEW_LIB_WR) + SIZEOF(NEW_LIB_WR) : __init_start; 369 - 369 + 370 370 371 371 /* Read-only sections, merged into text segment: */ 372 372 /*${CREATE_SHLIB-${CREATE_PIE-${RELOCATING+PROVIDE (__executable_start = ${TEXT_START_ADDR}); . = ${TEXT_BASE_ADDRESS};}}}*/ ··· 433 433 .rel.dyn ${RELOCATING-0} : 434 434 { 435 435 EOF 436 - sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rela\./d;s/^.*: { *\(.*\)}$/ \1/' $COMBRELOC >> ldscripts/dyntmp.$$ 436 + sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rela\./d;s/^.*: { *\(.*\)}$/ \1/' $COMBRELOC >> ldscripts/dyntmp.$$ 437 437 cat >> ldscripts/dyntmp.$$ <<EOF 438 438 } 439 439 .rela.dyn ${RELOCATING-0} : 440 440 { 441 441 EOF 442 - sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rel\./d;s/^.*: { *\(.*\)}/ \1/' $COMBRELOC >> ldscripts/dyntmp.$$ 442 + sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rel\./d;s/^.*: { *\(.*\)}/ \1/' $COMBRELOC >> ldscripts/dyntmp.$$ 443 443 cat >> ldscripts/dyntmp.$$ <<EOF 444 444 } 445 445 EOF ··· 456 456 cat ldscripts/dyntmp.$$ 457 457 else 458 458 if test -z "${NO_REL_RELOCS}"; then 459 - sed -e '/^[ ]*\.rela\.[^}]*$/,/}/d' -e '/^[ ]*\.rela\./d' ldscripts/dyntmp.$$ 459 + sed -e '/^[ ]*\.rela\.[^}]*$/,/}/d' -e '/^[ ]*\.rela\./d' ldscripts/dyntmp.$$ 460 460 fi 461 461 if test -z "${NO_RELA_RELOCS}"; then 462 - sed -e '/^[ ]*\.rel\.[^}]*$/,/}/d' -e '/^[ ]*\.rel\./d' ldscripts/dyntmp.$$ 462 + sed -e '/^[ ]*\.rel\.[^}]*$/,/}/d' -e '/^[ ]*\.rel\./d' ldscripts/dyntmp.$$ 463 463 fi 464 464 fi 465 465 rm -f ldscripts/dyntmp.$$ 466 466 fi 467 467 468 468 cat <<EOF 469 - 470 - .init __init_start : 471 - { 469 + 470 + .init __init_start : 471 + { 472 472 ${RELOCATING+${INIT_START}} 473 473 KEEP (*(.init)) 474 474 ${RELOCATING+${INIT_END}} ··· 476 476 477 477 ${TEXT_PLT+${PLT}} 478 478 ${TINY_READONLY_SECTION} 479 - 479 + 480 480 .fini ${RELOCATING+ADDR(.init)+SIZEOF(.init)} ${RELOCATING-0} : 481 481 { 482 482 ${RELOCATING+${FINI_START}} 483 483 KEEP (*(.fini)) 484 484 ${RELOCATING+${FINI_END}} 485 485 } /*> INTERNAL_RAM*/ =${NOP-0} 486 - 486 + 487 487 .text ${RELOCATING+ADDR(.fini)+SIZEOF(.fini)} ${RELOCATING-0} : 488 488 { 489 489 ${RELOCATING+${TEXT_START_SYMBOLS}} ··· 497 497 ${RELOCATING+PROVIDE (_${ETEXT_NAME} = .);} 498 498 ${RELOCATING+PROVIDE (${ETEXT_NAME} = .);} 499 499 ${WRITABLE_RODATA-${RODATA}} 500 - .rodata1 ${RELOCATING-0} : { *(.rodata1) } 500 + .rodata1 ${RELOCATING-0} : { *(.rodata1) } 501 501 ${CREATE_SHLIB-${SDATA2}} 502 502 ${CREATE_SHLIB-${SBSS2}} 503 503 ${OTHER_READONLY_SECTIONS} ··· 524 524 ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (${USER_LABEL_PREFIX}__preinit_array_start = .);}} 525 525 KEEP (*(.preinit_array)) 526 526 ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (${USER_LABEL_PREFIX}__preinit_array_end = .);}} 527 - } 527 + } 528 528 .init_array ${RELOCATING-0} : 529 529 { 530 530 ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (${USER_LABEL_PREFIX}__init_array_start = .);}} 531 531 KEEP (*(SORT(.init_array.*))) 532 532 KEEP (*(.init_array)) 533 533 ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (${USER_LABEL_PREFIX}__init_array_end = .);}} 534 - } 534 + } 535 535 .fini_array ${RELOCATING-0} : 536 536 { 537 537 ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (${USER_LABEL_PREFIX}__fini_array_start = .);}} 538 538 KEEP (*(.fini_array)) 539 539 KEEP (*(SORT(.fini_array.*))) 540 540 ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (${USER_LABEL_PREFIX}__fini_array_end = .);}} 541 - } 541 + } 542 542 ${SMALL_DATA_CTOR-${RELOCATING+${CTOR}}} 543 543 ${SMALL_DATA_DTOR-${RELOCATING+${DTOR}}} 544 544 .jcr ${RELOCATING-0} : { KEEP (*(.jcr)) } ··· 561 561 *(.data${RELOCATING+ .data.* .gnu.linkonce.d.*}) 562 562 ${CONSTRUCTING+SORT(CONSTRUCTORS)} 563 563 } /*> INTERNAL_RAM*/ 564 - .data1 ${RELOCATING-0} : { *(.data1) } 564 + .data1 ${RELOCATING-0} : { *(.data1) } 565 565 ${WRITABLE_RODATA+${RODATA}} 566 566 ${OTHER_READWRITE_SECTIONS} 567 567 ${SMALL_DATA_CTOR+${RELOCATING+${CTOR}}} ··· 615 615 cat ldscripts/dyntmp.$$ 616 616 else 617 617 if test -z "${NO_REL_RELOCS}"; then 618 - sed -e '/^[ ]*\.rela\.[^}]*$/,/}/d' -e '/^[ ]*\.rela\./d' ldscripts/dyntmp.$$ 618 + sed -e '/^[ ]*\.rela\.[^}]*$/,/}/d' -e '/^[ ]*\.rela\./d' ldscripts/dyntmp.$$ 619 619 fi 620 620 if test -z "${NO_RELA_RELOCS}"; then 621 - sed -e '/^[ ]*\.rel\.[^}]*$/,/}/d' -e '/^[ ]*\.rel\./d' ldscripts/dyntmp.$$ 621 + sed -e '/^[ ]*\.rel\.[^}]*$/,/}/d' -e '/^[ ]*\.rel\./d' ldscripts/dyntmp.$$ 622 622 fi 623 623 fi 624 624 rm -f ldscripts/dyntmp.$$
+9 -9
ld/scripttempl/epocpe.sc
··· 1 1 # Linker script for PE. 2 2 # 3 3 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 4 - # 4 + # 5 5 # Copying and distribution of this file, with or without modification, 6 6 # are permitted in any medium without royalty provided the copyright 7 7 # notice and this notice are preserved. ··· 57 57 58 58 SECTIONS 59 59 { 60 - .text ${RELOCATING+ __image_base__ + __section_alignment__ } : 60 + .text ${RELOCATING+ __image_base__ + __section_alignment__ } : 61 61 { 62 62 ${RELOCATING+ *(.init)} 63 63 *(.text) ··· 65 65 *(.glue_7t) 66 66 *(.glue_7) 67 67 ${RELOCATING+ *(.text.*)} 68 - ${CONSTRUCTING+ ___CTOR_LIST__ = .; __CTOR_LIST__ = . ; 68 + ${CONSTRUCTING+ ___CTOR_LIST__ = .; __CTOR_LIST__ = . ; 69 69 LONG (-1); *(.ctors); *(.ctor); LONG (0); } 70 - ${CONSTRUCTING+ ___DTOR_LIST__ = .; __DTOR_LIST__ = . ; 70 + ${CONSTRUCTING+ ___DTOR_LIST__ = .; __DTOR_LIST__ = . ; 71 71 LONG (-1); *(.dtors); *(.dtor); LONG (0); } 72 72 ${RELOCATING+ *(.fini)} 73 73 /* ??? Why is .gcc_exc here? */ ··· 88 88 breaks building the cygwin32 dll. Instead, we name the section 89 89 ".data_cygwin_nocopy" and explicitly include it after __data_end__. */ 90 90 91 - .data ${RELOCATING+BLOCK(__section_alignment__)} : 91 + .data ${RELOCATING+BLOCK(__section_alignment__)} : 92 92 { 93 93 ${RELOCATING+__data_start__ = . ;} 94 94 *(.data) ··· 125 125 See pe.em:sort_sections. */ 126 126 ${R_IDATA} 127 127 } 128 - 128 + 129 129 .CRT ${RELOCATING+BLOCK(__section_alignment__)} : 130 - { 130 + { 131 131 ${R_CRT} 132 132 } 133 133 ··· 140 140 } 141 141 142 142 .reloc ${RELOCATING+BLOCK(__section_alignment__)} : 143 - { 143 + { 144 144 *(.reloc) 145 145 } 146 146 147 147 .rsrc ${RELOCATING+BLOCK(__section_alignment__)} : 148 - { 148 + { 149 149 *(.rsrc) 150 150 ${R_RSRC} 151 151 }
+3 -3
ld/scripttempl/h8300.sc
··· 1 1 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 2 - # 2 + # 3 3 # Copying and distribution of this file, with or without modification, 4 4 # are permitted in any medium without royalty provided the copyright 5 5 # notice and this notice are preserved. ··· 51 51 } ${RELOCATING+ > vectors} 52 52 53 53 .init : 54 - { 54 + { 55 55 *(.init) 56 56 } ${RELOCATING+ > ram} 57 57 ··· 61 61 *(.text) 62 62 *(.text.*) 63 63 *(.strings) 64 - ${RELOCATING+ _etext = . ; } 64 + ${RELOCATING+ _etext = . ; } 65 65 } ${RELOCATING+ > ram} 66 66 67 67 ${CONSTRUCTING+${TORS}}
+2 -2
ld/scripttempl/h8300h.sc
··· 1 1 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 2 - # 2 + # 3 3 # Copying and distribution of this file, with or without modification, 4 4 # are permitted in any medium without royalty provided the copyright 5 5 # notice and this notice are preserved. ··· 61 61 *(.rodata) 62 62 *(.text) 63 63 *(.strings) 64 - ${RELOCATING+ _etext = . ; } 64 + ${RELOCATING+ _etext = . ; } 65 65 } ${RELOCATING+ > ram} 66 66 67 67 ${CONSTRUCTING+${TORS}}
+2 -2
ld/scripttempl/h8300hn.sc
··· 1 1 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 2 - # 2 + # 3 3 # Copying and distribution of this file, with or without modification, 4 4 # are permitted in any medium without royalty provided the copyright 5 5 # notice and this notice are preserved. ··· 55 55 *(.rodata) 56 56 *(.text) 57 57 *(.strings) 58 - ${RELOCATING+ _etext = . ; } 58 + ${RELOCATING+ _etext = . ; } 59 59 } ${RELOCATING+ > ram} 60 60 61 61 ${CONSTRUCTING+${TORS}}
+2 -2
ld/scripttempl/h8300s.sc
··· 1 1 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 2 - # 2 + # 3 3 # Copying and distribution of this file, with or without modification, 4 4 # are permitted in any medium without royalty provided the copyright 5 5 # notice and this notice are preserved. ··· 61 61 *(.rodata) 62 62 *(.text) 63 63 *(.strings) 64 - ${RELOCATING+ _etext = . ; } 64 + ${RELOCATING+ _etext = . ; } 65 65 } ${RELOCATING+ > ram} 66 66 67 67 ${CONSTRUCTING+${TORS}}
+2 -2
ld/scripttempl/h8300sn.sc
··· 1 1 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 2 - # 2 + # 3 3 # Copying and distribution of this file, with or without modification, 4 4 # are permitted in any medium without royalty provided the copyright 5 5 # notice and this notice are preserved. ··· 55 55 *(.rodata) 56 56 *(.text) 57 57 *(.strings) 58 - ${RELOCATING+ _etext = . ; } 58 + ${RELOCATING+ _etext = . ; } 59 59 } ${RELOCATING+ > ram} 60 60 61 61 ${CONSTRUCTING+${TORS}}
+2 -2
ld/scripttempl/h8300sx.sc
··· 1 1 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 2 - # 2 + # 3 3 # Copying and distribution of this file, with or without modification, 4 4 # are permitted in any medium without royalty provided the copyright 5 5 # notice and this notice are preserved. ··· 61 61 *(.rodata) 62 62 *(.text) 63 63 *(.strings) 64 - ${RELOCATING+ _etext = . ; } 64 + ${RELOCATING+ _etext = . ; } 65 65 } ${RELOCATING+ > ram} 66 66 67 67 ${CONSTRUCTING+${TORS}}
+2 -2
ld/scripttempl/h8300sxn.sc
··· 1 1 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 2 - # 2 + # 3 3 # Copying and distribution of this file, with or without modification, 4 4 # are permitted in any medium without royalty provided the copyright 5 5 # notice and this notice are preserved. ··· 55 55 *(.rodata) 56 56 *(.text) 57 57 *(.strings) 58 - ${RELOCATING+ _etext = . ; } 58 + ${RELOCATING+ _etext = . ; } 59 59 } ${RELOCATING+ > ram} 60 60 61 61 ${CONSTRUCTING+${TORS}}
+1 -1
ld/scripttempl/h8500.sc
··· 1 1 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 2 - # 2 + # 3 3 # Copying and distribution of this file, with or without modification, 4 4 # are permitted in any medium without royalty provided the copyright 5 5 # notice and this notice are preserved.
+1 -1
ld/scripttempl/h8500b.sc
··· 1 1 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 2 - # 2 + # 3 3 # Copying and distribution of this file, with or without modification, 4 4 # are permitted in any medium without royalty provided the copyright 5 5 # notice and this notice are preserved.
+1 -1
ld/scripttempl/h8500c.sc
··· 1 1 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 2 - # 2 + # 3 3 # Copying and distribution of this file, with or without modification, 4 4 # are permitted in any medium without royalty provided the copyright 5 5 # notice and this notice are preserved.
+1 -1
ld/scripttempl/h8500m.sc
··· 1 1 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 2 - # 2 + # 3 3 # Copying and distribution of this file, with or without modification, 4 4 # are permitted in any medium without royalty provided the copyright 5 5 # notice and this notice are preserved.
+1 -1
ld/scripttempl/h8500s.sc
··· 1 1 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 2 - # 2 + # 3 3 # Copying and distribution of this file, with or without modification, 4 4 # are permitted in any medium without royalty provided the copyright 5 5 # notice and this notice are preserved.
+1 -1
ld/scripttempl/hppaelf.sc
··· 1 1 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 2 - # 2 + # 3 3 # Copying and distribution of this file, with or without modification, 4 4 # are permitted in any medium without royalty provided the copyright 5 5 # notice and this notice are preserved.
+9 -9
ld/scripttempl/i386beos.sc
··· 1 1 # Linker script for PE. 2 2 # 3 3 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 4 - # 4 + # 5 5 # Copying and distribution of this file, with or without modification, 6 6 # are permitted in any medium without royalty provided the copyright 7 7 # notice and this notice are preserved. ··· 56 56 ${RELOCATING+__ldused = .;} 57 57 SECTIONS 58 58 { 59 - .text ${RELOCATING+ __image_base__ + __section_alignment__ } : 59 + .text ${RELOCATING+ __image_base__ + __section_alignment__ } : 60 60 { 61 61 ${RELOCATING+ __text_start__ = . ;} 62 62 ${RELOCATING+ *(.init)} ··· 64 64 ${R_TEXT} 65 65 *(.glue_7t) 66 66 *(.glue_7) 67 - ${CONSTRUCTING+ ___CTOR_LIST__ = .; __CTOR_LIST__ = . ; 67 + ${CONSTRUCTING+ ___CTOR_LIST__ = .; __CTOR_LIST__ = . ; 68 68 LONG (-1); *(.ctors); *(.ctor); LONG (0); } 69 - ${CONSTRUCTING+ ___DTOR_LIST__ = .; __DTOR_LIST__ = . ; 69 + ${CONSTRUCTING+ ___DTOR_LIST__ = .; __DTOR_LIST__ = . ; 70 70 LONG (-1); *(.dtors); *(.dtor); LONG (0); } 71 71 ${RELOCATING+ *(.fini)} 72 72 /* ??? Why is .gcc_exc here? */ ··· 82 82 breaks building the cygwin32 dll. Instead, we name the section 83 83 ".data_cygwin_nocopy" and explicitly include it after __data_end__. */ 84 84 85 - .data ${RELOCATING+BLOCK(__section_alignment__)} : 85 + .data ${RELOCATING+BLOCK(__section_alignment__)} : 86 86 { 87 87 ${RELOCATING+__data_start__ = . ;} 88 88 *(.data) ··· 134 134 ${R_IDATA} 135 135 } 136 136 .CRT ${RELOCATING+BLOCK(__section_alignment__)} : 137 - { 137 + { 138 138 ${R_CRT} 139 139 } 140 140 ··· 147 147 } 148 148 149 149 .reloc ${RELOCATING+BLOCK(__section_alignment__)} : 150 - { 150 + { 151 151 *(.reloc) 152 152 } 153 153 154 154 .rsrc ${RELOCATING+BLOCK(__section_alignment__)} : 155 - { 155 + { 156 156 *(.rsrc) 157 157 ${R_RSRC} 158 158 } 159 159 160 160 .exc ${RELOCATING+BLOCK(__section_alignment__)} : 161 - { 161 + { 162 162 *(.exc) 163 163 ${R_EXC} 164 164 }
+3 -3
ld/scripttempl/i386coff.sc
··· 2 2 # Ian Taylor <ian@cygnus.com>. 3 3 # 4 4 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 5 - # 5 + # 6 6 # Copying and distribution of this file, with or without modification, 7 7 # are permitted in any medium without royalty provided the copyright 8 8 # notice and this notice are preserved. ··· 38 38 ${RELOCATING+ edata = .}; 39 39 } 40 40 .bss ${RELOCATING+ SIZEOF(.data) + ADDR(.data)} : 41 - { 41 + { 42 42 *(.bss) 43 43 *(COMMON) 44 44 ${RELOCATING+ end = .}; 45 45 } 46 46 ${RELOCATING- ${INIT}} 47 47 ${RELOCATING- ${FINI}} 48 - .stab 0 ${RELOCATING+(NOLOAD)} : 48 + .stab 0 ${RELOCATING+(NOLOAD)} : 49 49 { 50 50 [ .stab ] 51 51 }
+2 -2
ld/scripttempl/i386go32.sc
··· 1 1 # Linker script for i386 go32 (DJGPP) 2 2 # 3 3 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 4 - # 4 + # 5 5 # Copying and distribution of this file, with or without modification, 6 6 # are permitted in any medium without royalty provided the copyright 7 7 # notice and this notice are preserved. ··· 68 68 ${CONSTRUCTING+${RELOCATING-$CTOR}} 69 69 ${CONSTRUCTING+${RELOCATING-$DTOR}} 70 70 .bss ${RELOCATING+ SIZEOF(.data) + ADDR(.data)} : 71 - { 71 + { 72 72 *(.bss${RELOCATING+ .bss.* .gnu.linkonce.b.*}) 73 73 *(COMMON) 74 74 ${RELOCATING+ end = . ; PROVIDE(_end = .) ;}
+1 -1
ld/scripttempl/i386msdos.sc
··· 1 1 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 2 - # 2 + # 3 3 # Copying and distribution of this file, with or without modification, 4 4 # are permitted in any medium without royalty provided the copyright 5 5 # notice and this notice are preserved.
+4 -4
ld/scripttempl/i860coff.sc
··· 1 1 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 2 - # 2 + # 3 3 # Copying and distribution of this file, with or without modification, 4 4 # are permitted in any medium without royalty provided the copyright 5 5 # notice and this notice are preserved. ··· 13 13 14 14 OUTPUT_FORMAT("${OUTPUT_FORMAT}") 15 15 ${LIB_SEARCH_DIRS} 16 - PROVIDE (__stack = 0); 16 + PROVIDE (__stack = 0); 17 17 SECTIONS 18 18 { 19 19 .text ${RELOCATING+ 0x1000000} : { ··· 35 35 *(.data) 36 36 ${RELOCATING+ edata = .}; 37 37 } 38 - .bss : { 38 + .bss : { 39 39 ${RELOCATING+ __bss_start = .}; 40 40 *(.bss) 41 41 *(COMMON) 42 42 ${RELOCATING+ end = ALIGN(0x8)}; 43 43 ${RELOCATING+ _end = ALIGN(0x8)}; 44 44 } 45 - .stab 0 ${RELOCATING+(NOLOAD)} : 45 + .stab 0 ${RELOCATING+(NOLOAD)} : 46 46 { 47 47 [ .stab ] 48 48 }
+14 -14
ld/scripttempl/i960.sc
··· 1 1 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 2 - # 2 + # 3 3 # Copying and distribution of this file, with or without modification, 4 4 # are permitted in any medium without royalty provided the copyright 5 5 # notice and this notice are preserved. ··· 12 12 notice and this notice are preserved. */ 13 13 14 14 SECTIONS 15 - { 16 - .text : 17 - { 15 + { 16 + .text : 17 + { 18 18 ${GLD_STYLE+ CREATE_OBJECT_SYMBOLS} 19 - *(.text) 19 + *(.text) 20 20 ${RELOCATING+ _etext = .}; 21 21 ${CONSTRUCTING+${COFF_CTORS}} 22 - } 22 + } 23 23 .data : 24 - { 25 - *(.data) 24 + { 25 + *(.data) 26 26 ${CONSTRUCTING+CONSTRUCTORS} 27 27 ${RELOCATING+ _edata = .}; 28 - } 28 + } 29 29 .bss : 30 - { 30 + { 31 31 ${RELOCATING+ _bss_start = .}; 32 - *(.bss) 33 - *(COMMON) 32 + *(.bss) 33 + *(COMMON) 34 34 ${RELOCATING+ _end = .}; 35 - } 36 - } 35 + } 36 + } 37 37 EOF
+2 -2
ld/scripttempl/ia64vms.sc
··· 2 2 # Tristan Gingold <gingold@adacore.com>. 3 3 # 4 4 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 5 - # 5 + # 6 6 # Copying and distribution of this file, with or without modification, 7 7 # are permitted in any medium without royalty provided the copyright 8 8 # notice and this notice are preserved. ··· 120 120 121 121 . $srcdir/scripttempl/DWARF.sc 122 122 123 - cat <<EOF 123 + cat <<EOF 124 124 .note : { *(.vms.note) } 125 125 126 126 /DISCARD/ : { *(.note) *(.vms_display_name_info) }
+7 -7
ld/scripttempl/ip2k.sc
··· 1 1 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 2 - # 2 + # 3 3 # Copying and distribution of this file, with or without modification, 4 4 # are permitted in any medium without royalty provided the copyright 5 5 # notice and this notice are preserved. ··· 21 21 MEMORY 22 22 { 23 23 D_GPR : org = 0x01000080, len = 128 24 - D_RAM : org = 0x01000100, len = 4K - 256 25 - P_RAM : org = 0x02000000, len = 16K 26 - P_ROM : org = 0x02010000, len = 64K - 32 27 - P_RESET : org = 0x0201FFE0, len = 32 28 - P_CONFIG : org = 0x02020000, len = 128 24 + D_RAM : org = 0x01000100, len = 4K - 256 25 + P_RAM : org = 0x02000000, len = 16K 26 + P_ROM : org = 0x02010000, len = 64K - 32 27 + P_RESET : org = 0x0201FFE0, len = 32 28 + P_CONFIG : org = 0x02020000, len = 128 29 29 } 30 30 31 31 SECTIONS ··· 89 89 90 90 /* PRAM overlay code. */ 91 91 __pram_overlay_run_start = (__pram_end + 1) & 0xFFFFFFFE; 92 - __pram_overlay_load_start = (__flash_end + 1) & 0xFFFFFFFE; 92 + __pram_overlay_load_start = (__flash_end + 1) & 0xFFFFFFFE; 93 93 OVERLAY __pram_overlay_run_start : AT (__pram_overlay_load_start) 94 94 { 95 95 .pram1 { */overlay1/* (.pram); * (.pram1) }
+29 -29
ld/scripttempl/iq2000.sc
··· 1 1 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 2 - # 2 + # 3 3 # Copying and distribution of this file, with or without modification, 4 4 # are permitted in any medium without royalty provided the copyright 5 5 # notice and this notice are preserved. ··· 28 28 # DATA_PLT - .plt should be in data segment, not text segment. 29 29 # BSS_PLT - .plt should be in bss segment 30 30 # TEXT_DYNAMIC - .dynamic in text segment, not data segment. 31 - # EMBEDDED - whether this is for an embedded system. 31 + # EMBEDDED - whether this is for an embedded system. 32 32 # SHLIB_TEXT_START_ADDR - if set, add to SIZEOF_HEADERS to set 33 33 # start address of shared library. 34 34 # INPUT_FILES - INPUT command of files to always include 35 35 # WRITABLE_RODATA - if set, the .rodata section should be writable 36 36 # INIT_START, INIT_END - statements just before and just after 37 - # combination of .init sections. 37 + # combination of .init sections. 38 38 # FINI_START, FINI_END - statements just before and just after 39 - # combination of .fini sections. 39 + # combination of .fini sections. 40 40 # 41 41 # When adding sections, do note that the names of some sections are used 42 42 # when specifying the start address of the next. ··· 69 69 test -z "${ELFSIZE}" && ELFSIZE=32 70 70 test -z "${ALIGNMENT}" && ALIGNMENT="${ELFSIZE} / 8" 71 71 test "$LD_FLAG" = "N" && DATA_ADDR=. 72 - INTERP=".interp ${RELOCATING-0} : { *(.interp) }" 72 + INTERP=".interp ${RELOCATING-0} : { *(.interp) }" 73 73 PLT=".plt ${RELOCATING-0} : { *(.plt) }" 74 74 DYNAMIC=".dynamic ${RELOCATING-0} : { *(.dynamic) }" 75 75 RODATA=".rodata ${RELOCATING-0} : { *(.rodata) ${RELOCATING+*(.rodata.*)} ${RELOCATING+*(.gnu.linkonce.r.*)} }" 76 76 SBSS2=".sbss2 ${RELOCATING-0} : { *(.sbss2) ${RELOCATING+*(.sbss2.*)} ${RELOCATING+*(.gnu.linkonce.sb2.*)} }" 77 77 SDATA2=".sdata2 ${RELOCATING-0} : { *(.sdata2) ${RELOCATING+*(.sdata2.*)} ${RELOCATING+*(.gnu.linkonce.s2.*)} }" 78 - CTOR=".ctors ${CONSTRUCTING-0} : 78 + CTOR=".ctors ${CONSTRUCTING-0} : 79 79 { 80 80 ${CONSTRUCTING+${CTOR_START}} 81 81 /* gcc uses crtbegin.o to find the start of ··· 217 217 ${RELOCATING+*(.rela.gnu.linkonce.s.*)} 218 218 } 219 219 .rel.sbss ${RELOCATING-0} : 220 - { 220 + { 221 221 *(.rel.sbss) 222 222 ${RELOCATING+*(.rel.sbss.*)} 223 223 ${RELOCATING+*(.rel.gnu.linkonce.sb.*)} ··· 228 228 ${RELOCATING+*(.rela.sbss.*)} 229 229 ${RELOCATING+*(.rela.gnu.linkonce.sb.*)} 230 230 } 231 - .rel.sdata2 ${RELOCATING-0} : 232 - { 231 + .rel.sdata2 ${RELOCATING-0} : 232 + { 233 233 *(.rel.sdata2) 234 234 ${RELOCATING+*(.rel.sdata2.*)} 235 235 ${RELOCATING+*(.rel.gnu.linkonce.s2.*)} 236 236 } 237 - .rela.sdata2 ${RELOCATING-0} : 237 + .rela.sdata2 ${RELOCATING-0} : 238 238 { 239 239 *(.rela.sdata2) 240 240 ${RELOCATING+*(.rela.sdata2.*)} 241 241 ${RELOCATING+*(.rela.gnu.linkonce.s2.*)} 242 242 } 243 - .rel.sbss2 ${RELOCATING-0} : 244 - { 245 - *(.rel.sbss2) 243 + .rel.sbss2 ${RELOCATING-0} : 244 + { 245 + *(.rel.sbss2) 246 246 ${RELOCATING+*(.rel.sbss2.*)} 247 247 ${RELOCATING+*(.rel.gnu.linkonce.sb2.*)} 248 248 } 249 - .rela.sbss2 ${RELOCATING-0} : 250 - { 251 - *(.rela.sbss2) 249 + .rela.sbss2 ${RELOCATING-0} : 250 + { 251 + *(.rela.sbss2) 252 252 ${RELOCATING+*(.rela.sbss2.*)} 253 253 ${RELOCATING+*(.rela.gnu.linkonce.sb2.*)} 254 254 } 255 - .rel.bss ${RELOCATING-0} : 256 - { 255 + .rel.bss ${RELOCATING-0} : 256 + { 257 257 *(.rel.bss) 258 258 ${RELOCATING+*(.rel.bss.*)} 259 259 ${RELOCATING+*(.rel.gnu.linkonce.b.*)} 260 260 } 261 - .rela.bss ${RELOCATING-0} : 262 - { 261 + .rela.bss ${RELOCATING-0} : 262 + { 263 263 *(.rela.bss) 264 264 ${RELOCATING+*(.rela.bss.*)} 265 265 ${RELOCATING+*(.rela.gnu.linkonce.b.*)} ··· 270 270 .rel.dyn : 271 271 { 272 272 EOF 273 - sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rela\./d;s/^.*: { *\(.*\)}$/ \1/' $COMBRELOC 273 + sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rela\./d;s/^.*: { *\(.*\)}$/ \1/' $COMBRELOC 274 274 cat <<EOF 275 275 } 276 276 .rela.dyn : 277 277 { 278 278 EOF 279 - sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rel\./d;s/^.*: { *\(.*\)}/ \1/' $COMBRELOC 279 + sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rel\./d;s/^.*: { *\(.*\)}/ \1/' $COMBRELOC 280 280 cat <<EOF 281 281 } 282 282 EOF ··· 286 286 .rela.plt ${RELOCATING-0} : { *(.rela.plt) } 287 287 ${OTHER_PLT_RELOC_SECTIONS} 288 288 289 - .init ${RELOCATING-0} : 290 - { 289 + .init ${RELOCATING-0} : 290 + { 291 291 ${RELOCATING+${INIT_START}} 292 292 KEEP (*(.init)) 293 293 ${RELOCATING+${INIT_END}} ··· 329 329 ${CONSTRUCTING+SORT(CONSTRUCTORS)} 330 330 } 331 331 .data1 ${RELOCATING-0} : { *(.data1) } 332 - .eh_frame ${RELOCATING-0} : 333 - { 332 + .eh_frame ${RELOCATING-0} : 333 + { 334 334 ${RELOCATING+PROVIDE (__eh_frame_begin = .);} 335 - *(.eh_frame) 335 + *(.eh_frame) 336 336 LONG (0); 337 337 ${RELOCATING+PROVIDE (__eh_frame_end = .);} 338 338 } ${RELOCATING+} ··· 363 363 /* We want the small data sections together, so single-instruction offsets 364 364 can access them all, and initialized data all before uninitialized, so 365 365 we can shorten the on-disk segment size. */ 366 - .sdata ${RELOCATING-0} : 366 + .sdata ${RELOCATING-0} : 367 367 { 368 368 ${RELOCATING+${SDATA_START_SYMBOLS}} 369 - *(.sdata) 369 + *(.sdata) 370 370 ${RELOCATING+*(.sdata.*)} 371 371 ${RELOCATING+*(.gnu.linkonce.s.*)} 372 372 }
+1 -1
ld/scripttempl/m68kaux.sc
··· 1 1 # Linker script for A/UX. 2 2 # 3 3 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 4 - # 4 + # 5 5 # Copying and distribution of this file, with or without modification, 6 6 # are permitted in any medium without royalty provided the copyright 7 7 # notice and this notice are preserved.
+4 -4
ld/scripttempl/m68kcoff.sc
··· 1 1 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 2 - # 2 + # 3 3 # Copying and distribution of this file, with or without modification, 4 4 # are permitted in any medium without royalty provided the copyright 5 5 # notice and this notice are preserved. ··· 13 13 14 14 OUTPUT_FORMAT("${OUTPUT_FORMAT}") 15 15 ${LIB_SEARCH_DIRS} 16 - PROVIDE (__stack = 0); 16 + PROVIDE (__stack = 0); 17 17 SECTIONS 18 18 { 19 19 .text ${RELOCATING+ 0x1000000} : { ··· 35 35 *(.data) 36 36 ${RELOCATING+ edata = .}; 37 37 } 38 - .bss : { 38 + .bss : { 39 39 ${RELOCATING+ __bss_start = .}; 40 40 *(.bss) 41 41 *(COMMON) 42 42 ${RELOCATING+ end = ALIGN(0x8)}; 43 43 ${RELOCATING+ _end = ALIGN(0x8)}; 44 44 } 45 - .stab 0 ${RELOCATING+(NOLOAD)} : 45 + .stab 0 ${RELOCATING+(NOLOAD)} : 46 46 { 47 47 [ .stab ] 48 48 }
+11 -11
ld/scripttempl/m88kbcs.sc
··· 1 1 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 2 - # 2 + # 3 3 # Copying and distribution of this file, with or without modification, 4 4 # are permitted in any medium without royalty provided the copyright 5 5 # notice and this notice are preserved. ··· 21 21 ${RELOCATING+ENTRY (__start)} 22 22 ${RELOCATING+${LIB_SEARCH_DIRS}} 23 23 24 - SECTIONS 25 - { 24 + SECTIONS 25 + { 26 26 .text ${RELOCATING+ (0x20007 + SIZEOF_HEADERS) &~ 7} : 27 27 { 28 28 ${RELOCATING+ __.text.start = .}; 29 29 ${RELOCATING+ __.init.start = .}; 30 30 ${RELOCATING+ *(.init)} 31 31 ${RELOCATING+ __.init.end = .}; 32 - *(.text) 32 + *(.text) 33 33 ${RELOCATING+ __.tdesc_start = .}; 34 34 ${RELOCATING+ *(.tdesc)} 35 35 ${RELOCATING+ __.text_end = .} ; ··· 39 39 ${RELOCATING+ *(.fini) } 40 40 ${RELOCATING+ __.fini_end = .}; 41 41 ${RELOCATING+_etext = .}; 42 - } 42 + } 43 43 .data ${RELOCATING+ NEXT (0x400000) + ((SIZEOF(.text) + ADDR(.text)) % 0x2000)} : 44 - { 44 + { 45 45 *(.data) 46 46 ${RELOCATING+_edata = .}; 47 - } 47 + } 48 48 .bss ${RELOCATING+ SIZEOF(.data) + ADDR(.data)} : 49 - { 50 - *(.bss) 51 - *(COMMON) 49 + { 50 + *(.bss) 51 + *(COMMON) 52 52 ${RELOCATING+ _end = .}; 53 53 ${RELOCATING+ __end = .}; 54 54 } 55 55 ${RELOCATING- ${INIT}} 56 56 ${RELOCATING- ${FINI}} 57 - .comment 0 ${RELOCATING+(NOLOAD)} : 57 + .comment 0 ${RELOCATING+(NOLOAD)} : 58 58 { 59 59 *(.comment) 60 60 }
+9 -9
ld/scripttempl/mcorepe.sc
··· 1 1 # Linker script for MCore PE. 2 2 # 3 3 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 4 - # 4 + # 5 5 # Copying and distribution of this file, with or without modification, 6 6 # are permitted in any medium without royalty provided the copyright 7 7 # notice and this notice are preserved. ··· 46 46 # because bash 2.x will lose the doublequotes. 47 47 cat <<EOF 48 48 OUTPUT_FORMAT("${OUTPUT_FORMAT}", "${BIG_OUTPUT_FORMAT}", 49 - "${LITTLE_OUTPUT_FORMAT}") 49 + "${LITTLE_OUTPUT_FORMAT}") 50 50 EOF 51 51 fi 52 52 ··· 63 63 64 64 SECTIONS 65 65 { 66 - .text ${RELOCATING+ __image_base__ + __section_alignment__ } : 66 + .text ${RELOCATING+ __image_base__ + __section_alignment__ } : 67 67 { 68 68 ${RELOCATING+ *(.init)} 69 69 *(.text) ··· 71 71 ${RELOCATING+ *(.text.*)} 72 72 *(.glue_7t) 73 73 *(.glue_7) 74 - ${CONSTRUCTING+ ___CTOR_LIST__ = .; __CTOR_LIST__ = . ; 74 + ${CONSTRUCTING+ ___CTOR_LIST__ = .; __CTOR_LIST__ = . ; 75 75 LONG (-1); *(.ctors); *(.ctor); LONG (0); } 76 - ${CONSTRUCTING+ ___DTOR_LIST__ = .; __DTOR_LIST__ = . ; 76 + ${CONSTRUCTING+ ___DTOR_LIST__ = .; __DTOR_LIST__ = . ; 77 77 LONG (-1); *(.dtors); *(.dtor); LONG (0); } 78 78 ${RELOCATING+ *(.fini)} 79 79 /* ??? Why is .gcc_exc here? */ ··· 88 88 breaks building the cygwin32 dll. Instead, we name the section 89 89 ".data_cygwin_nocopy" and explicitly include it after __data_end__. */ 90 90 91 - .data ${RELOCATING+BLOCK(__section_alignment__)} : 91 + .data ${RELOCATING+BLOCK(__section_alignment__)} : 92 92 { 93 93 ${RELOCATING+__data_start__ = . ;} 94 94 *(.data) ··· 133 133 ${R_IDATA} 134 134 } 135 135 .CRT ${RELOCATING+BLOCK(__section_alignment__)} : 136 - { 136 + { 137 137 ${R_CRT} 138 138 } 139 139 ··· 146 146 } 147 147 148 148 .reloc ${RELOCATING+BLOCK(__section_alignment__)} : 149 - { 149 + { 150 150 *(.reloc) 151 151 } 152 152 153 153 .rsrc ${RELOCATING+BLOCK(__section_alignment__)} : 154 - { 154 + { 155 155 *(.rsrc) 156 156 ${R_RSRC} 157 157 }
+10 -10
ld/scripttempl/mep.sc
··· 1 1 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 2 - # 2 + # 3 3 # Copying and distribution of this file, with or without modification, 4 4 # are permitted in any medium without royalty provided the copyright 5 5 # notice and this notice are preserved. ··· 39 39 # PLT_BEFORE_GOT - .plt just before .got when .plt is in data segement. 40 40 # BSS_PLT - .plt should be in bss segment 41 41 # TEXT_DYNAMIC - .dynamic in text segment, not data segment. 42 - # EMBEDDED - whether this is for an embedded system. 42 + # EMBEDDED - whether this is for an embedded system. 43 43 # SHLIB_TEXT_START_ADDR - if set, add to SIZEOF_HEADERS to set 44 44 # start address of shared library. 45 45 # INPUT_FILES - INPUT command of files to always include 46 46 # WRITABLE_RODATA - if set, the .rodata section should be writable 47 47 # INIT_START, INIT_END - statements just before and just after 48 - # combination of .init sections. 48 + # combination of .init sections. 49 49 # FINI_START, FINI_END - statements just before and just after 50 - # combination of .fini sections. 50 + # combination of .fini sections. 51 51 # STACK_ADDR - start of a .stack section. 52 52 # OTHER_END_SYMBOLS - symbols to place right at the end of the script. 53 53 # SEPARATE_GOTPLT - if set, .got.plt should be separate output section, ··· 136 136 SDATA="/* We want the small data sections together, so single-instruction offsets 137 137 can access them all, and initialized data all before uninitialized, so 138 138 we can shorten the on-disk segment size. */ 139 - .sdata ${RELOCATING-0} : 139 + .sdata ${RELOCATING-0} : 140 140 { 141 141 ${RELOCATING+${SDATA_START_SYMBOLS}} 142 142 ${CREATE_SHLIB+*(.sdata2 .sdata2.* .gnu.linkonce.s2.*)} ··· 155 155 NO_SMALL_DATA=" " 156 156 fi 157 157 test -n "$SEPARATE_GOTPLT" && SEPARATE_GOTPLT=" " 158 - CTOR=".ctors ${CONSTRUCTING-0} : 158 + CTOR=".ctors ${CONSTRUCTING-0} : 159 159 { 160 160 ${CONSTRUCTING+${CTOR_START}} 161 161 /* gcc uses crtbegin.o to find the start of ··· 283 283 .rel.dyn ${RELOCATING-0} : 284 284 { 285 285 EOF 286 - sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rela\./d;s/^.*: { *\(.*\)}$/ \1/' $COMBRELOC 286 + sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rela\./d;s/^.*: { *\(.*\)}$/ \1/' $COMBRELOC 287 287 cat <<EOF 288 288 } 289 289 .rela.dyn ${RELOCATING-0} : 290 290 { 291 291 EOF 292 - sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rel\./d;s/^.*: { *\(.*\)}/ \1/' $COMBRELOC 292 + sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rel\./d;s/^.*: { *\(.*\)}/ \1/' $COMBRELOC 293 293 cat <<EOF 294 294 } 295 295 EOF ··· 299 299 .rela.plt ${RELOCATING-0} : { *(.rela.plt) } 300 300 ${OTHER_PLT_RELOC_SECTIONS} 301 301 302 - .init ${RELOCATING-0} : 303 - { 302 + .init ${RELOCATING-0} : 303 + { 304 304 ${RELOCATING+${INIT_START}} 305 305 KEEP (*(.init)) 306 306 ${RELOCATING+${INIT_END}}
+1 -1
ld/scripttempl/mips.sc
··· 2 2 # Ian Lance Taylor <ian@cygnus.com>. 3 3 # 4 4 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 5 - # 5 + # 6 6 # Copying and distribution of this file, with or without modification, 7 7 # are permitted in any medium without royalty provided the copyright 8 8 # notice and this notice are preserved.
+1 -1
ld/scripttempl/mipsbsd.sc
··· 1 1 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 2 - # 2 + # 3 3 # Copying and distribution of this file, with or without modification, 4 4 # are permitted in any medium without royalty provided the copyright 5 5 # notice and this notice are preserved.
+1 -1
ld/scripttempl/mmo.sc
··· 1 1 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 2 - # 2 + # 3 3 # Copying and distribution of this file, with or without modification, 4 4 # are permitted in any medium without royalty provided the copyright 5 5 # notice and this notice are preserved.
+1 -1
ld/scripttempl/moxie.sc
··· 1 1 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 2 - # 2 + # 3 3 # Copying and distribution of this file, with or without modification, 4 4 # are permitted in any medium without royalty provided the copyright 5 5 # notice and this notice are preserved.
+5 -5
ld/scripttempl/nds32elf.sc
··· 1 1 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 2 - # 2 + # 3 3 # Copying and distribution of this file, with or without modification, 4 4 # are permitted in any medium without royalty provided the copyright 5 5 # notice and this notice are preserved. ··· 374 374 .rel.dyn ${RELOCATING-0} : 375 375 { 376 376 EOF 377 - sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rela\./d;/__rela_iplt_/d;s/^.*: { *\(.*\)}$/ \1/' $COMBRELOC >> ldscripts/dyntmp.$$ 377 + sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rela\./d;/__rela_iplt_/d;s/^.*: { *\(.*\)}$/ \1/' $COMBRELOC >> ldscripts/dyntmp.$$ 378 378 cat >> ldscripts/dyntmp.$$ <<EOF 379 379 } 380 380 .rela.dyn ${RELOCATING-0} : 381 381 { 382 382 EOF 383 - sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rel\./d;/__rel_iplt_/d;s/^.*: { *\(.*\)}/ \1/' $COMBRELOC >> ldscripts/dyntmp.$$ 383 + sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rel\./d;/__rel_iplt_/d;s/^.*: { *\(.*\)}/ \1/' $COMBRELOC >> ldscripts/dyntmp.$$ 384 384 cat >> ldscripts/dyntmp.$$ <<EOF 385 385 } 386 386 EOF ··· 410 410 cat ldscripts/dyntmp.$$ 411 411 else 412 412 if test -z "${NO_REL_RELOCS}"; then 413 - sed -e '/^[ ]*\.rela\.[^}]*$/,/}/d;/^[ ]*\.rela\./d;/__rela_iplt_/d' ldscripts/dyntmp.$$ 413 + sed -e '/^[ ]*\.rela\.[^}]*$/,/}/d;/^[ ]*\.rela\./d;/__rela_iplt_/d' ldscripts/dyntmp.$$ 414 414 fi 415 415 if test -z "${NO_RELA_RELOCS}"; then 416 - sed -e '/^[ ]*\.rel\.[^}]*$/,/}/d;/^[ ]*\.rel\./d;/__rel_iplt_/d' ldscripts/dyntmp.$$ 416 + sed -e '/^[ ]*\.rel\.[^}]*$/,/}/d;/^[ ]*\.rel\./d;/__rel_iplt_/d' ldscripts/dyntmp.$$ 417 417 fi 418 418 fi 419 419 rm -f ldscripts/dyntmp.$$
+7 -7
ld/scripttempl/nw.sc
··· 1 1 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 2 - # 2 + # 3 3 # Copying and distribution of this file, with or without modification, 4 4 # are permitted in any medium without royalty provided the copyright 5 5 # notice and this notice are preserved. ··· 29 29 test -z "${BIG_OUTPUT_FORMAT}" && BIG_OUTPUT_FORMAT=${OUTPUT_FORMAT} 30 30 test -z "${LITTLE_OUTPUT_FORMAT}" && LITTLE_OUTPUT_FORMAT=${OUTPUT_FORMAT} 31 31 test "$LD_FLAG" = "N" && DATA_ADDR=. 32 - INTERP=".interp ${RELOCATING-0} : { *(.interp) }" 33 - PLT=".plt ${RELOCATING-0} : { *(.plt) }" 32 + INTERP=".interp ${RELOCATING-0} : { *(.interp) }" 33 + PLT=".plt ${RELOCATING-0} : { *(.plt) }" 34 34 35 35 cat <<EOF 36 36 /* Copyright (C) 2014-2017 Free Software Foundation, Inc. ··· 61 61 .dynsym ${RELOCATING-0} : { *(.dynsym) } 62 62 .dynstr ${RELOCATING-0} : { *(.dynstr) } 63 63 .rel.text ${RELOCATING-0} : { *(.rel.text) } 64 - .rela.text ${RELOCATING-0} : { *(.rela.text) } 64 + .rela.text ${RELOCATING-0} : { *(.rela.text) } 65 65 .rel.data ${RELOCATING-0} : { *(.rel.data) } 66 - .rela.data ${RELOCATING-0} : { *(.rela.data) } 67 - .rel.rodata ${RELOCATING-0} : { *(.rel.rodata) } 68 - .rela.rodata ${RELOCATING-0} : { *(.rela.rodata) } 66 + .rela.data ${RELOCATING-0} : { *(.rela.data) } 67 + .rel.rodata ${RELOCATING-0} : { *(.rel.rodata) } 68 + .rela.rodata ${RELOCATING-0} : { *(.rela.rodata) } 69 69 .rel.got ${RELOCATING-0} : { *(.rel.got) } 70 70 .rela.got ${RELOCATING-0} : { *(.rela.got) } 71 71 .rel.ctors ${RELOCATING-0} : { *(.rel.ctors) }
+5 -5
ld/scripttempl/pe.sc
··· 1 1 # Linker script for PE. 2 2 # 3 3 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 4 - # 4 + # 5 5 # Copying and distribution of this file, with or without modification, 6 6 # are permitted in any medium without royalty provided the copyright 7 7 # notice and this notice are preserved. ··· 21 21 R_TEXT='*(SORT(.text$*))' 22 22 if test "x$LD_FLAG" = "xauto_import" ; then 23 23 R_DATA='*(SORT(.data$*)) 24 - *(.rdata) 24 + *(.rdata) 25 25 *(SORT(.rdata$*))' 26 26 R_RDATA='' 27 27 else 28 28 R_DATA='*(SORT(.data$*))' 29 29 R_RDATA='*(.rdata) 30 - *(SORT(.rdata$*))' 30 + *(SORT(.rdata$*))' 31 31 fi 32 32 R_IDATA234=' 33 33 KEEP (SORT(*)(.idata$2)) ··· 197 197 ${R_IDATA67} 198 198 } 199 199 .CRT ${RELOCATING+BLOCK(__section_alignment__)} : 200 - { 200 + { 201 201 ${RELOCATING+___crt_xc_start__ = . ;} 202 202 ${R_CRT_XC} 203 203 ${RELOCATING+___crt_xc_end__ = . ;} ··· 220 220 be at the beginning of the section to enable SECREL32 relocations with TLS 221 221 data. */ 222 222 .tls ${RELOCATING+BLOCK(__section_alignment__)} : 223 - { 223 + { 224 224 ${RELOCATING+___tls_start__ = . ;} 225 225 ${R_TLS} 226 226 ${RELOCATING+___tls_end__ = . ;}
+5 -5
ld/scripttempl/pep.sc
··· 1 1 # Linker script for PE. 2 2 # 3 3 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 4 - # 4 + # 5 5 # Copying and distribution of this file, with or without modification, 6 6 # are permitted in any medium without royalty provided the copyright 7 7 # notice and this notice are preserved. ··· 21 21 R_TEXT='*(SORT(.text$*))' 22 22 if test "x$LD_FLAG" = "xauto_import" ; then 23 23 R_DATA='*(SORT(.data$*)) 24 - *(.rdata) 24 + *(.rdata) 25 25 *(SORT(.rdata$*))' 26 26 R_RDATA='' 27 27 else 28 28 R_DATA='*(SORT(.data$*))' 29 29 R_RDATA='*(.rdata) 30 - *(SORT(.rdata$*))' 30 + *(SORT(.rdata$*))' 31 31 fi 32 32 R_IDATA234=' 33 33 KEEP (SORT(*)(.idata$2)) ··· 202 202 ${R_IDATA67} 203 203 } 204 204 .CRT ${RELOCATING+BLOCK(__section_alignment__)} : 205 - { 205 + { 206 206 ${RELOCATING+___crt_xc_start__ = . ;} 207 207 ${R_CRT_XC} 208 208 ${RELOCATING+___crt_xc_end__ = . ;} ··· 225 225 be at the beginning of the section to enable SECREL32 relocations with TLS 226 226 data. */ 227 227 .tls ${RELOCATING+BLOCK(__section_alignment__)} : 228 - { 228 + { 229 229 ${RELOCATING+___tls_start__ = . ;} 230 230 ${R_TLS} 231 231 ${RELOCATING+___tls_end__ = . ;}
+1 -1
ld/scripttempl/pj.sc
··· 1 1 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 2 - # 2 + # 3 3 # Copying and distribution of this file, with or without modification, 4 4 # are permitted in any medium without royalty provided the copyright 5 5 # notice and this notice are preserved.
+34 -34
ld/scripttempl/ppcpe.sc
··· 3 3 # All new mistakes should be credited to Kim Knuttila (krk@cygnus.com) 4 4 # 5 5 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 6 - # 6 + # 7 7 # Copying and distribution of this file, with or without modification, 8 8 # are permitted in any medium without royalty provided the copyright 9 9 # notice and this notice are preserved. ··· 26 26 27 27 /* Much of this layout was determined by delving into .exe files for 28 28 the box generated by other compilers/linkers/etc. This means that 29 - if a particular feature did not happen to appear in one of the 29 + if a particular feature did not happen to appear in one of the 30 30 subject files, then it may not be yet supported. 31 31 */ 32 32 33 33 /* It's "mainCRTStartup", not "_mainCRTStartup", and it's located in 34 34 one of the two .lib files (libc.lib and kernel32.lib) that currently 35 - must be present on the link line. This means that you must use 35 + must be present on the link line. This means that you must use 36 36 "-u mainCRTStartup" to make sure it gets included in the link. 37 37 */ 38 38 ··· 42 42 { 43 43 44 44 /* text - the usual meaning */ 45 - .text ${RELOCATING+ __image_base__ + __section_alignment__ } : 45 + .text ${RELOCATING+ __image_base__ + __section_alignment__ } : 46 46 { 47 47 ${RELOCATING+ *(.init);} 48 48 *(.text) 49 49 ${RELOCATING+ *(.text.*)} 50 50 *(.gcc_except_table) 51 - ${CONSTRUCTING+ ___CTOR_LIST__ = .; __CTOR_LIST__ = . ; 52 - LONG (-1); *(.ctors); *(.ctor); LONG (0); } 53 - ${CONSTRUCTING+ ___DTOR_LIST__ = .; __DTOR_LIST__ = . ; 54 - LONG (-1); *(.dtors); *(.dtor); LONG (0); } 51 + ${CONSTRUCTING+ ___CTOR_LIST__ = .; __CTOR_LIST__ = . ; 52 + LONG (-1); *(.ctors); *(.ctor); LONG (0); } 53 + ${CONSTRUCTING+ ___DTOR_LIST__ = .; __DTOR_LIST__ = . ; 54 + LONG (-1); *(.dtors); *(.dtor); LONG (0); } 55 55 ${RELOCATING+ *(.fini);} 56 - ${RELOCATING+ etext = .}; 56 + ${RELOCATING+ etext = .}; 57 57 } 58 58 59 59 /* rdata - Read Only Runtime Data 60 - CTR sections: All of the CRT (read only C runtime data) sections 61 - appear at the start of the .rdata (read only runtime data) 60 + CTR sections: All of the CRT (read only C runtime data) sections 61 + appear at the start of the .rdata (read only runtime data) 62 62 section, in the following order. Don't know if it matters or not. 63 63 Not all sections are always present either. 64 64 .rdata: compiler generated read only data ··· 88 88 89 89 .edata BLOCK(__section_alignment__) : 90 90 { 91 - *(.edata); 91 + *(.edata); 92 92 } 93 93 94 94 /* data - initialized data ··· 99 99 section, as opposed to being given a section of it's own. 100 100 COMMON: 101 101 */ 102 - .data BLOCK(__section_alignment__) : 102 + .data BLOCK(__section_alignment__) : 103 103 { 104 - __data_start__ = . ; 104 + __data_start__ = . ; 105 105 *(.ydata); 106 106 *(.data); 107 107 *(.data2); ··· 110 110 *(COMMON); 111 111 __bss_end__ = . ; 112 112 ${RELOCATING+ end = .}; 113 - __data_end__ = . ; 113 + __data_end__ = . ; 114 114 } 115 115 116 116 /* The exception handling table. A sequence of 5 word entries. Section 117 117 address and extent are placed in the DataDirectory. 118 118 */ 119 119 .pdata BLOCK(__section_alignment__) : 120 - { 120 + { 121 121 *(.pdata) 122 - ; 122 + ; 123 123 } 124 124 125 - /* The idata section is chock full of magic bits. 125 + /* The idata section is chock full of magic bits. 126 126 1. Boundaries around various idata parts are used to initialize 127 127 some of the fields of the DataDirectory. In particular, the 128 128 magic for 2, 4 and 5 are known to be used. Some compilers ··· 133 133 The ".private.toc" sections are generated by the ppc bfd. The 134 134 .toc variable is generated by gas, and resolved here. It is 135 135 used to initialized function descriptors (and anyone else who 136 - needs the address of the module's toc). The only thing 136 + needs the address of the module's toc). The only thing 137 137 interesting about it at all? Most ppc instructions using it 138 138 have a 16bit displacement field. The convention for addressing 139 139 is to initialize the .toc value to 32K past the start of the ··· 142 142 on this number or you get pretty stupid results. 143 143 */ 144 144 .idata BLOCK(__section_alignment__) : 145 - { 145 + { 146 146 __idata2_magic__ = .; 147 147 *(.idata\$2); 148 148 __idata3_magic__ = .; ··· 164 164 /* reldata -- data that requires relocation 165 165 */ 166 166 .reldata BLOCK(__section_alignment__) : 167 - { 167 + { 168 168 *(.reldata) 169 - ; 169 + ; 170 170 } 171 171 172 172 173 173 /* Resources */ 174 174 .rsrc BLOCK(__section_alignment__) : 175 - { 175 + { 176 176 *(.rsrc\$01) 177 177 *(.rsrc\$02) 178 178 ; 179 179 } 180 180 181 - .stab BLOCK(__section_alignment__) ${RELOCATING+(NOLOAD)} : 181 + .stab BLOCK(__section_alignment__) ${RELOCATING+(NOLOAD)} : 182 182 { 183 183 [ .stab ] 184 184 } ··· 188 188 [ .stabstr ] 189 189 } 190 190 191 - /* The .reloc section is currently generated by the dlltool from Steve 191 + /* The .reloc section is currently generated by the dlltool from Steve 192 192 Chamberlain in a second pass of linking. Section address and extent 193 193 are placed in the DataDirectory. 194 194 */ 195 195 .reloc BLOCK(__section_alignment__) : 196 - { 196 + { 197 197 *(.reloc) 198 198 ; 199 199 } 200 200 201 201 /* We don't do anything useful with codeview debugger support or the 202 - directive section (yet). Hopefully, we junk them correctly. 202 + directive section (yet). Hopefully, we junk them correctly. 203 203 */ 204 - /DISCARD/ BLOCK(__section_alignment__) : 204 + /DISCARD/ BLOCK(__section_alignment__) : 205 205 { 206 - *(.debug\$S) 207 - *(.debug\$T) 208 - *(.debug\$F) 209 - *(.drectve) 210 - ; 211 - } 206 + *(.debug\$S) 207 + *(.debug\$T) 208 + *(.debug\$F) 209 + *(.drectve) 210 + ; 211 + } 212 212 } 213 213 EOF
+3 -3
ld/scripttempl/psos.sc
··· 1 1 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 2 - # 2 + # 3 3 # Copying and distribution of this file, with or without modification, 4 4 # are permitted in any medium without royalty provided the copyright 5 5 # notice and this notice are preserved. ··· 51 51 ${RELOCATING+ PROVIDE(_edata = .);} 52 52 } 53 53 .bss ${RELOCATING:-0} : 54 - { 54 + { 55 55 ${RELOCATING+ PROVIDE(__bss = .);} 56 56 *(.bss); 57 57 *(zerovars); ··· 61 61 ${RELOCATING+ PROVIDE(_end = .);} 62 62 ${RELOCATING+ PROVIDE(_FreeMemStart = .);} 63 63 } 64 - .stab 0 ${RELOCATING+(NOLOAD)} : 64 + .stab 0 ${RELOCATING+(NOLOAD)} : 65 65 { 66 66 *(.stab); 67 67 }
+1 -1
ld/scripttempl/riscix.sc
··· 1 1 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 2 - # 2 + # 3 3 # Copying and distribution of this file, with or without modification, 4 4 # are permitted in any medium without royalty provided the copyright 5 5 # notice and this notice are preserved.
+1 -1
ld/scripttempl/sh.sc
··· 1 1 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 2 - # 2 + # 3 3 # Copying and distribution of this file, with or without modification, 4 4 # are permitted in any medium without royalty provided the copyright 5 5 # notice and this notice are preserved.
+3 -3
ld/scripttempl/sparccoff.sc
··· 2 2 # Based on i386coff.sc by Ian Taylor <ian@cygnus.com>. 3 3 # 4 4 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 5 - # 5 + # 6 6 # Copying and distribution of this file, with or without modification, 7 7 # are permitted in any medium without royalty provided the copyright 8 8 # notice and this notice are preserved. ··· 45 45 ${RELOCATING+ edata = .}; 46 46 } 47 47 .bss ${RELOCATING+ SIZEOF(.data) + ADDR(.data)} : 48 - { 48 + { 49 49 *(.bss) 50 50 *(COMMON) 51 51 ${RELOCATING+ end = .}; 52 52 } 53 - .stab 0 ${RELOCATING+(NOLOAD)} : 53 + .stab 0 ${RELOCATING+(NOLOAD)} : 54 54 { 55 55 [ .stab ] 56 56 }
+6 -6
ld/scripttempl/st2000.sc
··· 1 1 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 2 - # 2 + # 3 3 # Copying and distribution of this file, with or without modification, 4 4 # are permitted in any medium without royalty provided the copyright 5 5 # notice and this notice are preserved. ··· 14 14 OUTPUT_FORMAT("${OUTPUT_FORMAT}") 15 15 OUTPUT_ARCH(${ARCH}) 16 16 17 - SECTIONS 18 - { 17 + SECTIONS 18 + { 19 19 .text : 20 - { 21 - *(.text) 20 + { 21 + *(.text) 22 22 *(.strings) 23 - _etext = .; 23 + _etext = .; 24 24 *(.data) 25 25 _edata = .; 26 26 *(.bss)
+1 -1
ld/scripttempl/tic30aout.sc
··· 1 1 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 2 - # 2 + # 3 3 # Copying and distribution of this file, with or without modification, 4 4 # are permitted in any medium without royalty provided the copyright 5 5 # notice and this notice are preserved.
+4 -4
ld/scripttempl/tic30coff.sc
··· 1 1 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 2 - # 2 + # 3 3 # Copying and distribution of this file, with or without modification, 4 4 # are permitted in any medium without royalty provided the copyright 5 5 # notice and this notice are preserved. ··· 22 22 ramblk1 : ORIGIN = 0x02027000, LENGTH = 0x1000 23 23 } 24 24 25 - SECTIONS 26 - { 25 + SECTIONS 26 + { 27 27 .vectors 0x00000000 : 28 28 { 29 29 *(vectors) 30 30 } 31 31 32 - .text : 32 + .text : 33 33 { 34 34 *(.text) 35 35 } > rom
+11 -11
ld/scripttempl/tic4xcoff.sc
··· 1 1 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 2 - # 2 + # 3 3 # Copying and distribution of this file, with or without modification, 4 4 # are permitted in any medium without royalty provided the copyright 5 5 # notice and this notice are preserved. ··· 27 27 # 6. EXT_ROM EXT_RAM (mpmode,extram,extrom) 28 28 # 7. EXT_RAM EXT_RAM (mpmode,extram) 29 29 # 30 - # In MC mode, TEXT and DATA are copied into RAM by the bootloader. 30 + # In MC mode, TEXT and DATA are copied into RAM by the bootloader. 31 31 # 32 32 # In MP mode with external ROM, DATA needs to be copied into RAM at boot time. 33 33 # 34 - # If there is external RAM it is better to use that and reserve the internal RAM 34 + # If there is external RAM it is better to use that and reserve the internal RAM 35 35 # for data buffers. However, the address of the external RAM needs to be specified. 36 36 # 37 37 # This emulation assumes config 7. ··· 126 126 } ${RELOCATING+ > ${TEXT_MEMORY}} 127 127 /* Global initialised variables. */ 128 128 .data : 129 - { 129 + { 130 130 ${RELOCATING+ __data = .;} 131 131 *(.data) 132 132 ${RELOCATING+ __edata = .;} 133 133 } ${RELOCATING+ > ${DATA_MEMORY}} 134 134 /* Global uninitialised variables. */ 135 135 .bss : { 136 - ${RELOCATING+ __bss = .;} 136 + ${RELOCATING+ __bss = .;} 137 137 *(.bss) 138 138 *(COMMON) 139 139 ${RELOCATING+ __end = .;} 140 140 } ${RELOCATING+ > ${DATA_MEMORY}} 141 141 /* Heap. */ 142 142 .heap : 143 - { 144 - ${RELOCATING+ __heap = .;} 143 + { 144 + ${RELOCATING+ __heap = .;} 145 145 ${RELOCATING+ . += __HEAP_SIZE}; 146 146 } ${RELOCATING+ > ${DATA_MEMORY}} 147 147 /* Stack (grows upward). */ 148 148 .stack : 149 - { 150 - ${RELOCATING+ __stack = .;} 149 + { 150 + ${RELOCATING+ __stack = .;} 151 151 *(.stack) 152 - ${RELOCATING+ . = . + __STACK_SIZE}; 152 + ${RELOCATING+ . = . + __STACK_SIZE}; 153 153 } ${RELOCATING+ > ${DATA_MEMORY}} 154 - .stab 0 ${RELOCATING+(NOLOAD)} : 154 + .stab 0 ${RELOCATING+(NOLOAD)} : 155 155 { 156 156 [ .stab ] 157 157 }
+7 -7
ld/scripttempl/tic54xcoff.sc
··· 2 2 # patterned after description in TI Assembler Tools PDF, SPRU102C, 7-53 3 3 # 4 4 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 5 - # 5 + # 6 6 # Copying and distribution of this file, with or without modification, 7 7 # are permitted in any medium without royalty provided the copyright 8 8 # notice and this notice are preserved. ··· 27 27 28 28 ${RELOCATING+ENTRY (${ENTRY})} 29 29 30 - SECTIONS 31 - { 32 - .text : 30 + SECTIONS 31 + { 32 + .text : 33 33 { 34 34 ___text__ = .; 35 35 *(.text) 36 36 etext = .; 37 37 ___etext__ = .; 38 38 } > prog 39 - .data : 39 + .data : 40 40 { 41 41 ___data__ = .; 42 42 __data = .; ··· 46 46 ___edata__ = .; 47 47 } > prog 48 48 /* all other initialized sections should be allocated here */ 49 - .cinit : 49 + .cinit : 50 50 { 51 51 *(.cinit) 52 52 } > prog 53 - .bss : 53 + .bss : 54 54 { 55 55 ___bss__ = .; 56 56 __bss = .;
+3 -3
ld/scripttempl/tic80coff.sc
··· 1 1 # Linker script for TI TMS320C80 (tic80) COFF. 2 2 # 3 3 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 4 - # 4 + # 5 5 # Copying and distribution of this file, with or without modification, 6 6 # are permitted in any medium without royalty provided the copyright 7 7 # notice and this notice are preserved. ··· 67 67 *(.data) 68 68 ${RELOCATING+ __edata = .}; 69 69 } 70 - .bss : { 70 + .bss : { 71 71 ${RELOCATING+ __bss_start = .}; 72 72 *(.bss) 73 73 *(COMMON) 74 74 ${RELOCATING+ _end = ALIGN(0x8)}; 75 75 ${RELOCATING+ __end = ALIGN(0x8)}; 76 76 } 77 - .stab 0 ${RELOCATING+(NOLOAD)} : 77 + .stab 0 ${RELOCATING+(NOLOAD)} : 78 78 { 79 79 [ .stab ] 80 80 }
+6 -6
ld/scripttempl/v850.sc
··· 1 1 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 2 - # 2 + # 3 3 # Copying and distribution of this file, with or without modification, 4 4 # are permitted in any medium without royalty provided the copyright 5 5 # notice and this notice are preserved. ··· 78 78 { 79 79 *(.text) 80 80 ${RELOCATING+*(.text.*)} 81 - 81 + 82 82 /* .gnu.warning sections are handled specially by elf32.em. */ 83 83 *(.gnu.warning) 84 84 *(.gnu.linkonce.t*) ··· 96 96 ${RELOCATING+PROVIDE(__ctbp = .);} 97 97 *(.call_table_data) 98 98 } = 0xff /* Fill gaps with 0xff. */ 99 - 99 + 100 100 .call_table_text : 101 101 { 102 102 *(.call_table_text) ··· 153 153 /* We want the small data sections together, so single-instruction offsets 154 154 can access them all, and initialized data all before uninitialized, so 155 155 we can shorten the on-disk segment size. */ 156 - 156 + 157 157 .sdata ${SDATA_START_ADDR} : 158 158 { 159 159 ${RELOCATING+PROVIDE (__gp = . + 0x8000);} ··· 170 170 it can directly precede the .bss section. This allows runtime startup 171 171 code to initialise all the zero-data sections by simply taking the 172 172 value of '_edata' and zeroing until it reaches '_end'. */ 173 - 173 + 174 174 .sbss : 175 175 { 176 176 ${RELOCATING+__sbss_start = .;} ··· 194 194 ${RELOCATING+PROVIDE (end = .);} 195 195 ${RELOCATING+PROVIDE (_heap_start = .);} 196 196 197 - .note.renesas 0 : { KEEP(*(.note.renesas)) } 197 + .note.renesas 0 : { KEEP(*(.note.renesas)) } 198 198 199 199 /* Stabs debugging sections. */ 200 200 .stab 0 : { *(.stab) }
+6 -6
ld/scripttempl/v850_rh850.sc
··· 1 1 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 2 - # 2 + # 3 3 # Copying and distribution of this file, with or without modification, 4 4 # are permitted in any medium without royalty provided the copyright 5 5 # notice and this notice are preserved. ··· 82 82 { 83 83 *(.text) 84 84 ${RELOCATING+*(.text.*)} 85 - 85 + 86 86 /* .gnu.warning sections are handled specially by elf32.em. */ 87 87 *(.gnu.warning) 88 88 *(.gnu.linkonce.t*) ··· 100 100 ${RELOCATING+PROVIDE(__ctbp = .);} 101 101 *(.call_table_data) 102 102 } = 0xff /* Fill gaps with 0xff. */ 103 - 103 + 104 104 .call_table_text : 105 105 { 106 106 *(.call_table_text) ··· 169 169 /* We want the small data sections together, so single-instruction offsets 170 170 can access them all, and initialized data all before uninitialized, so 171 171 we can shorten the on-disk segment size. */ 172 - 172 + 173 173 .sdata ${SDATA_START_ADDR} : 174 174 { 175 175 ${RELOCATING+PROVIDE (__gp = . + 0x8000);} ··· 189 189 it can directly precede the .bss section. This allows runtime startup 190 190 code to initialise all the zero-data sections by simply taking the 191 191 value of '_edata' and zeroing until it reaches '_end'. */ 192 - 192 + 193 193 .sbss : 194 194 { 195 195 ${RELOCATING+__sbss_start = .;} ··· 214 214 ${RELOCATING+PROVIDE (end = .);} 215 215 ${RELOCATING+PROVIDE (_heap_start = .);} 216 216 217 - .note.renesas 0 : { KEEP(*(.note.renesas)) } 217 + .note.renesas 0 : { KEEP(*(.note.renesas)) } 218 218 219 219 /* Stabs debugging sections. */ 220 220 .stab 0 : { *(.stab) }
+1 -1
ld/scripttempl/vanilla.sc
··· 1 1 # Nothing to do. 2 2 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 3 - # 3 + # 4 4 # Copying and distribution of this file, with or without modification, 5 5 # are permitted in any medium without royalty provided the copyright 6 6 # notice and this notice are preserved.
+2 -2
ld/scripttempl/visium.sc
··· 1 1 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 2 - # 2 + # 3 3 # Copying and distribution of this file, with or without modification, 4 4 # are permitted in any medium without royalty provided the copyright 5 5 # notice and this notice are preserved. ··· 134 134 ${RELOCATING+ . = ALIGN(4);} 135 135 ${RELOCATING+ _edata = .;} 136 136 } ${RELOCATING+ > ram} 137 - .bss ${RELOCATING-0} : { 137 + .bss ${RELOCATING-0} : { 138 138 ${RELOCATING+ . = ALIGN(4);} 139 139 ${RELOCATING+ __bss_start = .;} 140 140 *(.bss)
+10 -10
ld/scripttempl/w65.sc
··· 1 1 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 2 - # 2 + # 3 3 # Copying and distribution of this file, with or without modification, 4 4 # are permitted in any medium without royalty provided the copyright 5 5 # notice and this notice are preserved. ··· 29 29 ram : o = 0x1000, l = 512k 30 30 } 31 31 32 - SECTIONS 33 - { 32 + SECTIONS 33 + { 34 34 .text : 35 - { 36 - *(.text) 35 + { 36 + *(.text) 37 37 *(.strings) 38 - ${RELOCATING+ _etext = . ; } 38 + ${RELOCATING+ _etext = . ; } 39 39 } ${RELOCATING+ > ram} 40 40 41 41 ${CONSTRUCTING+${TORS}} ··· 45 45 *(.data) 46 46 ${RELOCATING+ _edata = . ; } 47 47 } ${RELOCATING+ > ram} 48 - 48 + 49 49 .bss : 50 50 { 51 51 ${RELOCATING+ _bss_start = . ; } ··· 53 53 *(COMMON) 54 54 ${RELOCATING+ _end = . ; } 55 55 } ${RELOCATING+ >ram} 56 - 56 + 57 57 .stack ${RELOCATING+ 0x30000 } : 58 58 { 59 59 ${RELOCATING+ _stack = . ; } 60 60 *(.stack) 61 61 } ${RELOCATING+ > ram} 62 - 62 + 63 63 .stab . (NOLOAD) : 64 64 { 65 65 [ .stab ] 66 66 } 67 - 67 + 68 68 .stabstr . (NOLOAD) : 69 69 { 70 70 [ .stabstr ]
+7 -7
ld/scripttempl/xstormy16.sc
··· 1 1 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 2 - # 2 + # 3 3 # Copying and distribution of this file, with or without modification, 4 4 # are permitted in any medium without royalty provided the copyright 5 5 # notice and this notice are preserved. ··· 25 25 # .bss section besides __bss_start. 26 26 # INPUT_FILES - INPUT command of files to always include 27 27 # INIT_START, INIT_END - statements just before and just after 28 - # combination of .init sections. 28 + # combination of .init sections. 29 29 # FINI_START, FINI_END - statements just before and just after 30 - # combination of .fini sections. 30 + # combination of .fini sections. 31 31 # 32 32 # When adding sections, do note that the names of some sections are used 33 33 # when specifying the start address of the next. ··· 59 59 if [ -z "$MACHINE" ]; then OUTPUT_ARCH=${ARCH}; else OUTPUT_ARCH=${ARCH}:${MACHINE}; fi 60 60 test -z "${ELFSIZE}" && ELFSIZE=32 61 61 test -z "${ALIGNMENT}" && ALIGNMENT="${ELFSIZE} / 8" 62 - CTOR=".ctors ${CONSTRUCTING-0} : 62 + CTOR=".ctors ${CONSTRUCTING-0} : 63 63 { 64 64 ${CONSTRUCTING+${CTOR_START}} 65 65 /* gcc uses crtbegin.o to find the start of ··· 119 119 120 120 /* There are two memory regions we care about, one from 0 through 0x7F00 121 121 that is RAM and one from 0x8000 up which is ROM. */ 122 - MEMORY 122 + MEMORY 123 123 { 124 124 RAM (w) : ORIGIN = 0, LENGTH = 0x7F00 125 125 ROM (!w) : ORIGIN = 0x8000, LENGTH = 0xFF8000 ··· 185 185 ${RELOCATING+*(.gnu.linkonce.t.*)} 186 186 ${RELOCATING+${OTHER_TEXT_SECTIONS}} 187 187 } ${RELOCATING+> ROM =${NOP-0}} 188 - .init ${RELOCATING-0} : 189 - { 188 + .init ${RELOCATING-0} : 189 + { 190 190 ${RELOCATING+${INIT_START}} 191 191 KEEP (*(.init)) 192 192 ${RELOCATING+${INIT_END}}
+2 -2
ld/scripttempl/z80.sc
··· 1 1 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 2 - # 2 + # 3 3 # Copying and distribution of this file, with or without modification, 4 4 # are permitted in any medium without royalty provided the copyright 5 5 # notice and this notice are preserved. ··· 19 19 __Ltext = .; 20 20 ENTRY (__Ltext) 21 21 EOF 22 - else 22 + else 23 23 echo "OUTPUT_FORMAT(\"${OUTPUT_FORMAT}\")" 24 24 fi 25 25 cat <<EOF
+10 -10
ld/scripttempl/z8000.sc
··· 1 1 # Copyright (C) 2014-2017 Free Software Foundation, Inc. 2 - # 2 + # 3 3 # Copying and distribution of this file, with or without modification, 4 4 # are permitted in any medium without royalty provided the copyright 5 5 # notice and this notice are preserved. ··· 15 15 OUTPUT_ARCH("${OUTPUT_ARCH}") 16 16 ${RELOCATING+ENTRY (_start)} 17 17 18 - SECTIONS 19 - { 18 + SECTIONS 19 + { 20 20 .text ${BIG+ ${RELOCATING+ 0x0000000}} : 21 - { 22 - *(.text) 21 + { 22 + *(.text) 23 23 *(.strings) 24 24 *(.rdata) 25 25 } 26 26 27 - .ctors ${BIG+ ${RELOCATING+ 0x2000000}} : 27 + .ctors ${BIG+ ${RELOCATING+ 0x2000000}} : 28 28 { 29 29 ${CONSTRUCTING+ ___ctors = . ; } 30 30 *(.ctors); ··· 32 32 ___dtors = . ; 33 33 *(.dtors); 34 34 ${CONSTRUCTING+ ___dtors_end = . ; } 35 - } 35 + } 36 36 37 37 .data ${BIG+ ${RELOCATING+ 0x3000000}} : 38 38 { 39 39 *(.data) 40 40 } 41 41 42 - .bss ${BIG+ ${RELOCATING+ 0x4000000}} : 42 + .bss ${BIG+ ${RELOCATING+ 0x4000000}} : 43 43 { 44 44 ${RELOCATING+ __start_bss = . ; } 45 45 *(.bss); ··· 52 52 ${RELOCATING+ __start_heap = . ; } 53 53 ${RELOCATING+ . = . + 20k ; } 54 54 ${RELOCATING+ __end_heap = . ; } 55 - } 55 + } 56 56 57 - .stack ${RELOCATING+ 0xf000 } : 57 + .stack ${RELOCATING+ 0xf000 } : 58 58 { 59 59 ${RELOCATING+ _stack = . ; } 60 60 *(.stack)