2011-04-07 Paul Brook <paul@codesourcery.com>

bfd/
	* elf32-tic6x.c (elf32_tic6x_howto_table): R_C6000_PREL31 is
	pc-relative.
	(elf32_tic6x_howto_table_rel): Ditto.
	(elf32_tic6x_relocate_section): Implement R_C6000_PREL31.
	(elf32_tic6x_check_relocs): Ditto.
This commit is contained in:
Paul Brook 2011-04-07 11:38:43 +00:00
parent bd18283a08
commit 44e87ecee1
2 changed files with 22 additions and 10 deletions

View File

@ -1,3 +1,11 @@
2011-04-07 Paul Brook <paul@codesourcery.com>
* elf32-tic6x.c (elf32_tic6x_howto_table): R_C6000_PREL31 is
pc-relative.
(elf32_tic6x_howto_table_rel): Ditto.
(elf32_tic6x_relocate_section): Implement R_C6000_PREL31.
(elf32_tic6x_check_relocs): Ditto.
2011-04-06 Joseph Myers <joseph@codesourcery.com> 2011-04-06 Joseph Myers <joseph@codesourcery.com>
* config.bfd (thumb-*-oabi): Don't handle in list of obsolete * config.bfd (thumb-*-oabi): Don't handle in list of obsolete

View File

@ -433,7 +433,7 @@ static reloc_howto_type elf32_tic6x_howto_table[] =
1, /* rightshift */ 1, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */ 2, /* size (0 = byte, 1 = short, 2 = long) */
31, /* bitsize */ 31, /* bitsize */
FALSE, /* pc_relative */ TRUE, /* pc_relative */
0, /* bitpos */ 0, /* bitpos */
complain_overflow_dont,/* complain_on_overflow */ complain_overflow_dont,/* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */ bfd_elf_generic_reloc, /* special_function */
@ -441,7 +441,7 @@ static reloc_howto_type elf32_tic6x_howto_table[] =
FALSE, /* partial_inplace */ FALSE, /* partial_inplace */
0, /* src_mask */ 0, /* src_mask */
0x7fffffff, /* dst_mask */ 0x7fffffff, /* dst_mask */
FALSE), /* pcrel_offset */ TRUE), /* pcrel_offset */
HOWTO (R_C6000_COPY, /* type */ HOWTO (R_C6000_COPY, /* type */
0, /* rightshift */ 0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */ 2, /* size (0 = byte, 1 = short, 2 = long) */
@ -1005,7 +1005,7 @@ static reloc_howto_type elf32_tic6x_howto_table_rel[] =
1, /* rightshift */ 1, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */ 2, /* size (0 = byte, 1 = short, 2 = long) */
31, /* bitsize */ 31, /* bitsize */
FALSE, /* pc_relative */ TRUE, /* pc_relative */
0, /* bitpos */ 0, /* bitpos */
complain_overflow_dont,/* complain_on_overflow */ complain_overflow_dont,/* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */ bfd_elf_generic_reloc, /* special_function */
@ -1013,7 +1013,7 @@ static reloc_howto_type elf32_tic6x_howto_table_rel[] =
TRUE, /* partial_inplace */ TRUE, /* partial_inplace */
0, /* src_mask */ 0, /* src_mask */
0x7fffffff, /* dst_mask */ 0x7fffffff, /* dst_mask */
FALSE), /* pcrel_offset */ TRUE), /* pcrel_offset */
HOWTO (R_C6000_COPY, /* type */ HOWTO (R_C6000_COPY, /* type */
0, /* rightshift */ 0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */ 2, /* size (0 = byte, 1 = short, 2 = long) */
@ -2440,12 +2440,15 @@ elf32_tic6x_relocate_section (bfd *output_bfd,
break; break;
case R_C6000_PREL31: case R_C6000_PREL31:
/* Shared libraries and exception handling support not if (h != NULL
implemented. */ && h->plt.offset != (bfd_vma) -1
(*_bfd_error_handler) (_("%B: relocation type %d not implemented"), && htab->elf.splt != NULL)
input_bfd, r_type); {
ok = FALSE; relocation = (htab->elf.splt->output_section->vma
continue; + htab->elf.splt->output_offset
+ h->plt.offset);
}
break;
case R_C6000_COPY: case R_C6000_COPY:
/* Invalid in relocatable object. */ /* Invalid in relocatable object. */
@ -2623,6 +2626,7 @@ elf32_tic6x_check_relocs (bfd *abfd, struct bfd_link_info *info,
switch (r_type) switch (r_type)
{ {
case R_C6000_PCR_S21: case R_C6000_PCR_S21:
case R_C6000_PREL31:
/* This symbol requires a procedure linkage table entry. We /* This symbol requires a procedure linkage table entry. We
actually build the entry in adjust_dynamic_symbol, actually build the entry in adjust_dynamic_symbol,
because this might be a case of linking PIC code which is because this might be a case of linking PIC code which is