aboutsummaryrefslogtreecommitdiff
path: root/gold/testsuite/Makefile.am
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2020-11-29 06:00:37 -0800
committerH.J. Lu <hjl.tools@gmail.com>2020-11-29 06:00:50 -0800
commit568cbddc710f6cb6be752f390a1521cd5556ad9b (patch)
tree8953d9b7c53cab14e7bc302a3bf66524dcb3686f /gold/testsuite/Makefile.am
parent8ca751ee637ce1b8d1b284a794ffdb327951d0f8 (diff)
downloadgdb-568cbddc710f6cb6be752f390a1521cd5556ad9b.zip
gdb-568cbddc710f6cb6be752f390a1521cd5556ad9b.tar.gz
gdb-568cbddc710f6cb6be752f390a1521cd5556ad9b.tar.bz2
gold: Convert x86-64 GOTPCRELX only if addend == -4
Convert x86-64 GOTPCRELX relocations only if addend == -4. PR gold/26939 * x86_64.cc (Target_x86_64<size>::Scan::local): Check get_r_addend() == -4 for GOTPCRELX conversion. (Target_x86_64<size>::Scan::global): Likewise. (Target_x86_64<size>::Relocate::relocate): Likewise. * testsuite/Makefile.am (check_DATA): Add x86_64_mov_to_lea15.stdout and x86_64_mov_to_lea16.stdout. (MOSTLYCLEANFILES): Add x86_64_mov_to_lea15 and x86_64_mov_to_lea16. (x86_64_mov_to_lea9.o): New target. (x86_64_mov_to_lea10.o): Likewise. (x86_64_mov_to_lea15): Likewise. (x86_64_mov_to_lea16): Likewise. (x86_64_mov_to_lea15.stdout): Likewise. (x86_64_mov_to_lea16.stdout): Likewise. * testsuite/Makefile.in: Regenerated. * testsuite/x86_64_mov_to_lea.sh: Updated. * testsuite/x86_64_mov_to_lea5.s: New file.
Diffstat (limited to 'gold/testsuite/Makefile.am')
-rw-r--r--gold/testsuite/Makefile.am19
1 files changed, 17 insertions, 2 deletions
diff --git a/gold/testsuite/Makefile.am b/gold/testsuite/Makefile.am
index ae962a8..3ba2a30 100644
--- a/gold/testsuite/Makefile.am
+++ b/gold/testsuite/Makefile.am
@@ -1119,12 +1119,15 @@ check_DATA += x86_64_mov_to_lea1.stdout x86_64_mov_to_lea2.stdout \
x86_64_mov_to_lea7.stdout x86_64_mov_to_lea8.stdout \
x86_64_mov_to_lea9.stdout x86_64_mov_to_lea10.stdout \
x86_64_mov_to_lea11.stdout x86_64_mov_to_lea12.stdout \
- x86_64_mov_to_lea13.stdout x86_64_mov_to_lea14.stdout
+ x86_64_mov_to_lea13.stdout x86_64_mov_to_lea14.stdout \
+ x86_64_mov_to_lea15.stdout x86_64_mov_to_lea16.stdout
+
MOSTLYCLEANFILES += x86_64_mov_to_lea1 x86_64_mov_to_lea2 \
x86_64_mov_to_lea3 x86_64_mov_to_lea4 x86_64_mov_to_lea5 \
x86_64_mov_to_lea6 x86_64_mov_to_lea7 x86_64_mov_to_lea8 \
x86_64_mov_to_lea9 x86_64_mov_to_lea10 x86_64_mov_to_lea11 \
- x86_64_mov_to_lea12 x86_64_mov_to_lea13 x86_64_mov_to_lea14
+ x86_64_mov_to_lea12 x86_64_mov_to_lea13 x86_64_mov_to_lea14 \
+ x86_64_mov_to_lea15 x86_64_mov_to_lea16
x86_64_mov_to_lea1.o: x86_64_mov_to_lea1.s
$(TEST_AS) --64 -o $@ $<
@@ -1142,6 +1145,10 @@ x86_64_mov_to_lea7.o: x86_64_mov_to_lea4.s
$(TEST_AS) --x32 -o $@ $<
x86_64_mov_to_lea8.o: x86_64_mov_to_lea4.s
$(TEST_AS) --64 -o $@ $<
+x86_64_mov_to_lea9.o: x86_64_mov_to_lea5.s
+ $(TEST_AS) --x32 -mrelax-relocations=yes -o $@ $<
+x86_64_mov_to_lea10.o: x86_64_mov_to_lea5.s
+ $(TEST_AS) --64 -mrelax-relocations=yes -o $@ $<
x86_64_mov_to_lea1: x86_64_mov_to_lea1.o ../ld-new
../ld-new -Bsymbolic -shared -melf_x86_64 -o $@ $<
x86_64_mov_to_lea2: x86_64_mov_to_lea1.o ../ld-new
@@ -1170,6 +1177,10 @@ x86_64_mov_to_lea13: x86_64_mov_to_lea7.o ../ld-new
../ld-new -melf32_x86_64 -shared -o $@ $<
x86_64_mov_to_lea14: x86_64_mov_to_lea8.o ../ld-new
../ld-new -melf_x86_64 -shared -o $@ $<
+x86_64_mov_to_lea15: x86_64_mov_to_lea9.o ../ld-new
+ ../ld-new -melf32_x86_64 -shared -o $@ $<
+x86_64_mov_to_lea16: x86_64_mov_to_lea10.o ../ld-new
+ ../ld-new -melf_x86_64 -shared -o $@ $<
x86_64_mov_to_lea1.stdout: x86_64_mov_to_lea1
$(TEST_OBJDUMP) -dw $< > $@
x86_64_mov_to_lea2.stdout: x86_64_mov_to_lea2
@@ -1198,6 +1209,10 @@ x86_64_mov_to_lea13.stdout: x86_64_mov_to_lea13
$(TEST_OBJDUMP) -dw $< > $@
x86_64_mov_to_lea14.stdout: x86_64_mov_to_lea14
$(TEST_OBJDUMP) -dw $< > $@
+x86_64_mov_to_lea15.stdout: x86_64_mov_to_lea15
+ $(TEST_OBJDUMP) -dw $< > $@
+x86_64_mov_to_lea16.stdout: x86_64_mov_to_lea16
+ $(TEST_OBJDUMP) -dw $< > $@
check_SCRIPTS += x86_64_indirect_call_to_direct.sh
check_DATA += x86_64_indirect_call_to_direct1.stdout \