summaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2005-03-24 01:30:47 +0000
committerEric Christopher <echristo@apple.com>2005-03-24 01:30:47 +0000
commit8388400e7f5b3e6c0316bcc4724360ed0209aa12 (patch)
treeb24a95b39f48e192119f3845f82f1caa58b958ce /ld
parent9929f5bbfe4dc32f99e542ec55da8f07346454d9 (diff)
downloadbinutils-redhat-8388400e7f5b3e6c0316bcc4724360ed0209aa12.tar.gz
bfd/ChangeLog:
2005-03-23 Eric Christopher <echristo@redhat.com> * elfxx-mips.c (MIPS_ELF_READONLY_SECTION): New. (mips_elf_calculate_relocation): Use. Define DF_TEXTREL after emitting relocation. (_bfd_mips_elf_adjust_dynamic_symbol): Ditto. (_bfd_mips_elf_check_relocs): Remove code to set DF_TEXTREL and readonly_reloc. ld/testsuite/ChangeLog: 2005-03-23 Eric Christopher <echristo@redhat.com> * ld-mips-elf/textrel-1.s, ld-mips-elf/textrel-1.d: New test. * ld-mips-elf/mips-elf.exp: Call it. * ld-mips-elf/rel32-n32.d: Update for DF_TEXTREL removal. * ld-mips-elf/rel32-o32.d: Ditto. * ld-mips-elf/rel64.d: Ditto.
Diffstat (limited to 'ld')
-rw-r--r--ld/testsuite/ChangeLog9
-rw-r--r--ld/testsuite/ld-mips-elf/mips-elf.exp4
-rw-r--r--ld/testsuite/ld-mips-elf/rel32-n32.d10
-rw-r--r--ld/testsuite/ld-mips-elf/rel32-o32.d2
-rw-r--r--ld/testsuite/ld-mips-elf/rel64.d10
-rw-r--r--ld/testsuite/ld-mips-elf/textrel-1.d26
-rw-r--r--ld/testsuite/ld-mips-elf/textrel-1.s9
7 files changed, 59 insertions, 11 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index 657c79678a..8e8c09d6e3 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,3 +1,12 @@
+2005-03-23 Eric Christopher <echristo@redhat.com>
+
+ * ld-mips-elf/textrel-1.s, ld-mips-elf/textrel-1.d: New
+ test.
+ * ld-mips-elf/mips-elf.exp: Call it.
+ * ld-mips-elf/rel32-n32.d: Update for DF_TEXTREL removal.
+ * ld-mips-elf/rel32-o32.d: Ditto.
+ * ld-mips-elf/rel64.d: Ditto.
+
2005-03-23 H.J. Lu <hongjiu.lu@intel.com>
* ld-cris/expdyn5.d: Updated for alignment change in elf.sc.
diff --git a/ld/testsuite/ld-mips-elf/mips-elf.exp b/ld/testsuite/ld-mips-elf/mips-elf.exp
index 5413a729f0..b07f709070 100644
--- a/ld/testsuite/ld-mips-elf/mips-elf.exp
+++ b/ld/testsuite/ld-mips-elf/mips-elf.exp
@@ -101,6 +101,10 @@ if {$has_newabi} {
run_dump_test "mips16-hilo-n32"
}
+if { $linux_gnu } {
+ run_dump_test "textrel-1"
+}
+
# For tests which may involve multiple files, use run_ld_link_tests.
# List contains test-items with 3 items followed by 2 lists:
diff --git a/ld/testsuite/ld-mips-elf/rel32-n32.d b/ld/testsuite/ld-mips-elf/rel32-n32.d
index cff8b36276..565742a816 100644
--- a/ld/testsuite/ld-mips-elf/rel32-n32.d
+++ b/ld/testsuite/ld-mips-elf/rel32-n32.d
@@ -4,12 +4,12 @@
#readelf: -x 5 -r
#ld: -shared -melf32btsmipn32
-Relocation section '.rel.dyn' at offset 0x304 contains 2 entries:
+Relocation section '.rel.dyn' at offset 0x2fc contains 2 entries:
Offset Info Type Sym.Value Sym. Name
00000000 00000000 R_MIPS_NONE
-00000330 00000003 R_MIPS_REL32
+00000320 00000003 R_MIPS_REL32
Hex dump of section '.text':
- 0x00000320 00000000 00000000 00000000 00000000 ................
- 0x00000330 00000330 00000000 00000000 00000000 ................
- 0x00000340 00000000 00000000 00000000 00000000 ................
+ 0x00000310 00000000 00000000 00000000 00000000 ................
+ 0x00000320 00000320 00000000 00000000 00000000 ................
+ 0x00000330 00000000 00000000 00000000 00000000 ................
diff --git a/ld/testsuite/ld-mips-elf/rel32-o32.d b/ld/testsuite/ld-mips-elf/rel32-o32.d
index 982758a0c7..d89b87a2d7 100644
--- a/ld/testsuite/ld-mips-elf/rel32-o32.d
+++ b/ld/testsuite/ld-mips-elf/rel32-o32.d
@@ -4,7 +4,7 @@
#readelf: -x 6 -r
#ld: -shared -melf32btsmip
-Relocation section '.rel.dyn' at offset 0x31c contains 2 entries:
+Relocation section '.rel.dyn' at offset 0x314 contains 2 entries:
Offset Info Type Sym.Value Sym. Name
00000000 00000000 R_MIPS_NONE
00000340 00000003 R_MIPS_REL32
diff --git a/ld/testsuite/ld-mips-elf/rel64.d b/ld/testsuite/ld-mips-elf/rel64.d
index ead15f044c..8663f148d7 100644
--- a/ld/testsuite/ld-mips-elf/rel64.d
+++ b/ld/testsuite/ld-mips-elf/rel64.d
@@ -4,16 +4,16 @@
#readelf: -x 6 -r
#ld: -shared -melf64btsmip
-Relocation section '.rel.dyn' at offset 0x498 contains 2 entries:
+Relocation section '.rel.dyn' at offset 0x488 contains 2 entries:
Offset Info Type Sym. Value Sym. Name
000000000000 000000000000 R_MIPS_NONE
Type2: R_MIPS_NONE
Type3: R_MIPS_NONE
-0000000004d0 000000001203 R_MIPS_REL32
+0000000004c0 000000001203 R_MIPS_REL32
Type2: R_MIPS_64
Type3: R_MIPS_NONE
Hex dump of section '.text':
- 0x000004c0 00000000 00000000 00000000 00000000 ................
- 0x000004d0 00000000 000004d0 00000000 00000000 ................
- 0x000004e0 00000000 00000000 00000000 00000000 ................
+ 0x000004b0 00000000 00000000 00000000 00000000 ................
+ 0x000004c0 00000000 000004c0 00000000 00000000 ................
+ 0x000004d0 00000000 00000000 00000000 00000000 ................
diff --git a/ld/testsuite/ld-mips-elf/textrel-1.d b/ld/testsuite/ld-mips-elf/textrel-1.d
new file mode 100644
index 0000000000..29a166da45
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/textrel-1.d
@@ -0,0 +1,26 @@
+#name: MIPS textrel-1
+#source: textrel-1.s
+#as: -EB -n32
+#ld: -shared -melf32btsmipn32
+#readelf: -d
+
+Dynamic section at offset 0xb4 contains 18 entries:
+ Tag Type Name/Value
+ 0x00000004 \(HASH\) 0x16c
+ 0x00000005 \(STRTAB\) 0x30c
+ 0x00000006 \(SYMTAB\) 0x1fc
+ 0x0000000a \(STRSZ\) 84 \(bytes\)
+ 0x0000000b \(SYMENT\) 16 \(bytes\)
+ 0x00000015 \(DEBUG\) 0x0
+ 0x00000003 \(PLTGOT\) 0x1003e0
+ 0x00000011 \(REL\) 0x360
+ 0x00000012 \(RELSZ\) 8 \(bytes\)
+ 0x00000013 \(RELENT\) 8 \(bytes\)
+ 0x70000001 \(MIPS_RLD_VERSION\) 1
+ 0x70000005 \(MIPS_FLAGS\) NOTPOT
+ 0x70000006 \(MIPS_BASE_ADDRESS\) 0
+ 0x7000000a \(MIPS_LOCAL_GOTNO\) 7
+ 0x70000011 \(MIPS_SYMTABNO\) 17
+ 0x70000012 \(MIPS_UNREFEXTNO\) 12
+ 0x70000013 \(MIPS_GOTSYM\) 0x11
+ 0x00000000 \(NULL\) 0x0
diff --git a/ld/testsuite/ld-mips-elf/textrel-1.s b/ld/testsuite/ld-mips-elf/textrel-1.s
new file mode 100644
index 0000000000..f6b4a6a70d
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/textrel-1.s
@@ -0,0 +1,9 @@
+ .globl foo
+foo:
+ .cfi_startproc
+ nop
+ .cfi_def_cfa_offset 4
+ nop
+ .cfi_register $29, $0
+ nop
+ .cfi_endproc