summaryrefslogtreecommitdiff
path: root/bfd/elf32-tic6x.c
diff options
context:
space:
mode:
authorPaul Brook <paul@codesourcery.com>2011-05-03 11:17:18 +0000
committerPaul Brook <paul@codesourcery.com>2011-05-03 11:17:18 +0000
commitee97f9909cd2e60e8edcb8b14710dfe05890f23e (patch)
treebe00780d7fff0cb4e9cca4a3c20e02bc051c866e /bfd/elf32-tic6x.c
parentcba097af8ce8e6496f393e48e832d776a552cbe4 (diff)
downloadbinutils-redhat-ee97f9909cd2e60e8edcb8b14710dfe05890f23e.tar.gz
2011-05-03 Paul Brook <paul@codesourcery.com>
bfd/ * elf32-tic6x.c (elf32_tic6x_howto_table, elf32_tic6x_howto_table_rel, (elf32_tic6x_gc_sweep_hook, elf32_tic6x_relocate_section, elf32_tic6x_check_relocs): Add R_C6000_EHTYPE. gas/ * config/tc-tic6x.c (s_ehtype): New function. (md_pseudo_table): Add "ehtype". (tic6x_fix_adjustable, md_apply_fix): BFD_RELOC_C6000_EHTYPE. * doc/c-tic6x.texi: Document .ehtype directive. ld/testsuite/ * ld-tic6x/ehtype-reloc-1-rel.d: New test. * ld-tic6x/ehtype-reloc-1.d: New test. * ld-tic6x/ehtype-reloc-1.s: New test.
Diffstat (limited to 'bfd/elf32-tic6x.c')
-rw-r--r--bfd/elf32-tic6x.c31
1 files changed, 29 insertions, 2 deletions
diff --git a/bfd/elf32-tic6x.c b/bfd/elf32-tic6x.c
index b898aabf04..8b5f5cb418 100644
--- a/bfd/elf32-tic6x.c
+++ b/bfd/elf32-tic6x.c
@@ -468,7 +468,19 @@ static reloc_howto_type elf32_tic6x_howto_table[] =
0, /* src_mask */
0xffffffff, /* dst_mask */
FALSE), /* pcrel_offset */
- EMPTY_HOWTO (28),
+ HOWTO (R_C6000_EHTYPE, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_C6000_EHTYPE", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
EMPTY_HOWTO (29),
EMPTY_HOWTO (30),
EMPTY_HOWTO (31),
@@ -1040,7 +1052,19 @@ static reloc_howto_type elf32_tic6x_howto_table_rel[] =
0, /* src_mask */
0xffffffff, /* dst_mask */
FALSE), /* pcrel_offset */
- EMPTY_HOWTO (28),
+ HOWTO (R_C6000_EHTYPE, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_C6000_EHTYPE", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
EMPTY_HOWTO (29),
EMPTY_HOWTO (30),
EMPTY_HOWTO (31),
@@ -1853,6 +1877,7 @@ elf32_tic6x_gc_sweep_hook (bfd *abfd,
case R_C6000_SBR_GOT_U15_W:
case R_C6000_SBR_GOT_L16_W:
case R_C6000_SBR_GOT_H16_W:
+ case R_C6000_EHTYPE:
if (h != NULL)
{
if (h->got.refcount > 0)
@@ -2323,6 +2348,7 @@ elf32_tic6x_relocate_section (bfd *output_bfd,
case R_C6000_SBR_GOT_U15_W:
case R_C6000_SBR_GOT_L16_W:
case R_C6000_SBR_GOT_H16_W:
+ case R_C6000_EHTYPE:
/* Relocation is to the entry for this symbol in the global
offset table. */
if (htab->elf.sgot == NULL)
@@ -2646,6 +2672,7 @@ elf32_tic6x_check_relocs (bfd *abfd, struct bfd_link_info *info,
case R_C6000_SBR_GOT_U15_W:
case R_C6000_SBR_GOT_L16_W:
case R_C6000_SBR_GOT_H16_W:
+ case R_C6000_EHTYPE:
/* This symbol requires a global offset table entry. */
if (h != NULL)
{