aboutsummaryrefslogtreecommitdiff
path: root/gold/testsuite/Makefile.am
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2020-11-29 05:55:23 -0800
committerH.J. Lu <hjl.tools@gmail.com>2020-11-29 05:55:35 -0800
commit8ca751ee637ce1b8d1b284a794ffdb327951d0f8 (patch)
treead55a7b80f214c2b63cf2059f5740eb94e9902e1 /gold/testsuite/Makefile.am
parentb214250c1e058b251ec90f024795965ad1f9e91d (diff)
downloadfsf-binutils-gdb-8ca751ee637ce1b8d1b284a794ffdb327951d0f8.zip
fsf-binutils-gdb-8ca751ee637ce1b8d1b284a794ffdb327951d0f8.tar.gz
fsf-binutils-gdb-8ca751ee637ce1b8d1b284a794ffdb327951d0f8.tar.bz2
gold: Get linkonce/comdate sections for debugging sections
When relocating debug sections, get the section index for the linkonce section. Since symbols referenced in debugging sections can be defined a single comdat section with a different section name, also check the single comdat section. PR gold/26937 * object.cc (Sized_relobj_file::map_to_kept_section): Get the section index for linkonce section. Also check the single comdat section. * testsuite/Makefile.am (check_SCRIPTS): Add pr26936.sh. (check_DATA): Add pr26936a.stdout and pr26936b.stdout. (MOSTLYCLEANFILES): Add pr26936a and pr26936b. (pr26936a.stdout): New target. (pr26936a): Likewise. (pr26936b.stdout): Likewise. (pr26936b): Likewise. (pr26936a.o): Likewise. (pr26936b.o): Likewise. (pr26936c.o): Likewise. (pr26936d.o): Likewise. * testsuite/Makefile.in: Regenerated. * testsuite/pr26936.sh: New file. * testsuite/pr26936a.s: Likewise. * testsuite/pr26936b.s: Likewise. * testsuite/pr26936c.s: Likewise. * testsuite/pr26936d.s: Likewise.
Diffstat (limited to 'gold/testsuite/Makefile.am')
-rw-r--r--gold/testsuite/Makefile.am22
1 files changed, 22 insertions, 0 deletions
diff --git a/gold/testsuite/Makefile.am b/gold/testsuite/Makefile.am
index 3bfba9f..ae962a8 100644
--- a/gold/testsuite/Makefile.am
+++ b/gold/testsuite/Makefile.am
@@ -4385,4 +4385,26 @@ dwp_test_2a.dwp: ../dwp dwp_test_main.dwo dwp_test_1.dwo
dwp_test_2b.dwp: ../dwp dwp_test_1b.dwo dwp_test_2.dwo
../dwp -o $@ dwp_test_1b.dwo dwp_test_2.dwo
+check_SCRIPTS += pr26936.sh
+check_DATA += pr26936a.stdout pr26936b.stdout
+MOSTLYCLEANFILES += pr26936a pr26936b
+pr26936a.stdout: pr26936a
+ $(TEST_READELF) -wL -wR -wr $< >$@ 2>/dev/null
+pr26936a: pr26936a.o pr26936b.o pr26936c.o ../ld-new
+ ../ld-new -Ttext-segment 0x10000 -z max-page-size=0x1000 \
+ -e _start -o $@ pr26936a.o pr26936b.o pr26936c.o
+pr26936b.stdout: pr26936b
+ $(TEST_READELF) -wL -wR -wr $< >$@ 2>/dev/null
+pr26936b: pr26936d.o pr26936b.o pr26936c.o ../ld-new
+ ../ld-new -Ttext-segment 0x10000 -z max-page-size=0x1000 \
+ -e _start -o $@ pr26936d.o pr26936b.o pr26936c.o
+pr26936a.o: pr26936a.s
+ $(TEST_AS) --gen-debug -o $@ $<
+pr26936b.o: pr26936b.s
+ $(TEST_AS) --gen-debug -o $@ $<
+pr26936c.o: pr26936c.s
+ $(TEST_AS) --gen-debug -o $@ $<
+pr26936d.o: pr26936d.s
+ $(TEST_AS) --gen-debug -o $@ $<
+
endif DEFAULT_TARGET_X86_64