From 2fbb87f62734ebbf166eb86c62ad4d569f1229cc Mon Sep 17 00:00:00 2001 From: Paul Brook Date: Tue, 3 May 2011 11:17:22 +0000 Subject: 2011-05-03 Paul Brook 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. --- bfd/elf32-tic6x.c | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) (limited to 'bfd/elf32-tic6x.c') diff --git a/bfd/elf32-tic6x.c b/bfd/elf32-tic6x.c index b898aab..8b5f5cb 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) { -- cgit v1.1