ld/
authorRichard Sandiford <rdsandiford@googlemail.com>
Mon, 16 Oct 2006 21:34:25 +0000 (21:34 +0000)
committerRichard Sandiford <rdsandiford@googlemail.com>
Mon, 16 Oct 2006 21:34:25 +0000 (21:34 +0000)
* Makefile.am (eelf64bmip.c): Depend on emulparams/elf64bmip-defs.sh.
(eelf64btsmip.c, eelf64ltsmip.c): Likewise.
* Makefile.in: Regenerate.
* emulparams/elf32bmipn32-defs.sh (INITIAL_READONLY_SECTIONS): Include
.reginfo rather than .MIPS.options.
* emulparams/elf64bmip-defs.sh: New file.
* emulparams/elf64bmip.sh: Include it.
(COMMONPAGESIZE): Delete.
* emulparams/elf64btsmip.sh: As for elf64bmip.sh.

ld/testsuite/
* ld-mips-elf/branch-misc-1.d: Set the start address to 0x20000000.
* ld-mips-elf/jalbal.d: Likewise 0x200000a0.
* ld-mips-elf/jaloverflow-2.d: Likewise 0x20000000.
* ld-mips-elf/reloc-3-n32.d: Likewise.
* ld-mips-elf/reloc-3.d: Likewise.
* ld-mips-elf/textrel-1.d: Don't require a specific file offset for
.dynamic.

14 files changed:
ld/ChangeLog
ld/Makefile.am
ld/Makefile.in
ld/emulparams/elf32bmipn32-defs.sh
ld/emulparams/elf64bmip-defs.sh [new file with mode: 0644]
ld/emulparams/elf64bmip.sh
ld/emulparams/elf64btsmip.sh
ld/testsuite/ChangeLog
ld/testsuite/ld-mips-elf/branch-misc-1.d
ld/testsuite/ld-mips-elf/jalbal.d
ld/testsuite/ld-mips-elf/jaloverflow-2.d
ld/testsuite/ld-mips-elf/reloc-3-n32.d
ld/testsuite/ld-mips-elf/reloc-3.d
ld/testsuite/ld-mips-elf/textrel-1.d

index 77d813c3cd0394624a39e9cf10e5cb20894f6582..258e92ffb2c1a6d58f614a73a5cf05056aeeceaa 100644 (file)
@@ -1,3 +1,15 @@
+2006-10-16  Richard Sandiford  <richard@codesourcery.com>
+
+       * Makefile.am (eelf64bmip.c): Depend on emulparams/elf64bmip-defs.sh.
+       (eelf64btsmip.c, eelf64ltsmip.c): Likewise.
+       * Makefile.in: Regenerate.
+       * emulparams/elf32bmipn32-defs.sh (INITIAL_READONLY_SECTIONS): Include
+       .reginfo rather than .MIPS.options.
+       * emulparams/elf64bmip-defs.sh: New file.
+       * emulparams/elf64bmip.sh: Include it.
+       (COMMONPAGESIZE): Delete.
+       * emulparams/elf64btsmip.sh: As for elf64bmip.sh.
+
 2006-10-12  Bob Wilson  <bob.wilson@acm.org>
 
        * emultempl/xtensaelf.em (is_inconsistent_linkonce_section): Check
index ee96f29eb8745eec040525a8ddd94b7db46a528d..b07a41c1d05faea76ff04aa19183b643ef09d5de 100644 (file)
@@ -912,6 +912,7 @@ eelf64_sparc_fbsd.c: $(srcdir)/emulparams/elf64_sparc_fbsd.sh \
   $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
        ${GENSCRIPTS} elf64_sparc_fbsd "$(tdir_elf64_sparc_fbsd)"
 eelf64bmip.c: $(srcdir)/emulparams/elf64bmip.sh \
+  $(srcdir)/emulparams/elf64bmip-defs.sh \
   $(srcdir)/emulparams/elf32bmipn32-defs.sh $(ELF_DEPS) \
   $(srcdir)/emultempl/irix.em $(srcdir)/emultempl/mipself.em \
   $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
@@ -926,11 +927,12 @@ emmo.c: $(srcdir)/emulparams/mmo.sh $(srcdir)/emultempl/mmix-elfnmmo.em \
   $(srcdir)/scripttempl/mmo.sc ${GEN_DEPENDS}
        ${GENSCRIPTS} mmo "$(tdir_mmo)"
 eelf64btsmip.c: $(srcdir)/emulparams/elf64btsmip.sh \
+  $(srcdir)/emulparams/elf64bmip-defs.sh \
   $(srcdir)/emulparams/elf32bmipn32-defs.sh $(ELF_DEPS) \
   $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
        ${GENSCRIPTS} elf64btsmip "$(tdir_elf64btsmip)"
 eelf64ltsmip.c: $(srcdir)/emulparams/elf64ltsmip.sh \
-  $(srcdir)/emulparams/elf64btsmip.sh \
+  $(srcdir)/emulparams/elf64btsmip.sh $(srcdir)/emulparams/elf64bmip-defs.sh \
   $(srcdir)/emulparams/elf32bmipn32-defs.sh $(ELF_DEPS) \
   $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
        ${GENSCRIPTS} elf64ltsmip "$(tdir_elf64ltsmip)"
index 49337c2e2c717bcf698907335930b4b24a51ebc3..daed6f8a3b70182988060ff6e034bbf8db3474ea 100644 (file)
@@ -1723,6 +1723,7 @@ eelf64_sparc_fbsd.c: $(srcdir)/emulparams/elf64_sparc_fbsd.sh \
   $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
        ${GENSCRIPTS} elf64_sparc_fbsd "$(tdir_elf64_sparc_fbsd)"
 eelf64bmip.c: $(srcdir)/emulparams/elf64bmip.sh \
+  $(srcdir)/emulparams/elf64bmip-defs.sh \
   $(srcdir)/emulparams/elf32bmipn32-defs.sh $(ELF_DEPS) \
   $(srcdir)/emultempl/irix.em $(srcdir)/emultempl/mipself.em \
   $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
@@ -1737,11 +1738,12 @@ emmo.c: $(srcdir)/emulparams/mmo.sh $(srcdir)/emultempl/mmix-elfnmmo.em \
   $(srcdir)/scripttempl/mmo.sc ${GEN_DEPENDS}
        ${GENSCRIPTS} mmo "$(tdir_mmo)"
 eelf64btsmip.c: $(srcdir)/emulparams/elf64btsmip.sh \
+  $(srcdir)/emulparams/elf64bmip-defs.sh \
   $(srcdir)/emulparams/elf32bmipn32-defs.sh $(ELF_DEPS) \
   $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
        ${GENSCRIPTS} elf64btsmip "$(tdir_elf64btsmip)"
 eelf64ltsmip.c: $(srcdir)/emulparams/elf64ltsmip.sh \
-  $(srcdir)/emulparams/elf64btsmip.sh \
+  $(srcdir)/emulparams/elf64btsmip.sh $(srcdir)/emulparams/elf64bmip-defs.sh \
   $(srcdir)/emulparams/elf32bmipn32-defs.sh $(ELF_DEPS) \
   $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
        ${GENSCRIPTS} elf64ltsmip "$(tdir_elf64ltsmip)"
index 4c9834057be0c9896aae67f7384a483bbb2b1209..024aebead5969ef463b527e5ddfc0a4e2d642512 100644 (file)
@@ -57,7 +57,7 @@ TEXT_START_SYMBOLS='_ftext = . ;'
 DATA_START_SYMBOLS='_fdata = . ;'
 OTHER_BSS_SYMBOLS='_fbss = .;'
 
-INITIAL_READONLY_SECTIONS=".MIPS.options : { *(.MIPS.options) }"
+INITIAL_READONLY_SECTIONS=".reginfo      ${RELOCATING-0} : { *(.reginfo) }"
 # Discard any .MIPS.content* or .MIPS.events* sections.  The linker
 # doesn't know how to adjust them.
 OTHER_SECTIONS="/DISCARD/ : { *(.MIPS.content*) *(.MIPS.events*) }"
diff --git a/ld/emulparams/elf64bmip-defs.sh b/ld/emulparams/elf64bmip-defs.sh
new file mode 100644 (file)
index 0000000..110f892
--- /dev/null
@@ -0,0 +1,3 @@
+. ${srcdir}/emulparams/elf32bmipn32-defs.sh
+COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
+INITIAL_READONLY_SECTIONS=".MIPS.options : { *(.MIPS.options) }"
index 3910beadc911318b00502fa08c2aa7355e9422a2..0df65285f5d1b8785cc9717c9a20062d01dc4f80 100755 (executable)
@@ -1,9 +1,8 @@
-. ${srcdir}/emulparams/elf32bmipn32-defs.sh
+. ${srcdir}/emulparams/elf64bmip-defs.sh
 OUTPUT_FORMAT="elf64-bigmips"
 BIG_OUTPUT_FORMAT="elf64-bigmips"
 LITTLE_OUTPUT_FORMAT="elf64-littlemips"
 SHLIB_TEXT_START_ADDR=0x3ffffe0000
-COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
 
 # IRIX6 defines these symbols.  0x40 is the size of the ELF header.
 EXECUTABLE_SYMBOLS="
index f6e8dcf160919409553c7e0d2482e2bf92d6f814..b9e80bb17b3f6833a24e720f40a5baacd4c5053d 100644 (file)
@@ -1,11 +1,10 @@
 # If you change this file, please also look at files which source this one:
 # elf64ltsmip.sh
 
-. ${srcdir}/emulparams/elf32bmipn32-defs.sh
+. ${srcdir}/emulparams/elf64bmip-defs.sh
 OUTPUT_FORMAT="elf64-tradbigmips"
 BIG_OUTPUT_FORMAT="elf64-tradbigmips"
 LITTLE_OUTPUT_FORMAT="elf64-tradlittlemips"
-COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
 
 # Magic sections.
 OTHER_TEXT_SECTIONS='*(.mips16.fn.*) *(.mips16.call.*)'
index 63770f0640486d294731db2b9c5c38420e1084a8..72ac66ef581222151cc78c34865813ef015ab991 100644 (file)
@@ -1,3 +1,13 @@
+2006-10-16  Richard Sandiford  <richard@codesourcery.com>
+
+       * ld-mips-elf/branch-misc-1.d: Set the start address to 0x20000000.
+       * ld-mips-elf/jalbal.d: Likewise 0x200000a0.
+       * ld-mips-elf/jaloverflow-2.d: Likewise 0x20000000.
+       * ld-mips-elf/reloc-3-n32.d: Likewise.
+       * ld-mips-elf/reloc-3.d: Likewise.
+       * ld-mips-elf/textrel-1.d: Don't require a specific file offset for
+       .dynamic.
+
 2006-10-03  Jakub Jelinek  <jakub@redhat.com>
 
        * ld-elf/eh4.d: New test.
index 36bceb7960350d7c459797faf7c8f99ecafb1ae3..0cd370126af2ef9e0d27ba0857c7376f7bfd97b9 100644 (file)
@@ -1,7 +1,7 @@
 #name: MIPS branch-misc-1
 #source: ../../../gas/testsuite/gas/mips/branch-misc-1.s
 #objdump: --prefix-addresses -tdr --show-raw-insn
-#ld: -Ttext 0x500000 -e 0x500000 -N
+#ld: -Ttext 0x20000000 -e 0x20000000 -N
 
 .*:     file format elf.*mips.*
 
@@ -11,18 +11,18 @@ Disassembly of section \.text:
        \.\.\.
        \.\.\.
        \.\.\.
-0+50003c <[^>]*> 0411fff0      bal     0+500000 <[^>]*>
-0+500040 <[^>]*> 00000000      nop
-0+500044 <[^>]*> 0411fff3      bal     0+500014 <[^>]*>
-0+500048 <[^>]*> 00000000      nop
-0+50004c <[^>]*> 0411fff6      bal     0+500028 <[^>]*>
-0+500050 <[^>]*> 00000000      nop
-0+500054 <[^>]*> 0411000a      bal     0+500080 <[^>]*>
-0+500058 <[^>]*> 00000000      nop
-0+50005c <[^>]*> 0411000d      bal     0+500094 <[^>]*>
-0+500060 <[^>]*> 00000000      nop
-0+500064 <[^>]*> 04110010      bal     0+5000a8 <[^>]*>
-0+500068 <[^>]*> 00000000      nop
+0*2000003c <[^>]*> 0411fff0    bal     0*20000000 <[^>]*>
+0*20000040 <[^>]*> 00000000    nop
+0*20000044 <[^>]*> 0411fff3    bal     0*20000014 <[^>]*>
+0*20000048 <[^>]*> 00000000    nop
+0*2000004c <[^>]*> 0411fff6    bal     0*20000028 <[^>]*>
+0*20000050 <[^>]*> 00000000    nop
+0*20000054 <[^>]*> 0411000a    bal     0*20000080 <[^>]*>
+0*20000058 <[^>]*> 00000000    nop
+0*2000005c <[^>]*> 0411000d    bal     0*20000094 <[^>]*>
+0*20000060 <[^>]*> 00000000    nop
+0*20000064 <[^>]*> 04110010    bal     0*200000a8 <[^>]*>
+0*20000068 <[^>]*> 00000000    nop
        \.\.\.
        \.\.\.
        \.\.\.
index bc9a5129ffe04a83db7a03a0c4d9f29235b68e56..49cda75c76bb349841550b6e931e6e838dd5b87c 100644 (file)
@@ -1,7 +1,7 @@
 #name: jal to bal
 #source: jalbal.s
 #as: -EB -n32 -march=rm9000
-#ld: -EB -e s1 -Ttext 0x100000a0
+#ld: -EB -e s1 -Ttext 0x200000a0
 #objdump: -d
 
 .*file format elf.*mips.*
@@ -9,16 +9,16 @@
 Disassembly of section \.text:
 
 .* <s1>:
-.*     0c00802a        jal     .*100200a8 <s3>
+.*     0c00802a        jal     .*200200a8 <s3>
 .*     00000000        nop
-.*     04117fff        bal     .*100200a8 <s3>
+.*     04117fff        bal     .*200200a8 <s3>
 
 .* <s2>:
 .*     \.\.\.
 
 .* <s3>:
-.*     04118000        bal     .*100000ac <s2>
+.*     04118000        bal     .*200000ac <s2>
 .*     00000000        nop
-.*     0c00002b        jal     .*100000ac <s2>
+.*     0c00002b        jal     .*200000ac <s2>
 .*     00000000        nop
 .*     \.\.\.
index b28b4edb2f444099f6e171cec0378a3fdd540aa9..b40f4281777c533e91a378976a066f269e7e2215 100644 (file)
@@ -1,8 +1,8 @@
 #name: JAL overflow 2
 #source: jaloverflow-2.s
 #as:
-#ld: -Ttext=0x10000000 -e start
+#ld: -Ttext=0x20000000 -e start
 #objdump: -dr
 #...
-0*10000000:    0c000000.*
+0*20000000:    0c000000.*
 #pass
index 61cb2760283206da884e7a28513c5ba9e6046eb8..e90180bbd5cdf04a6f84e61628f28fb9bd5a9140 100644 (file)
@@ -2,7 +2,7 @@
 #source: ../../../gas/testsuite/gas/mips/elf-rel6.s
 #as: -march=mips64 -mabi=n32 -EB
 #objdump: --prefix-addresses -tdr --show-raw-insn
-#ld: -Ttext 0x500000 -e 0x500000 -N -melf32btsmipn32
+#ld: -Ttext 0x20000000 -e 0x20000000 -N -melf32btsmipn32
 
 
 .*:     file format elf.*mips.*
@@ -10,9 +10,9 @@
 #...
 
 Disassembly of section \.text:
-0+500000 <[^>]*> f010 8352     lb      v0,-32750\(v1\)
-0+500004 <[^>]*> f010 8353     lb      v0,-32749\(v1\)
-0+500008 <[^>]*> f252 8346     lb      v0,-28090\(v1\)
-0+50000c <[^>]*> 6500          nop
-0+50000e <[^>]*> 6500          nop
+0*20000000 <[^>]*> f010 8352   lb      v0,-32750\(v1\)
+0*20000004 <[^>]*> f010 8353   lb      v0,-32749\(v1\)
+0*20000008 <[^>]*> f252 8346   lb      v0,-28090\(v1\)
+0*2000000c <[^>]*> 6500        nop
+0*2000000e <[^>]*> 6500        nop
 #pass
index 632d999b943c1d9269998492f8cec2426ce81cdc..1ec51c5f8f3217ec32d27fb3b0674f2f90d8d6a2 100644 (file)
@@ -1,16 +1,16 @@
 #name: R_MIPS16_GPREL reloc
 #source: ../../../gas/testsuite/gas/mips/elf-rel6.s
 #objdump: --prefix-addresses -tdr --show-raw-insn
-#ld: -Ttext 0x500000 -e 0x500000 -N
+#ld: -Ttext 0x20000000 -e 0x20000000 -N
 
 .*:     file format elf.*mips.*
 
 #...
 
 Disassembly of section \.text:
-0+500000 <[^>]*> f010 8352     lb      v0,-32750\(v1\)
-0+500004 <[^>]*> f010 8353     lb      v0,-32749\(v1\)
-0+500008 <[^>]*> f252 8346     lb      v0,-28090\(v1\)
-0+50000c <[^>]*> 6500          nop
-0+50000e <[^>]*> 6500          nop
+0*20000000 <[^>]*> f010 8352   lb      v0,-32750\(v1\)
+0*20000004 <[^>]*> f010 8353   lb      v0,-32749\(v1\)
+0*20000008 <[^>]*> f252 8346   lb      v0,-28090\(v1\)
+0*2000000c <[^>]*> 6500        nop
+0*2000000e <[^>]*> 6500        nop
 #pass
index 7172bb7ea40f87f361965feb5bd5afe3c7c5dc13..945c863f2ecf19c0b3202be79d0f2e56f6852bfc 100644 (file)
@@ -4,7 +4,7 @@
 #ld: -shared -melf32btsmipn32
 #readelf: -d
 
-Dynamic section at offset 0xb4 contains 18 entries:
+Dynamic section at offset .* contains 18 entries:
   Tag        Type                         Name/Value
  0x00000004 \(HASH\)                       0x[0-9a-f]*
  0x00000005 \(STRTAB\)                     0x[0-9a-f]*