aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorAndrew Burgess <andrew.burgess@embecosm.com>2016-01-05 14:46:39 +0000
committerAndrew Burgess <andrew.burgess@embecosm.com>2016-01-06 14:15:22 +0000
commitb05a65d0adb340e4129f62c1d380a09935ee433d (patch)
tree651c8806aea685578aaec3429290dd2fbea8a8a3 /bfd
parent79bc59cb349fdbb8d3fa81804eb121af3c340c22 (diff)
downloadgdb-b05a65d0adb340e4129f62c1d380a09935ee433d.zip
gdb-b05a65d0adb340e4129f62c1d380a09935ee433d.tar.gz
gdb-b05a65d0adb340e4129f62c1d380a09935ee433d.tar.bz2
bfd/arc: Add R_ prefix to all relocation names
The convention within for relocation names is that they start with the string "R_", however, this is not so for ARC for the display names of relocations, however, internally, the names for the relocations types do have the 'R_' prefix. I suspect that the missing 'R_' on the output strings was an oversight, as I can't see any comment to the contrary. To bring ARC into line with other targets, this commit adds the 'R_' prefix to the output strings used for relocation names, and updates all of the assembler tests where this was exposed. bfd/ChangeLog: * elf32-arc.c (reloc_type_to_name): Change ARC_RELOC_HOWTO to place 'R_' before the reloc name returned. (elf_arc_howto_table): Change ARC_RELOC_HOWTO to place 'R_' before the relocation string. gas/ChangeLog: * testsuite/gas/arc/adc.d: Add 'R_' prefix to relocation names. * testsuite/gas/arc/add.d: Likewise. * testsuite/gas/arc/and.d: Likewise. * testsuite/gas/arc/asl.d: Likewise. * testsuite/gas/arc/asr.d: Likewise. * testsuite/gas/arc/bic.d: Likewise. * testsuite/gas/arc/extb.d: Likewise. * testsuite/gas/arc/extw.d: Likewise. * testsuite/gas/arc/j.d: Likewise. * testsuite/gas/arc/jl.d: Likewise. * testsuite/gas/arc/ld2.d: Likewise. * testsuite/gas/arc/lsr.d: Likewise. * testsuite/gas/arc/mov.d: Likewise. * testsuite/gas/arc/or.d: Likewise. * testsuite/gas/arc/pcl-relocs.d: Likewise. * testsuite/gas/arc/pcrel-relocs.d: Likewise. * testsuite/gas/arc/pic-relocs.d: Likewise. * testsuite/gas/arc/plt-relocs.d: Likewise. * testsuite/gas/arc/rlc.d: Likewise. * testsuite/gas/arc/ror.d: Likewise. * testsuite/gas/arc/rrc.d: Likewise. * testsuite/gas/arc/sbc.d: Likewise. * testsuite/gas/arc/sda-relocs.d: Likewise. * testsuite/gas/arc/sda-relocs2.d: Likewise. * testsuite/gas/arc/sexb.d: Likewise. * testsuite/gas/arc/sexw.d: Likewise. * testsuite/gas/arc/st.d: Likewise. * testsuite/gas/arc/sub.d: Likewise. * testsuite/gas/arc/tls-relocs.d: Likewise. * testsuite/gas/arc/xor.d: Likewise.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog7
-rw-r--r--bfd/elf32-arc.c4
2 files changed, 9 insertions, 2 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 974b5ab..33cbe65 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,10 @@
+2016-01-06 Andrew Burgess <andrew.burgess@embecosm.com>
+
+ * elf32-arc.c (reloc_type_to_name): Change ARC_RELOC_HOWTO to
+ place 'R_' before the reloc name returned.
+ (elf_arc_howto_table): Change ARC_RELOC_HOWTO to place 'R_' before
+ the relocation string.
+
2016-01-04 Maciej W. Rozycki <macro@imgtec.com>
* elfxx-mips.c (mips_elf_merge_obj_abiflags): New function,
diff --git a/bfd/elf32-arc.c b/bfd/elf32-arc.c
index e9e299c..deadc6a 100644
--- a/bfd/elf32-arc.c
+++ b/bfd/elf32-arc.c
@@ -92,7 +92,7 @@ char * fini_str = FINI_SYM_STRING;
#define ARC_RELOC_HOWTO(TYPE, VALUE, SIZE, BITSIZE, RELOC_FUNCTION, OVERFLOW, FORMULA) \
case VALUE: \
- return #TYPE; \
+ return "R_" #TYPE; \
break;
static ATTRIBUTE_UNUSED const char *
@@ -203,7 +203,7 @@ enum howto_list
#undef ARC_RELOC_HOWTO
#define ARC_RELOC_HOWTO(TYPE, VALUE, RSIZE, BITSIZE, RELOC_FUNCTION, OVERFLOW, FORMULA) \
- [TYPE] = HOWTO (R_##TYPE, 0, RSIZE, BITSIZE, FALSE, 0, complain_overflow_##OVERFLOW, arc_elf_reloc, #TYPE, FALSE, 0, 0, FALSE),
+ [TYPE] = HOWTO (R_##TYPE, 0, RSIZE, BITSIZE, FALSE, 0, complain_overflow_##OVERFLOW, arc_elf_reloc, "R_" #TYPE, FALSE, 0, 0, FALSE),
static struct reloc_howto_struct elf_arc_howto_table[] =
{