aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorJohn Eric Martin <John.Martin@emmicro-us.com>2017-07-19 09:56:55 +0200
committerclaziss <claziss@synopsys.com>2017-07-19 09:56:55 +0200
commit684d5a10b1332e2a1b03a1d6e7a899ef87b3ea16 (patch)
tree86314acf8134b81adb49a35e6f5c685607e03205 /bfd
parente4943f2c7569a829eb6129f10f7c5401a96aaa08 (diff)
downloadgdb-684d5a10b1332e2a1b03a1d6e7a899ef87b3ea16.zip
gdb-684d5a10b1332e2a1b03a1d6e7a899ef87b3ea16.tar.gz
gdb-684d5a10b1332e2a1b03a1d6e7a899ef87b3ea16.tar.bz2
[ARC] Add JLI support.
The following relocation types were added to GCC/binutils: ARC_JLI_SECTOFF is a relocation type in Metaware that is now used by GCC as well to adjust the index of function calls to functions with attribute jli_call_always. bfd/ 2017-07-19 Claudiu Zissulescu <claziss@synopsys.com> John Eric Martin <John.Martin@emmicro-us.com> * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. * elf32-arc.c (JLI): Define. * reloc.c: Add JLI relocations. gas/ 2017-07-19 Claudiu Zissulescu <claziss@synopsys.com> * testsuite/gas/arc/jli-1.d: New file. * testsuite/gas/arc/jli-1.s: Likewise. * testsuite/gas/arc/taux.d: Update for jli_base. include/ 2017-07-19 Claudiu Zissulescu <claziss@synopsys.com> John Eric Martin <John.Martin@emmicro-us.com> * elf/arc-reloc.def: Add JLI relocs howto. * opcode/arc-func.h (replace_jli): New function. ld/ 2017-07-19 Claudiu Zissulescu <claziss@synopsys.com> John Eric Martin <John.Martin@emmicro-us.com> * emulparams/arcelf.sh (JLI_START_TABLE): Define. * scripttempl/elfarc.sc: Handle jlitab section. * scripttempl/elfarcv2.sc: Likewise. * testsuite/ld-arc/arc.exp: Add JLI test. * testsuite/ld-arc/jli-script.ld: New file. * testsuite/ld-arc/jli-simple.dd: Likewise. * testsuite/ld-arc/jli-simple.rd: Likewise. * testsuite/ld-arc/jli-simple.s: Likewise. * testsuite/ld/testsuite/ld-arc/jli-overflow.s: Likewise. * testsuite/ld/testsuite/ld-arc/jli-overflow.d: Likewise. * testsuite/ld/testsuite/ld-arc/jli-overflow.err: Likewise. opcode/ 2017-07-19 Claudiu Zissulescu <claziss@synopsys.com> John Eric Martin <John.Martin@emmicro-us.com> * arc-opc.c (UIMM10_6_S_JLIOFF): Define. (UIMM3_23): Adjust accordingly. * arc-regs.h: Add/correct jli_base register. * arc-tbl.h (jli_s): Likewise.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog8
-rw-r--r--bfd/bfd-in2.h1
-rw-r--r--bfd/elf32-arc.c3
-rw-r--r--bfd/libbfd.h1
-rw-r--r--bfd/reloc.c2
5 files changed, 14 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index bdffccf..94ccaa0 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,11 @@
+2017-07-19 Claudiu Zissulescu <claziss@synopsys.com>
+ John Eric Martin <John.Martin@emmicro-us.com>
+
+ * bfd-in2.h: Regenerate.
+ * libbfd.h: Regenerate.
+ * elf32-arc.c (JLI): Define.
+ * reloc.c: Add JLI relocations.
+
2017-07-18 Nick Clifton <nickc@redhat.com>
PR 21775
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index 1343780..d126aed 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -3800,6 +3800,7 @@ pc-relative or some form of GOT-indirect relocation. */
BFD_RELOC_ARC_S25W_PCREL_PLT,
BFD_RELOC_ARC_S21H_PCREL_PLT,
BFD_RELOC_ARC_NPS_CMEM16,
+ BFD_RELOC_ARC_JLI_SECTOFF,
/* ADI Blackfin 16 bit immediate absolute reloc. */
BFD_RELOC_BFIN_16_IMM,
diff --git a/bfd/elf32-arc.c b/bfd/elf32-arc.c
index 93b21de..cdecdb1 100644
--- a/bfd/elf32-arc.c
+++ b/bfd/elf32-arc.c
@@ -1182,7 +1182,7 @@ arc_special_overflow_checks (const struct arc_relocation_data reloc_data,
+ (reloc_data.reloc_offset))))
#define SECTSTART (bfd_signed_vma) (reloc_data.sym_section->output_section->vma \
+ reloc_data.sym_section->output_offset)
-
+#define JLI (bfd_signed_vma) (reloc_data.sym_section->output_section->vma)
#define _SDA_BASE_ (bfd_signed_vma) (reloc_data.sdata_begin_symbol_vma)
#define TLS_REL (bfd_signed_vma) \
((elf_hash_table (info))->tls_sec->output_section->vma)
@@ -1359,6 +1359,7 @@ arc_do_relocation (bfd_byte * contents,
#undef P
#undef SECTSTAR
#undef SECTSTART
+#undef JLI
#undef _SDA_BASE_
#undef none
diff --git a/bfd/libbfd.h b/bfd/libbfd.h
index ae9bf76..17acda5 100644
--- a/bfd/libbfd.h
+++ b/bfd/libbfd.h
@@ -1752,6 +1752,7 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_ARC_S25W_PCREL_PLT",
"BFD_RELOC_ARC_S21H_PCREL_PLT",
"BFD_RELOC_ARC_NPS_CMEM16",
+ "BFD_RELOC_ARC_JLI_SECTOFF",
"BFD_RELOC_BFIN_16_IMM",
"BFD_RELOC_BFIN_16_HIGH",
"BFD_RELOC_BFIN_4_PCREL",
diff --git a/bfd/reloc.c b/bfd/reloc.c
index aa70fa58..8512261 100644
--- a/bfd/reloc.c
+++ b/bfd/reloc.c
@@ -3695,6 +3695,8 @@ ENUMX
BFD_RELOC_ARC_S21H_PCREL_PLT
ENUMX
BFD_RELOC_ARC_NPS_CMEM16
+ENUMX
+ BFD_RELOC_ARC_JLI_SECTOFF
ENUMDOC
ARC relocs.