aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2016-05-19 12:56:55 -0700
committerH.J. Lu <hjl.tools@gmail.com>2016-05-19 12:57:11 -0700
commit7d4d970973c4735dcdd2a69d645309f167a1d9d4 (patch)
treee6a8b48b253a6d764479dee2757ae1c0a1752c67 /ld
parent606851fbf66c4a9e47c958014579dd363a74ba76 (diff)
downloadgdb-7d4d970973c4735dcdd2a69d645309f167a1d9d4.zip
gdb-7d4d970973c4735dcdd2a69d645309f167a1d9d4.tar.gz
gdb-7d4d970973c4735dcdd2a69d645309f167a1d9d4.tar.bz2
Don't convert R_386_GOT32 relocation
Don't convert R_386_GOT32 since we can't tell if it is applied to "mov $foo@GOT, %reg" which isn't a load via GOT. bfd/ PR ld/20117 * elf32-i386.c (elf_i386_convert_load_reloc): Don't check R_386_GOT32X. (elf_i386_convert_load): Don't convert R_386_GOT32. ld/ PR ld/20117 * testsuite/ld-i386/i386.exp: Run pr20117. * testsuite/ld-i386/pr19609-1i.d: Updated. * testsuite/ld-i386/pr20117.d: New file. * testsuite/ld-i386/pr20117.s: Likewise.
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog8
-rw-r--r--ld/testsuite/ld-i386/i386.exp1
-rw-r--r--ld/testsuite/ld-i386/pr19609-1i.d4
-rw-r--r--ld/testsuite/ld-i386/pr20117.d12
-rw-r--r--ld/testsuite/ld-i386/pr20117.s7
5 files changed, 30 insertions, 2 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 0619b8d..638f38b 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,11 @@
+2016-05-19 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/20117
+ * testsuite/ld-i386/i386.exp: Run pr20117.
+ * testsuite/ld-i386/pr19609-1i.d: Updated.
+ * testsuite/ld-i386/pr20117.d: New file.
+ * testsuite/ld-i386/pr20117.s: Likewise.
+
2016-05-19 Cupertino Miranda <cmiranda@synopsys.com>
* testsuite/ld-elf/compressed1d.d: Removed from notarget.
diff --git a/ld/testsuite/ld-i386/i386.exp b/ld/testsuite/ld-i386/i386.exp
index ba53c91..8e66280 100644
--- a/ld/testsuite/ld-i386/i386.exp
+++ b/ld/testsuite/ld-i386/i386.exp
@@ -373,6 +373,7 @@ run_dump_test "pr19609-2c"
run_dump_test "undefweaka"
run_dump_test "undefweakb"
run_dump_test "pr19539"
+run_dump_test "pr20117"
if { !([istarget "i?86-*-linux*"]
|| [istarget "i?86-*-gnu*"]
diff --git a/ld/testsuite/ld-i386/pr19609-1i.d b/ld/testsuite/ld-i386/pr19609-1i.d
index ce15bc9..2a6d0c0 100644
--- a/ld/testsuite/ld-i386/pr19609-1i.d
+++ b/ld/testsuite/ld-i386/pr19609-1i.d
@@ -11,7 +11,7 @@ Disassembly of section .text:
[a-f0-9]+ <_start>:
[ ]*[a-f0-9]+: 3b 82 fc ff ff ff cmp -0x4\(%edx\),%eax
[ ]*[a-f0-9]+: 3b 8a fc ff ff ff cmp -0x4\(%edx\),%ecx
-[ ]*[a-f0-9]+: c7 c0 00 00 00 00 mov \$0x0,%eax
-[ ]*[a-f0-9]+: c7 c1 00 00 00 00 mov \$0x0,%ecx
+[ ]*[a-f0-9]+: 8b 82 fc ff ff ff mov -0x4\(%edx\),%eax
+[ ]*[a-f0-9]+: 8b 8a fc ff ff ff mov -0x4\(%edx\),%ecx
[ ]*[a-f0-9]+: 85 82 fc ff ff ff test %eax,-0x4\(%edx\)
[ ]*[a-f0-9]+: 85 8a fc ff ff ff test %ecx,-0x4\(%edx\)
diff --git a/ld/testsuite/ld-i386/pr20117.d b/ld/testsuite/ld-i386/pr20117.d
new file mode 100644
index 0000000..59c77ee
--- /dev/null
+++ b/ld/testsuite/ld-i386/pr20117.d
@@ -0,0 +1,12 @@
+#as: --32
+#ld: -melf_i386
+#objdump: -dw
+
+.*: +file format .*
+
+
+Disassembly of section .text:
+
+[a-f0-9]+ <_start>:
+[ ]*[a-f0-9]+: eb 8b jmp [a-f0-9]+ <_start\-0x[a-f0-9]+>
+[ ]*[a-f0-9]+: bd ([0-9a-f]{2} ){4} * mov \$0x[a-f0-9]+\,%ebp
diff --git a/ld/testsuite/ld-i386/pr20117.s b/ld/testsuite/ld-i386/pr20117.s
new file mode 100644
index 0000000..de2dd28
--- /dev/null
+++ b/ld/testsuite/ld-i386/pr20117.s
@@ -0,0 +1,7 @@
+ .comm DEBUGLEVEL,4,4
+ .text
+ .globl _start
+ .type _start, @function
+_start:
+ .byte 0xeb, 0x8b
+ movl $DEBUGLEVEL@GOT, %ebp