summaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorDJ Delorie <dj@delorie.com>2013-02-27 21:39:17 +0000
committerDJ Delorie <dj@delorie.com>2013-02-27 21:39:17 +0000
commit621259858ec670c217843a3a48acd5bc789cd001 (patch)
treeef8e38de51074e9313cdbca3840cdf3779907f1e /bfd
parent5716ab79df45a7ba8e4717726b7cc0467e0a27e0 (diff)
downloadgdb-621259858ec670c217843a3a48acd5bc789cd001.tar.gz
* reloc.c (BFD_RELOC_RL78_CODE): Add.
* libbfd.h: Regenerate. * bfd-in2.h: Regenerate. * elf32-rl78.c (rl78_elf_relocate_section): Handle weak code references in compuated relocs. * config/tc-rl78.c (reloc_function): Add %code -> BFD_RELOC_RL78_CODE. (rl78_op): Handle %code(). (rl78_cons_fix_new): Likewise, but ignore for 20-bit operands. (tc_gen_reloc): Likwise; convert to a computed reloc. (md_apply_fix): Likewise.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog8
-rw-r--r--bfd/bfd-in2.h1
-rw-r--r--bfd/elf32-rl78.c2
-rw-r--r--bfd/libbfd.h1
-rw-r--r--bfd/reloc.c2
5 files changed, 14 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 50f742dc5c7..27746f20f21 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,11 @@
+2013-02-27 DJ Delorie <dj@redhat.com>
+
+ * reloc.c (BFD_RELOC_RL78_CODE): Add.
+ * libbfd.h: Regenerate.
+ * bfd-in2.h: Regenerate.
+ * elf32-rl78.c (rl78_elf_relocate_section): Handle weak code
+ references in compuated relocs.
+
2013-02-26 Anthony Green <green@moxielogic.com>
* config.bfd: Extend moxie-rtems target triplet name support.
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index 6dfd17fa9b0..524e97e78b0 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -4239,6 +4239,7 @@ in .byte hlo8(symbol) */
BFD_RELOC_RL78_HI16,
BFD_RELOC_RL78_HI8,
BFD_RELOC_RL78_LO16,
+ BFD_RELOC_RL78_CODE,
/* Renesas RX Relocations. */
BFD_RELOC_RX_NEG8,
diff --git a/bfd/elf32-rl78.c b/bfd/elf32-rl78.c
index 3a46c6bd092..ea9a0760d58 100644
--- a/bfd/elf32-rl78.c
+++ b/bfd/elf32-rl78.c
@@ -778,6 +778,8 @@ rl78_elf_relocate_section
+ sec->output_section->vma
+ sec->output_offset
+ rel->r_addend);
+ else if (h->root.type == bfd_link_hash_undefweak)
+ RL78_STACK_PUSH (0);
else
_bfd_error_handler (_("Warning: RL78_SYM reloc with an unknown symbol"));
}
diff --git a/bfd/libbfd.h b/bfd/libbfd.h
index bcd76a0f2aa..857d1ea3b72 100644
--- a/bfd/libbfd.h
+++ b/bfd/libbfd.h
@@ -1970,6 +1970,7 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_RL78_HI16",
"BFD_RELOC_RL78_HI8",
"BFD_RELOC_RL78_LO16",
+ "BFD_RELOC_RL78_CODE",
"BFD_RELOC_RX_NEG8",
"BFD_RELOC_RX_NEG16",
"BFD_RELOC_RX_NEG24",
diff --git a/bfd/reloc.c b/bfd/reloc.c
index 626c818b091..b59ca00e971 100644
--- a/bfd/reloc.c
+++ b/bfd/reloc.c
@@ -4560,6 +4560,8 @@ ENUMX
BFD_RELOC_RL78_HI8
ENUMX
BFD_RELOC_RL78_LO16
+ENUMX
+ BFD_RELOC_RL78_CODE
ENUMDOC
Renesas RL78 Relocations.