[binutils-gdb] Apply alpha BFD_RELOC_8 fixups
Alan Modra
amodra@sourceware.org
Mon Oct 22 12:09:00 GMT 2018
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=e1748c54a200f45d6e88c232ca97171be23ba0b0
commit e1748c54a200f45d6e88c232ca97171be23ba0b0
Author: Alan Modra <amodra@gmail.com>
Date: Mon Oct 22 20:30:40 2018 +1030
Apply alpha BFD_RELOC_8 fixups
* config/tc-alpha.c (md_apply_fix): Handle BFD_RELOC_8 for fixups
without a symbol.
* testsuite/gas/all/gas.exp: Don't xfail forward test here..
* testsuite/gas/all/forward.d: ..do so here, removing alpha.
Diff:
---
gas/ChangeLog | 7 +++++++
gas/config/tc-alpha.c | 6 ++++++
gas/testsuite/gas/all/forward.d | 2 ++
gas/testsuite/gas/all/gas.exp | 4 ----
4 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 240e078..b0405fa 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,5 +1,12 @@
2018-10-22 Alan Modra <amodra@gmail.com>
+ * config/tc-alpha.c (md_apply_fix): Handle BFD_RELOC_8 for fixups
+ without a symbol.
+ * testsuite/gas/all/gas.exp: Don't xfail forward test here..
+ * testsuite/gas/all/forward.d: ..do so here, removing alpha.
+
+2018-10-22 Alan Modra <amodra@gmail.com>
+
PR 23040
* symbols.c (get_real_sym): New function.
(symbol_same_p): Use get_real_sym.
diff --git a/gas/config/tc-alpha.c b/gas/config/tc-alpha.c
index 7fff858..7791811 100644
--- a/gas/config/tc-alpha.c
+++ b/gas/config/tc-alpha.c
@@ -5769,6 +5769,12 @@ md_apply_fix (fixS *fixP, valueT * valP, segT seg)
md_number_to_chars (fixpos, value, 2);
break;
+ case BFD_RELOC_8:
+ if (fixP->fx_pcrel)
+ fixP->fx_r_type = BFD_RELOC_8_PCREL;
+ size = 1;
+ goto do_reloc_xx;
+
case BFD_RELOC_16:
if (fixP->fx_pcrel)
fixP->fx_r_type = BFD_RELOC_16_PCREL;
diff --git a/gas/testsuite/gas/all/forward.d b/gas/testsuite/gas/all/forward.d
index 8e45201..9750133 100644
--- a/gas/testsuite/gas/all/forward.d
+++ b/gas/testsuite/gas/all/forward.d
@@ -1,5 +1,7 @@
#objdump: -s -j .data
#name: forward references
+# Some targets don't manage to resolve BFD_RELOC_8 for constants.
+#xfail: *c30-*-* *c4x-*-* d10v-*-* d30v-*-* pdp11-*-* xtensa*-*-*
.*: .*
diff --git a/gas/testsuite/gas/all/gas.exp b/gas/testsuite/gas/all/gas.exp
index 74988a1..4296b14 100644
--- a/gas/testsuite/gas/all/gas.exp
+++ b/gas/testsuite/gas/all/gas.exp
@@ -111,10 +111,6 @@ case $target_triplet in {
{ microblaze-*-* } { }
{ mn10\[23\]00*-*-* } { }
default {
- # Some targets don't manage to resolve BFD_RELOC_8 for constants.
- setup_xfail "alpha*-*-*" "*c30*-*-*" "*c4x*-*-*" \
- "d\[13\]0v*-*-*" \
- "pdp11-*-*" "xtensa*-*-*"
run_dump_test forward
}
}
More information about the Binutils-cvs
mailing list