diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2017-10-20 09:47:08 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2017-10-20 09:47:08 -0700 |
commit | f3012016f008030b48597b578a5fb1e550907374 (patch) | |
tree | a4c943958b95e2b92a3d740391c5cb082cf0b9fd /ld/testsuite/ld-elf/shared.exp | |
parent | d5833c62d93e8176b70e8509ab36cc38801c3ebd (diff) | |
download | gdb-f3012016f008030b48597b578a5fb1e550907374.zip gdb-f3012016f008030b48597b578a5fb1e550907374.tar.gz gdb-f3012016f008030b48597b578a5fb1e550907374.tar.bz2 |
Add a compile-time test for PR ld/22269
This compile-time test requires a target C compiler to run. It fails
on many targets where ELF backend linkers fail to check undefined weak
symbol in static PIE via UNDEFWEAK_NO_DYNAMIC_RELOC.
PR ld/22269
* testsuite/ld-elf/pr22269-1.rd: New file.
* testsuite/ld-elf/pr22269-1.c: Likewise.
* testsuite/ld-elf/shared.exp: Run pr22269-1.
Diffstat (limited to 'ld/testsuite/ld-elf/shared.exp')
-rw-r--r-- | ld/testsuite/ld-elf/shared.exp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/ld/testsuite/ld-elf/shared.exp b/ld/testsuite/ld-elf/shared.exp index 6e091c9..640d324 100644 --- a/ld/testsuite/ld-elf/shared.exp +++ b/ld/testsuite/ld-elf/shared.exp @@ -465,6 +465,19 @@ set build_tests { run_cc_link_tests $build_tests +run_ld_link_tests [list \ + [list \ + "Build pr22269-1" \ + "-pie -e _start --no-dynamic-linker -z text" \ + "" \ + "" \ + { pr22269-1.c } \ + {{readelf -rW pr22269-1.rd}} \ + "pr22269-1" \ + "-fPIE -O2" \ + ] \ +] + set run_tests [list \ [list "Run normal with libfoo.so" \ "-Wl,--no-as-needed tmpdir/begin.o tmpdir/libfoo.so tmpdir/end.o" "" \ |