0, /* src_mask */
0xffffffff, /* dst_mask */
FALSE), /* pcrel_offset */
- EMPTY_HOWTO (29),
- EMPTY_HOWTO (30),
+ HOWTO (R_C6000_PCR_H16, /* type */
+ 16, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ TRUE, /* pc_relative */
+ 7, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_C6000_PCR_H16", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0x007fff80, /* dst_mask */
+ TRUE), /* pcrel_offset */
+ HOWTO (R_C6000_PCR_L16, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ TRUE, /* pc_relative */
+ 7, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_C6000_PCR_L16", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0x007fff80, /* dst_mask */
+ TRUE), /* pcrel_offset */
EMPTY_HOWTO (31),
EMPTY_HOWTO (32),
EMPTY_HOWTO (33),
0, /* src_mask */
0xffffffff, /* dst_mask */
FALSE), /* pcrel_offset */
- EMPTY_HOWTO (29),
- EMPTY_HOWTO (30),
+ EMPTY_HOWTO (R_C6000_PCR_H16),
+ EMPTY_HOWTO (R_C6000_PCR_L16),
EMPTY_HOWTO (31),
EMPTY_HOWTO (32),
EMPTY_HOWTO (33),
Elf_Internal_Shdr **elf_shdrp;
bfd_boolean again;
+ _bfd_elf_gc_mark_extra_sections (info, gc_mark_hook);
+
/* Marking EH data may cause additional code sections to be marked,
requiring multiple passes. */
again = TRUE;
Elf_Internal_Sym *sym;
asection *sec;
struct elf_link_hash_entry *h;
- bfd_vma off, relocation;
+ bfd_vma off, off2, relocation;
bfd_boolean unresolved_reloc;
bfd_reloc_status_type r;
struct bfd_link_hash_entry *sbh;
unresolved_reloc = FALSE;
break;
+ case R_C6000_PCR_H16:
+ case R_C6000_PCR_L16:
+ off = (input_section->output_section->vma
+ + input_section->output_offset
+ + rel->r_offset);
+ /* These must be calculated as R = S - FP(FP(PC) - A).
+ PC, here, is the value we just computed in OFF. RELOCATION
+ has the address of S + A. */
+ relocation -= rel->r_addend;
+ off2 = ((off & ~(bfd_vma)0x1f) - rel->r_addend) & (bfd_vma)~0x1f;
+ off2 = relocation - off2;
+ relocation = off + off2;
+ break;
+
case R_C6000_DSBT_INDEX:
relocation = elf32_tic6x_hash_table (info)->params.dsbt_index;
if (!info->shared || relocation != 0)
if (h->root.type == bfd_link_hash_indirect)
return TRUE;
- if (h->root.type == bfd_link_hash_warning)
- /* When warning symbols are created, they **replace** the "real"
- entry in the hash table, thus we never get to see the real
- symbol in a hash traversal. So look at it now. */
- h = (struct elf_link_hash_entry *) h->root.u.i.link;
eh = (struct elf32_tic6x_link_hash_entry *) h;
-
info = (struct bfd_link_info *) inf;
htab = elf32_tic6x_hash_table (info);
struct elf32_tic6x_link_hash_entry *eh;
struct elf_dyn_relocs *p;
- if (h->root.type == bfd_link_hash_warning)
- h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
eh = (struct elf32_tic6x_link_hash_entry *) h;
for (p = eh->dyn_relocs; p != NULL; p = p->next)
{
static void
elf32_tic6x_set_osabi (bfd *abfd, struct bfd_link_info *link_info)
{
- if (link_info == NULL || link_info->relocatable)
+ if (link_info != NULL && link_info->relocatable)
return;
_bfd_elf_set_osabi (abfd, link_info);
}