* scripttempl/elf.sc (NO_REL_RELOCS, NO_RELA_RELOCS, NON_ALLOC_DYN):
authorAlan Modra <amodra@gmail.com>
Wed, 22 Oct 2008 05:20:44 +0000 (05:20 +0000)
committerAlan Modra <amodra@gmail.com>
Wed, 22 Oct 2008 05:20:44 +0000 (05:20 +0000)
Handle these defines.
* emulparams/criself.sh, * emulparams/crislinux.sh,
* emulparams/elf32am33lin.sh, * emulparams/elf32fr30.sh,
* emulparams/elf32_i860.sh, * emulparams/elf32ip2k.sh,
* emulparams/elf32mcore.sh, * emulparams/elf32ppccommon.sh,
* emulparams/elf32ppcwindiss.sh, * emulparams/elf32_sparc.sh,
* emulparams/elf32_spu.sh, * emulparams/elf32vax.sh,
* emulparams/elf64alpha.sh, * emulparams/elf64mmix.sh,
* emulparams/elf64ppc.sh, * emulparams/elf64_s390.sh,
* emulparams/elf64_sparc.sh, * emulparams/elf_s390.sh,
* emulparams/elf_x86_64.sh, * emulparams/h8300elf.sh,
* emulparams/hppa64linux.sh, * emulparams/hppalinux.sh,
* emulparams/m68kelf.sh, * emulparams/mn10200.sh,
* emulparams/pjelf.sh, * emulparams/ppclynx.sh,
* emulparams/shelf32.sh, * emulparams/shelf_nto.sh,
* emulparams/shelf.sh, * emulparams/shelf_vxworks.sh,
* emulparams/shlelf32_linux.sh, * emulparams/shlelf_linux.sh,
* emulparams/shlelf_nto.sh (NO_REL_RELOCS): Set.
* emulparams/arcelf.sh, * emulparams/elf32_i960.sh,
* emulparams/elf32openrisc.sh, * emulparams/elf_i386_be.sh,
* emulparams/elf_i386_ldso.sh, * emulparams/elf_i386.sh,
* emulparams/elf_i386_vxworks.sh, * emulparams/i386lynx.sh,
* emulparams/i386moss.sh, * emulparams/i386nto.sh,
* emulparams/or32elf.sh, * emulparams/scoreelf.sh (NO_RELA_RELOCS): Set.

47 files changed:
ld/ChangeLog
ld/emulparams/arcelf.sh
ld/emulparams/criself.sh
ld/emulparams/crislinux.sh
ld/emulparams/elf32_i860.sh
ld/emulparams/elf32_i960.sh
ld/emulparams/elf32_sparc.sh
ld/emulparams/elf32_spu.sh
ld/emulparams/elf32am33lin.sh
ld/emulparams/elf32fr30.sh
ld/emulparams/elf32ip2k.sh
ld/emulparams/elf32mcore.sh
ld/emulparams/elf32openrisc.sh
ld/emulparams/elf32ppccommon.sh
ld/emulparams/elf32ppcwindiss.sh
ld/emulparams/elf32vax.sh
ld/emulparams/elf64_s390.sh
ld/emulparams/elf64_sparc.sh
ld/emulparams/elf64alpha.sh
ld/emulparams/elf64mmix.sh
ld/emulparams/elf64ppc.sh
ld/emulparams/elf_i386.sh
ld/emulparams/elf_i386_be.sh
ld/emulparams/elf_i386_ldso.sh
ld/emulparams/elf_i386_vxworks.sh
ld/emulparams/elf_s390.sh
ld/emulparams/elf_x86_64.sh
ld/emulparams/h8300elf.sh
ld/emulparams/hppa64linux.sh
ld/emulparams/hppalinux.sh
ld/emulparams/i386lynx.sh
ld/emulparams/i386moss.sh
ld/emulparams/i386nto.sh
ld/emulparams/m68kelf.sh
ld/emulparams/mn10200.sh
ld/emulparams/or32elf.sh
ld/emulparams/pjelf.sh
ld/emulparams/ppclynx.sh
ld/emulparams/scoreelf.sh
ld/emulparams/shelf.sh
ld/emulparams/shelf32.sh
ld/emulparams/shelf_nto.sh
ld/emulparams/shelf_vxworks.sh
ld/emulparams/shlelf32_linux.sh
ld/emulparams/shlelf_linux.sh
ld/emulparams/shlelf_nto.sh
ld/scripttempl/elf.sc

index 7677999b5814082d54b199856a1522b54ed858f2..8e8cfa156ca3468b58fb6972387fd0bcf344f53f 100644 (file)
@@ -1,3 +1,31 @@
+2008-10-22  Alan Modra  <amodra@bigpond.net.au>
+
+       * scripttempl/elf.sc (NO_REL_RELOCS, NO_RELA_RELOCS, NON_ALLOC_DYN): 
+       Handle these defines.
+       * emulparams/criself.sh, * emulparams/crislinux.sh,
+       * emulparams/elf32am33lin.sh, * emulparams/elf32fr30.sh,
+       * emulparams/elf32_i860.sh, * emulparams/elf32ip2k.sh,
+       * emulparams/elf32mcore.sh, * emulparams/elf32ppccommon.sh,
+       * emulparams/elf32ppcwindiss.sh, * emulparams/elf32_sparc.sh,
+       * emulparams/elf32_spu.sh, * emulparams/elf32vax.sh,
+       * emulparams/elf64alpha.sh, * emulparams/elf64mmix.sh,
+       * emulparams/elf64ppc.sh, * emulparams/elf64_s390.sh,
+       * emulparams/elf64_sparc.sh, * emulparams/elf_s390.sh,
+       * emulparams/elf_x86_64.sh, * emulparams/h8300elf.sh,
+       * emulparams/hppa64linux.sh, * emulparams/hppalinux.sh,
+       * emulparams/m68kelf.sh, * emulparams/mn10200.sh,
+       * emulparams/pjelf.sh, * emulparams/ppclynx.sh,
+       * emulparams/shelf32.sh, * emulparams/shelf_nto.sh,
+       * emulparams/shelf.sh, * emulparams/shelf_vxworks.sh,
+       * emulparams/shlelf32_linux.sh, * emulparams/shlelf_linux.sh,
+       * emulparams/shlelf_nto.sh (NO_REL_RELOCS): Set.
+       * emulparams/arcelf.sh, * emulparams/elf32_i960.sh,
+       * emulparams/elf32openrisc.sh, * emulparams/elf_i386_be.sh,
+       * emulparams/elf_i386_ldso.sh, * emulparams/elf_i386.sh,
+       * emulparams/elf_i386_vxworks.sh, * emulparams/i386lynx.sh,
+       * emulparams/i386moss.sh, * emulparams/i386nto.sh,
+       * emulparams/or32elf.sh, * emulparams/scoreelf.sh (NO_RELA_RELOCS): Set.
+
 2008-10-22  Alan Modra  <amodra@bigpond.net.au>
 
        * ldlang.c (lang_output_section_find_by_flags): Handle non-alloc
index 31db4a9be116c2760b06b23e40f82d992d7a26b6..cd334d6232454d1bd056c8872bae7574f129b334 100644 (file)
@@ -4,6 +4,7 @@ EXTRA_EM_FILE=genelf
 OUTPUT_FORMAT="elf32-littlearc"
 LITTLE_OUTPUT_FORMAT="elf32-littlearc"
 BIG_OUTPUT_FORMAT="elf32-bigarc"
+NO_RELA_RELOCS=yes
 TEXT_START_ADDR=0x0
 MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
 ARCH=arc
index 1d374ae44bbc2190a93ab2a5cfa001aff24f4e3d..f709a1bb63e7b1f31f6b02e2b4d8c6746881ae22 100644 (file)
@@ -5,6 +5,7 @@ TEMPLATE_NAME=elf32
 
 # Symbols have underscore prepended.
 OUTPUT_FORMAT="elf32-us-cris"
+NO_REL_RELOCS=yes
 ARCH=cris
 MAXPAGESIZE=32
 ENTRY=__start
index e41024c9a7afb49cbbf0c9af6f3ab0b6989da515..8a1a5b8e5b0d4cc8616b893b3b38d71f351ac8b2 100644 (file)
@@ -2,6 +2,7 @@
 MACHINE=
 SCRIPT_NAME=elf
 OUTPUT_FORMAT="elf32-cris"
+NO_REL_RELOCS=yes
 ARCH=cris
 TEMPLATE_NAME=elf32
 
index 589067f818b9b330e09f92804b7860d83be1ff4f..482e3d1e5c47b1af151ca37b521e29c6596cd7d2 100644 (file)
@@ -5,6 +5,7 @@ EXTRA_EM_FILE=genelf
 OUTPUT_FORMAT="elf32-i860-little"
 BIG_OUTPUT_FORMAT="elf32-i860"
 LITTLE_OUTPUT_FORMAT="elf32-i860-little"
+NO_REL_RELOCS=yes
 TEXT_START_ADDR=0
 PAGE_SIZE=0x1000
 MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
index 1ef729297ab18d4228f56fb2919e3afeed673542..56d91d7265d49021e610385e717a3043baaf9151 100644 (file)
@@ -1,6 +1,7 @@
 SCRIPT_NAME=elf
 TEMPLATE_NAME=elf32
 OUTPUT_FORMAT="elf32-i960"
+NO_RELA_RELOCS=yes
 ARCH=i960
 MACHINE=
 TEXT_START_ADDR=0
index 3db6d8838d1ad71467298ff0cc10d3cdd59a95d2..aef813eea5704ef2cda402656a76e65b0c00f989 100644 (file)
@@ -3,6 +3,7 @@
 
 SCRIPT_NAME=elf
 OUTPUT_FORMAT="elf32-sparc"
+NO_REL_RELOCS=yes
 TEXT_START_ADDR=0x10000
 MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
 COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
index 8248d5dee7bc9dbe31485b9070d3dee968f2f65d..1ed58c341b5e21314e71c317303340b8b9374c1d 100644 (file)
@@ -2,6 +2,7 @@ SCRIPT_NAME=elf
 TEMPLATE_NAME=elf32
 EXTRA_EM_FILE=spuelf
 OUTPUT_FORMAT="elf32-spu"
+NO_REL_RELOCS=yes
 ARCH=spu
 MACHINE=
 ALIGNMENT=16
index 2f8b9624aa5cd1b32c6512405da6de8fb6555236..b34d2b8751e20f6e98e4dfbc08031dbde4b9fbe0 100644 (file)
@@ -1,5 +1,6 @@
 SCRIPT_NAME=elf
 OUTPUT_FORMAT="elf32-am33lin"
+NO_REL_RELOCS=yes
 TEXT_START_ADDR=0x8000000
 MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
 ARCH=mn10300
index d078155909a114ad4bf977201ef136e0d435de65..1764a3256988ed57cd335fc7a7c9f6aed2d426e7 100755 (executable)
@@ -3,6 +3,7 @@ SCRIPT_NAME=elf
 TEMPLATE_NAME=generic
 EXTRA_EM_FILE=genelf
 OUTPUT_FORMAT="elf32-fr30"
+NO_REL_RELOCS=yes
 TEXT_START_ADDR=0x10000
 ARCH=fr30
 MAXPAGESIZE=256
index 17fb7aba9c7bda51c9e9343b0b791e20d478d2f2..0db227fe3a2f05bf317d878188c4f5ddfb8a037d 100644 (file)
@@ -2,6 +2,7 @@ TEMPLATE_NAME=elf32
 MACHINE=
 SCRIPT_NAME=elf
 OUTPUT_FORMAT="elf32-ip2k"
+NO_REL_RELOCS=yes
 # See also `include/elf/ip2k.h'
 DATA_ADDR=0x01000100
 TEXT_START_ADDR=0x02010000
index 31d65dc88389d93350f4ec0da245fcd3dfc2fc1d..60479501bc974d38ba6b9c9a8560630c8beda4cf 100644 (file)
@@ -2,6 +2,7 @@ SCRIPT_NAME=elf
 OUTPUT_FORMAT="elf32-mcore-little"
 BIG_OUTPUT_FORMAT="elf32-mcore-big"
 LITTLE_OUTPUT_FORMAT="elf32-mcore-little"
+NO_REL_RELOCS=yes
 PAGE_SIZE=0x1000
 TARGET_PAGE_SIZE=0x400
 MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
index 53e88ddf86ad878f88caaaaca556f40db50570b6..bbe9a3e8b3a7f31dfae5b2a203d0abedfa08ecd6 100755 (executable)
@@ -1,6 +1,7 @@
 MACHINE=
 SCRIPT_NAME=elf
 OUTPUT_FORMAT="elf32-openrisc"
+NO_RELA_RELOCS=yes
 TEXT_START_ADDR=0x10000
 ARCH=openrisc
 MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
index 1a12890b06396f6a8750564cf264c6dd7f37cea5..15cb3b123a7ea5e6a2a974b69f7d875bc4803907 100644 (file)
@@ -5,6 +5,7 @@ GENERATE_SHLIB_SCRIPT=yes
 GENERATE_PIE_SCRIPT=yes
 SCRIPT_NAME=elf
 OUTPUT_FORMAT="elf32-powerpc"
+NO_REL_RELOCS=yes
 TEXT_START_ADDR=0x01800000
 MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
 COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
index d217de94007c78ceb4f6144aab00901659b4c2b9..b40d782673ec9e0e8618a1209b9b1e4313e4ab64 100644 (file)
@@ -1,6 +1,7 @@
 TEMPLATE_NAME=elf32
 SCRIPT_NAME=elf
 OUTPUT_FORMAT="elf32-powerpc"
+NO_REL_RELOCS=yes
 ARCH=powerpc
 MACHINE=
 EMBEDDED=yes
index 4c6ef3971735000dea828e2ff9679722782a3aa3..9ddc754c663715766b15ae895b79b72eef9d5c4b 100644 (file)
@@ -1,5 +1,6 @@
 SCRIPT_NAME=elf
 OUTPUT_FORMAT="elf32-vax"
+NO_REL_RELOCS=yes
 TEXT_START_ADDR=0x10000
 case ${LD_FLAG} in
     n|N)       TEXT_START_ADDR=0x1000 ;;
index ede836ccf2c9fda2233f3a1824dca8ff7e412359..ae8f26e411e03968e0208efc57991ac96483c61d 100644 (file)
@@ -1,6 +1,7 @@
 SCRIPT_NAME=elf
 ELFSIZE=64
 OUTPUT_FORMAT="elf64-s390"
+NO_REL_RELOCS=yes
 TEXT_START_ADDR=0x80000000
 MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
 COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
index 03cab9efd324a15e5887b78f38d4086e4967b5bc..9397b87dbc68ad1a3e7b60617e036a395f9af5bd 100644 (file)
@@ -2,6 +2,7 @@ SCRIPT_NAME=elf
 ELFSIZE=64
 TEMPLATE_NAME=elf32
 OUTPUT_FORMAT="elf64-sparc"
+NO_REL_RELOCS=yes
 MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
 COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
 ARCH="sparc:v9"
index a42e75d0358c28322948720cae11be1204bd2f27..82f505de69b225ecc6300b10faa36dd07aca87f3 100644 (file)
@@ -4,6 +4,7 @@ ELFSIZE=64
 TEMPLATE_NAME=elf32
 EXTRA_EM_FILE=alphaelf
 OUTPUT_FORMAT="elf64-alpha"
+NO_REL_RELOCS=yes
 TEXT_START_ADDR="0x120000000"
 MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
 COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
index 7f867fb8cff4f7df927e36abba542bbd7376c78e..787b50d6545b7416df3e1beb5891230e0708fd6c 100644 (file)
@@ -3,6 +3,7 @@ GENERATE_SHLIB_SCRIPT=yes
 ELFSIZE=64
 SCRIPT_NAME=elf
 OUTPUT_FORMAT="elf64-mmix"
+NO_REL_RELOCS=yes
 ENTRY=_start.
 
 # Default to 0 as mmixal does.
index 8b0c587607a5d5766b3066ff14446c6645735f35..b9631b654ec66e498f2f46c3a6774695b0e17d29 100644 (file)
@@ -5,6 +5,7 @@ GENERATE_SHLIB_SCRIPT=yes
 GENERATE_PIE_SCRIPT=yes
 SCRIPT_NAME=elf
 OUTPUT_FORMAT="elf64-powerpc"
+NO_REL_RELOCS=yes
 TEXT_START_ADDR=0x10000000
 #SEGMENT_SIZE=0x10000000
 MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
index 908515a7adbf2cdd58192bac5204f989fce23b2f..05d31a81933bc80653f2ef3de4792fdde461b4d9 100644 (file)
@@ -1,5 +1,6 @@
 SCRIPT_NAME=elf
 OUTPUT_FORMAT="elf32-i386"
+NO_RELA_RELOCS=yes
 TEXT_START_ADDR=0x08048000
 MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
 COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
index b61738c4a0c9faac63c08f2c04c2478d12b7a7fd..efe1a86bfac77f60f5b4b5643b3d33f9a68b703b 100644 (file)
@@ -1,5 +1,6 @@
 SCRIPT_NAME=elf
 OUTPUT_FORMAT="elf32-i386"
+NO_RELA_RELOCS=yes
 TEXT_START_ADDR=0x80000000
 MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
 ARCH=i386
index b4ac9603a4fc80b79bc6efc461fcc522ef11127c..4b0d3fb6930940278b1fd8574f4443c445c8883c 100644 (file)
@@ -1,5 +1,6 @@
 SCRIPT_NAME=elf
 OUTPUT_FORMAT="elf32-i386"
+NO_RELA_RELOCS=yes
 TEXT_START_ADDR=0x08048000
 MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
 ARCH=i386
index 90a98b3dcf34a96b5d3db7a8f7740b87d20ef682..693312845e9f57e4d98e6a4fd1de70d5c34c5c84 100644 (file)
@@ -1,5 +1,6 @@
 SCRIPT_NAME=elf
 OUTPUT_FORMAT="elf32-i386-vxworks"
+NO_RELA_RELOCS=yes
 TEXT_START_ADDR=0x08048000
 MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
 COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
index e252e8e09f63a24fa90980b5582eb204a2694f7c..218558bd54e562dbe7d6523c427312418a6a4cac 100644 (file)
@@ -1,5 +1,6 @@
 SCRIPT_NAME=elf
 OUTPUT_FORMAT="elf32-s390"
+NO_REL_RELOCS=yes
 TEXT_START_ADDR=0x00400000
 MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
 COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
index cdd41195ca77f68d598abbda99482473a3325f81..4b24710f45775728589c5b73da24a006258a4e19 100644 (file)
@@ -1,6 +1,7 @@
 SCRIPT_NAME=elf
 ELFSIZE=64
 OUTPUT_FORMAT="elf64-x86-64"
+NO_REL_RELOCS=yes
 TEXT_START_ADDR=0x400000
 MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
 COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
index fb4db40ddcf9d19152e407a71072ddacaeb8dcf0..38b8a3692f2e1548ea2f3806a34567a00723bd56 100644 (file)
@@ -3,6 +3,7 @@
 
 SCRIPT_NAME=elf
 OUTPUT_FORMAT="elf32-h8300"
+NO_REL_RELOCS=yes
 TEXT_START_ADDR=0x100
 MAXPAGESIZE=2
 TARGET_PAGE_SIZE=128
index 1af8e37d376765d7cb2b28f0f411f4dc906c1ee7..92939bf888870fee07bf037eba2f225f129082a7 100644 (file)
@@ -5,6 +5,7 @@ SCRIPT_NAME=elf
 ELFSIZE=64
 # FIXME: this output format is for hpux.
 OUTPUT_FORMAT="elf64-hppa-linux"
+NO_REL_RELOCS=yes
 TEXT_START_ADDR=0x10000
 TARGET_PAGE_SIZE=0x10000
 MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
index 4c4f94334badc04522b94ad2af80fdf6f3011cd9..9fa461515003574083aae0f38ade3e0348a37ed9 100644 (file)
@@ -4,6 +4,7 @@
 SCRIPT_NAME=elf
 ELFSIZE=32
 OUTPUT_FORMAT="elf32-hppa-linux"
+NO_REL_RELOCS=yes
 TEXT_START_ADDR=0x10000
 TARGET_PAGE_SIZE=0x10000
 MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
index 6d9d9fe11d66ff04b8c4548c91d946ed1e16350f..93afb3d7f37b50f629274550b48883825fc7160d 100644 (file)
@@ -1,5 +1,6 @@
 SCRIPT_NAME=elf
 OUTPUT_FORMAT="elf32-i386"
+NO_RELA_RELOCS=yes
 ENTRY=_main
 TEXT_BASE=0x0
 DYN_TEXT_BASE=0x00400000
index 81161b7b5ae0b345d098ee2d884b0f8790d04986..095d85ab92151f9c5a2fa81ad806e0b537c55c4a 100644 (file)
@@ -1,5 +1,6 @@
 SCRIPT_NAME=elf
 OUTPUT_FORMAT="elf32-i386"
+NO_RELA_RELOCS=yes
 TEXT_START_ADDR=0x00002000
 MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
 ARCH=i386
index 078289c384b8dd686609d02beeba194d7ad2200a..626f9c13aa156766289c3db9c84799514138275e 100644 (file)
@@ -1,5 +1,6 @@
 SCRIPT_NAME=elf
 OUTPUT_FORMAT="elf32-i386"
+NO_RELA_RELOCS=yes
 TEXT_START_ADDR=0x08048000
 TEXT_START_SYMBOLS='_btext = .;'
 MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
index f8dab2b13fcc0a10821323c95e7680c0f738b3cc..66da64896b12750d49282be2392e7b226512ad14 100644 (file)
@@ -1,5 +1,6 @@
 SCRIPT_NAME=elf
 OUTPUT_FORMAT="elf32-m68k"
+NO_REL_RELOCS=yes
 TEXT_START_ADDR=0x80000000
 MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
 COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
index 74f48d0c4867ca9c51e213d5bfce67383573b3a5..9cec0b537febd0991d96e84ef6ab50f03d17e85c 100644 (file)
@@ -5,6 +5,7 @@ SCRIPT_NAME=elf
 TEMPLATE_NAME=generic
 EXTRA_EM_FILE=genelf
 OUTPUT_FORMAT="elf32-mn10200"
+NO_REL_RELOCS=yes
 TEXT_START_ADDR=0x0
 ARCH=mn10200
 MACHINE=
index 5cb3208ccce79b58d23ee3ca201974ae4330bb49..5d85b047c1962757f5385e3682abc673be51bb05 100644 (file)
@@ -2,6 +2,7 @@ SCRIPT_NAME=elf
 TEMPLATE_NAME=generic
 EXTRA_EM_FILE=genelf
 OUTPUT_FORMAT="elf32-or32"
+NO_RELA_RELOCS=yes
 TEXT_START_ADDR=0x1000000
 TARGET_PAGE_SIZE=0x1000000
 MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
index e4d2fa59f077273163e169bd3f336ef1deb047be..37f00340e4ad3cc2b4267e5929c9a047c0b01282 100644 (file)
@@ -2,6 +2,7 @@ SCRIPT_NAME=elf
 TEMPLATE_NAME=generic
 EXTRA_EM_FILE=genelf
 OUTPUT_FORMAT="elf32-pj"
+NO_REL_RELOCS=yes
 TEXT_START_ADDR=0x1000000
 MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
 ARCH=pj
index 42039082a2c1cb397cec48dcc4034f03dce42f86..76aefd6eb26def34531fc65c6ddd34d8324330ea 100644 (file)
@@ -1,5 +1,6 @@
 SCRIPT_NAME=elf
 OUTPUT_FORMAT="elf32-powerpc"
+NO_REL_RELOCS=yes
 TEXT_BASE=0x00002000
 DYN_TEXT_BASE=0x00400000
 TEXT_START_ADDR="(DEFINED(_DYNAMIC) ? ${DYN_TEXT_BASE} : ${TEXT_BASE})"
index 0ca5e56a1f8d41995440344a428e9602cde2531d..dfb5aca83f22185c9934b938b8f86774812ab5bd 100644 (file)
@@ -4,6 +4,7 @@ TEMPLATE_NAME=elf32
 OUTPUT_FORMAT="elf32-bigscore"
 BIG_OUTPUT_FORMAT="elf32-bigscore"
 LITTLE_OUTPUT_FORMAT="elf32-littlescore"
+NO_RELA_RELOCS=yes
 GROUP="-lm -lc -lglsim -lgcc -lstdc++"
 
 TEXT_START_ADDR=0x00000000
index 6f66bf5efa4df5cf5b8b6070fbb6761956a67f53..5757b81da313f4983a48e3a54b32874c361bc681 100644 (file)
@@ -3,6 +3,7 @@
 
 SCRIPT_NAME=elf
 OUTPUT_FORMAT="elf32-sh"
+NO_REL_RELOCS=yes
 TEXT_START_ADDR=0x1000
 MAXPAGESIZE=128
 ARCH=sh
index c72fadb8fa1a295380e6d18d5a48edf87e279ab3..966bd3093cd732fada7a8722a637a76feaf0fd84 100644 (file)
@@ -2,6 +2,7 @@
 # sh[l]elf(32|64).sh parameter scripts.
 SCRIPT_NAME=elf
 OUTPUT_FORMAT=${OUTPUT_FORMAT-"elf32-sh64"}
+NO_REL_RELOCS=yes
 TEXT_START_ADDR=0x1000
 MAXPAGESIZE=128
 ARCH=sh
index 70a0610ad7eb705b07b5b1e2b87b7c6e95e62457..c4d71aa99932fd85201768c6e701955a23aebb51 100644 (file)
@@ -1,5 +1,6 @@
 SCRIPT_NAME=elf
 OUTPUT_FORMAT="elf32-sh"
+NO_REL_RELOCS=yes
 TEXT_START_ADDR=0x08040000
 MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
 ARCH=sh
index a87d5294762892af77d617d99fa4532abaf2efaf..77619cb2ac6ac960505e744b9c98c70b387e7231 100644 (file)
@@ -2,6 +2,7 @@
 # shlelf_vxworks.sh
 
 SCRIPT_NAME=elf
+NO_REL_RELOCS=yes
 BIG_OUTPUT_FORMAT="elf32-sh-vxworks"
 LITTLE_OUTPUT_FORMAT="elf32-shl-vxworks"
 OUTPUT_FORMAT="$BIG_OUTPUT_FORMAT"
index ba32e79e9e55a54dbc8a41e712f94789dc04d7ee..81aea39c81f1f802cab2d143221329ba5d2a1e17 100644 (file)
@@ -3,6 +3,7 @@
 
 SCRIPT_NAME=elf
 OUTPUT_FORMAT="elf32-sh64-linux"
+NO_REL_RELOCS=yes
 TEXT_START_ADDR=0x400000
 MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
 COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
index f91bb52526c7d552eae462289cf09d323a5ea062..95b6acc5d07f2396ecc7d8e70bb30a4b23616852 100644 (file)
@@ -3,6 +3,7 @@
 
 SCRIPT_NAME=elf
 OUTPUT_FORMAT="elf32-sh-linux"
+NO_REL_RELOCS=yes
 TEXT_START_ADDR=0x400000
 MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
 COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
index c6c04f6b29b57a1e1759e1ac33c13f11c193a063..16f65087eb08612d803ddcc4810a8db01252ebd1 100644 (file)
@@ -1,5 +1,6 @@
 SCRIPT_NAME=elf
 OUTPUT_FORMAT="elf32-shl"
+NO_REL_RELOCS=yes
 TEXT_START_ADDR=0x08040000
 MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
 ARCH=sh
index 5c35e4f4aa6f6beaf3dc56eded4f409d8510ab63..120db06490327c76d73c8c4deceb8ef7e7272c60 100644 (file)
@@ -36,6 +36,9 @@
 #      DATA_PLT - .plt should be in data segment, not text segment.
 #      PLT_BEFORE_GOT - .plt just before .got when .plt is in data segement.
 #      BSS_PLT - .plt should be in bss segment
+#      NO_REL_RELOCS - Don't include .rel.* sections in script
+#      NO_RELA_RELOCS - Don't include .rela.* sections in script
+#      NON_ALLOC_DYN - Place dynamic sections after data segment.
 #      TEXT_DYNAMIC - .dynamic in text segment, not data segment.
 #      EMBEDDED - whether this is for an embedded system. 
 #      SHLIB_TEXT_START_ADDR - if set, add to SIZEOF_HEADERS to set
@@ -268,6 +271,11 @@ SECTIONS
   ${CREATE_PIE+${RELOCATING+. = ${SHLIB_TEXT_START_ADDR:-0} + SIZEOF_HEADERS;}}
   ${INITIAL_READONLY_SECTIONS}
   .note.gnu.build-id : { *(.note.gnu.build-id) }
+EOF
+
+test -n "${RELOCATING+0}" || unset NON_ALLOC_DYN
+test -z "${NON_ALLOC_DYN}" || TEXT_DYNAMIC=
+cat > ldscripts/dyntmp.$$ <<EOF
   ${TEXT_DYNAMIC+${DYNAMIC}}
   .hash         ${RELOCATING-0} : { *(.hash) }
   .gnu.hash     ${RELOCATING-0} : { *(.gnu.hash) }
@@ -276,10 +284,10 @@ SECTIONS
   .gnu.version  ${RELOCATING-0} : { *(.gnu.version) }
   .gnu.version_d ${RELOCATING-0}: { *(.gnu.version_d) }
   .gnu.version_r ${RELOCATING-0}: { *(.gnu.version_r) }
-
 EOF
+
 if [ "x$COMBRELOC" = x ]; then
-  COMBRELOCCAT=cat
+  COMBRELOCCAT="cat >> ldscripts/dyntmp.$$"
 else
   COMBRELOCCAT="cat > $COMBRELOC"
 fi
@@ -316,27 +324,45 @@ eval $COMBRELOCCAT <<EOF
   .rela.bss     ${RELOCATING-0} : { *(.rela.bss${RELOCATING+ .rela.bss.* .rela.gnu.linkonce.b.*}) }
   ${REL_LARGE}
 EOF
+
 if [ -n "$COMBRELOC" ]; then
-cat <<EOF
+cat >> ldscripts/dyntmp.$$ <<EOF
   .rel.dyn      ${RELOCATING-0} :
     {
 EOF
-sed -e '/^[    ]*[{}][         ]*$/d;/:[       ]*$/d;/\.rela\./d;s/^.*: { *\(.*\)}$/      \1/' $COMBRELOC
-cat <<EOF
+sed -e '/^[    ]*[{}][         ]*$/d;/:[       ]*$/d;/\.rela\./d;s/^.*: { *\(.*\)}$/      \1/' $COMBRELOC >> ldscripts/dyntmp.$$
+cat >> ldscripts/dyntmp.$$ <<EOF
     }
   .rela.dyn     ${RELOCATING-0} :
     {
 EOF
-sed -e '/^[    ]*[{}][         ]*$/d;/:[       ]*$/d;/\.rel\./d;s/^.*: { *\(.*\)}/      \1/' $COMBRELOC
-cat <<EOF
+sed -e '/^[    ]*[{}][         ]*$/d;/:[       ]*$/d;/\.rel\./d;s/^.*: { *\(.*\)}/      \1/' $COMBRELOC >> ldscripts/dyntmp.$$
+cat >> ldscripts/dyntmp.$$ <<EOF
     }
 EOF
 fi
-cat <<EOF
+
+cat >> ldscripts/dyntmp.$$ <<EOF
   .rel.plt      ${RELOCATING-0} : { *(.rel.plt) }
   .rela.plt     ${RELOCATING-0} : { *(.rela.plt) }
   ${OTHER_PLT_RELOC_SECTIONS}
+EOF
 
+if test -z "${NON_ALLOC_DYN}"; then
+  if test -z "${NO_REL_RELOCS}${NO_RELA_RELOCS}"; then
+    cat ldscripts/dyntmp.$$
+  else
+    if test -z "${NO_REL_RELOCS}"; then
+      sed -e '/^[      ]*\.rela\.[^}]*$/,/}/d' -e '/^[         ]*\.rela\./d' ldscripts/dyntmp.$$
+    fi
+    if test -z "${NO_RELA_RELOCS}"; then
+      sed -e '/^[      ]*\.rel\.[^}]*$/,/}/d' -e '/^[  ]*\.rel\./d' ldscripts/dyntmp.$$
+    fi
+  fi
+  rm -f ldscripts/dyntmp.$$
+fi
+
+cat <<EOF
   .init         ${RELOCATING-0} : 
   { 
     ${RELOCATING+${INIT_START}}
@@ -464,7 +490,23 @@ cat <<EOF
   ${RELOCATING+${OTHER_END_SYMBOLS}}
   ${RELOCATING+${END_SYMBOLS-${USER_LABEL_PREFIX}_end = .; PROVIDE (${USER_LABEL_PREFIX}end = .);}}
   ${RELOCATING+${DATA_SEGMENT_END}}
+EOF
 
+if test -n "${NON_ALLOC_DYN}"; then
+  if test -z "${NO_REL_RELOCS}${NO_RELA_RELOCS}"; then
+    cat ldscripts/dyntmp.$$
+  else
+    if test -z "${NO_REL_RELOCS}"; then
+      sed -e '/^[      ]*\.rela\.[^}]*$/,/}/d' -e '/^[         ]*\.rela\./d' ldscripts/dyntmp.$$
+    fi
+    if test -z "${NO_RELA_RELOCS}"; then
+      sed -e '/^[      ]*\.rel\.[^}]*$/,/}/d' -e '/^[  ]*\.rel\./d' ldscripts/dyntmp.$$
+    fi
+  fi
+  rm -f ldscripts/dyntmp.$$
+fi
+
+cat <<EOF
   /* Stabs debugging sections.  */
   .stab          0 : { *(.stab) }
   .stabstr       0 : { *(.stabstr) }