aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-i386
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2010-07-14 00:30:57 +0000
committerH.J. Lu <hjl.tools@gmail.com>2010-07-14 00:30:57 +0000
commita7b16ceb928e405dc096f2af5ca7c7321e5e2e7a (patch)
treea15122e38442d047ba5fcd23f8460176c95f9ee4 /ld/testsuite/ld-i386
parent6ae10a308748553b3e864c8a795c536573000de7 (diff)
downloadgdb-a7b16ceb928e405dc096f2af5ca7c7321e5e2e7a.zip
gdb-a7b16ceb928e405dc096f2af5ca7c7321e5e2e7a.tar.gz
gdb-a7b16ceb928e405dc096f2af5ca7c7321e5e2e7a.tar.bz2
Don't allocate .got.plt section if there are no GOT nor PLT entries.
bfd/ 2010-07-13 H.J. Lu <hongjiu.lu@intel.com> PR ld/11812 * elf32-i386.c (elf_i386_size_dynamic_sections): Don't allocate .got.plt section if there are no GOT nor PLT entries. * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections): Likewise. ld/testsuite/ 2010-07-13 H.J. Lu <hongjiu.lu@intel.com> PR ld/11812 * ld-elf/exclude3b.d: Don't run on ia64-*-*. Replace .got with .dynamic. * ld-elf/exclude3d.d: New. * ld-i386/nogot1.d: Likewise. * ld-i386/nogot1.s: Likewise. * ld-x86-64/nogot1.d: Likewise. * ld-x86-64/nogot1.s: Likewise. * ld-i386/i386.exp: Run nogot1. * ld-x86-64/x86-64.exp: Likewise.
Diffstat (limited to 'ld/testsuite/ld-i386')
-rw-r--r--ld/testsuite/ld-i386/i386.exp1
-rw-r--r--ld/testsuite/ld-i386/nogot1.d8
-rw-r--r--ld/testsuite/ld-i386/nogot1.s10
3 files changed, 19 insertions, 0 deletions
diff --git a/ld/testsuite/ld-i386/i386.exp b/ld/testsuite/ld-i386/i386.exp
index a88a436..3f20533 100644
--- a/ld/testsuite/ld-i386/i386.exp
+++ b/ld/testsuite/ld-i386/i386.exp
@@ -189,3 +189,4 @@ run_dump_test "protected1"
run_dump_test "protected2"
run_dump_test "protected3"
run_dump_test "tlspie1"
+run_dump_test "nogot1"
diff --git a/ld/testsuite/ld-i386/nogot1.d b/ld/testsuite/ld-i386/nogot1.d
new file mode 100644
index 0000000..a6c8832
--- /dev/null
+++ b/ld/testsuite/ld-i386/nogot1.d
@@ -0,0 +1,8 @@
+#ld: --shared -melf_i386
+#readelf: -S --wide
+#as: --32
+
+#...
+[ ]*\[.*\][ ]+\.dynamic[ ]+DYNAMIC.*
+[ ]*\[.*\][ ]+.*STRTAB.*
+#pass
diff --git a/ld/testsuite/ld-i386/nogot1.s b/ld/testsuite/ld-i386/nogot1.s
new file mode 100644
index 0000000..c657231
--- /dev/null
+++ b/ld/testsuite/ld-i386/nogot1.s
@@ -0,0 +1,10 @@
+ .type bar, @function
+bar:
+ ret
+ .size bar, .-bar
+.globl foo
+ .type foo, @function
+foo:
+ leal bar@GOTOFF(%ecx), %eax
+ ret
+ .size foo, .-foo