aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2017-06-19 20:30:20 -0700
committerH.J. Lu <hjl.tools@gmail.com>2017-06-19 20:30:20 -0700
commitabfa390dac6ffcfc6de9659c0b78cfe524347450 (patch)
treef2e10a623ae60cd7b8c6c3ac258ce37a7a7e449e /ld
parenta6cab9afd2c81465265c8d09569e3e6ef43d2954 (diff)
downloadgdb-abfa390dac6ffcfc6de9659c0b78cfe524347450.zip
gdb-abfa390dac6ffcfc6de9659c0b78cfe524347450.tar.gz
gdb-abfa390dac6ffcfc6de9659c0b78cfe524347450.tar.bz2
Check the DYNAMIC bit for input shared objects
Since the BFD section count may not be cleared for shared objects during linking, we should check the DYNAMIC bit for input shared objects. bfd/ PR ld/21626 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Check the DYNAMIC bit instead of bfd_count_sections. ld/ PR ld/21626 * testsuite/ld-i386/i386.exp: Run ld/21626 tests. * testsuite/ld-x86-64/x86-64.exp: Likewise.
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog6
-rw-r--r--ld/testsuite/ld-i386/i386.exp18
-rw-r--r--ld/testsuite/ld-x86-64/x86-64.exp18
3 files changed, 42 insertions, 0 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index b16551f..417c464 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,9 @@
+2017-06-19 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/21626
+ * testsuite/ld-i386/i386.exp: Run ld/21626 tests.
+ * testsuite/ld-x86-64/x86-64.exp: Likewise.
+
2017-06-18 Alan Modra <amodra@gmail.com>
* testsuite/lib/ld-lib.exp (is_underscore_target): New.
diff --git a/ld/testsuite/ld-i386/i386.exp b/ld/testsuite/ld-i386/i386.exp
index a92bd91..2e3c224 100644
--- a/ld/testsuite/ld-i386/i386.exp
+++ b/ld/testsuite/ld-i386/i386.exp
@@ -1182,6 +1182,24 @@ run_ld_link_tests [list \
{{objdump -dwr plt-pic2.dd}} \
"plt-pic2.so" \
] \
+ [list \
+ "Build pr21626.so" \
+ "-shared -melf_i386" \
+ "" \
+ "--32" \
+ {property-x86-3.s} \
+ "" \
+ "pr21626.so" \
+ ] \
+ [list \
+ "Build pr21626" \
+ "-melf_i386 tmpdir/pr21626.so" \
+ "" \
+ "--32" \
+ {start.s foo.s} \
+ "" \
+ "pr21626" \
+ ] \
]
# Linux only tests
diff --git a/ld/testsuite/ld-x86-64/x86-64.exp b/ld/testsuite/ld-x86-64/x86-64.exp
index 079c161..48d8ad2 100644
--- a/ld/testsuite/ld-x86-64/x86-64.exp
+++ b/ld/testsuite/ld-x86-64/x86-64.exp
@@ -1368,6 +1368,24 @@ run_ld_link_tests [list \
{{readelf -SW plt2.rd} {objdump -dwr plt2.dd}} \
"plt2" \
] \
+ [list \
+ "Build pr21626.so" \
+ "-shared -melf_x86_64" \
+ "" \
+ "--64 -defsym __64_bit__=1" \
+ {property-x86-3.s} \
+ "" \
+ "pr21626.so" \
+ ] \
+ [list \
+ "Build pr21626" \
+ "-melf_x86_64 tmpdir/pr21626.so" \
+ "" \
+ "--64" \
+ {start.s foo.s} \
+ "" \
+ "pr21626" \
+ ] \
]
# Linux only tests