static reloc_howto_type bfin_howto_table [] =
{
/* This reloc does nothing. . */
- HOWTO (R_unused0, /* type. */
+ HOWTO (R_BFIN_UNUSED0, /* type. */
0, /* rightshift. */
2, /* size (0 = byte, 1 = short, 2 = long). */
32, /* bitsize. */
0, /* bitpos. */
complain_overflow_bitfield, /* complain_on_overflow. */
bfd_elf_generic_reloc, /* special_function. */
- "R_unused0", /* name. */
+ "R_BFIN_UNUSED0", /* name. */
FALSE, /* partial_inplace. */
0, /* src_mask. */
0, /* dst_mask. */
FALSE), /* pcrel_offset. */
- HOWTO (R_pcrel5m2, /* type. */
+ HOWTO (R_BFIN_PCREL5M2, /* type. */
1, /* rightshift. */
1, /* size (0 = byte, 1 = short, 2 = long).. */
4, /* bitsize. */
0, /* bitpos. */
complain_overflow_unsigned, /* complain_on_overflow. */
bfin_bfd_reloc, /* special_function. */
- "R_pcrel5m2", /* name. */
+ "R_BFIN_PCREL5M2", /* name. */
FALSE, /* partial_inplace. */
0, /* src_mask. */
0x0000000F, /* dst_mask. */
FALSE), /* pcrel_offset. */
- HOWTO (R_unused1, /* type. */
+ HOWTO (R_BFIN_UNUSED1, /* type. */
0, /* rightshift. */
2, /* size (0 = byte, 1 = short, 2 = long). */
32, /* bitsize. */
0, /* bitpos. */
complain_overflow_bitfield, /* complain_on_overflow. */
bfd_elf_generic_reloc, /* special_function. */
- "R_unused1", /* name. */
+ "R_BFIN_UNUSED1", /* name. */
FALSE, /* partial_inplace. */
0, /* src_mask. */
0, /* dst_mask. */
FALSE), /* pcrel_offset. */
- HOWTO (R_pcrel10, /* type. */
+ HOWTO (R_BFIN_PCREL10, /* type. */
1, /* rightshift. */
1, /* size (0 = byte, 1 = short, 2 = long). */
10, /* bitsize. */
0, /* bitpos. */
complain_overflow_signed, /* complain_on_overflow. */
bfin_bfd_reloc, /* special_function. */
- "R_pcrel10", /* name. */
+ "R_BFIN_PCREL10", /* name. */
FALSE, /* partial_inplace. */
0, /* src_mask. */
0x000003FF, /* dst_mask. */
TRUE), /* pcrel_offset. */
- HOWTO (R_pcrel12_jump, /* type. */
+ HOWTO (R_BFIN_PCREL12_JUMP, /* type. */
1, /* rightshift. */
/* the offset is actually 13 bit
aligned on a word boundary so
0, /* bitpos. */
complain_overflow_signed, /* complain_on_overflow. */
bfin_bfd_reloc, /* special_function. */
- "R_pcrel12_jump", /* name. */
+ "R_BFIN_PCREL12_JUMP", /* name. */
FALSE, /* partial_inplace. */
0, /* src_mask. */
0x0FFF, /* dst_mask. */
TRUE), /* pcrel_offset. */
- HOWTO (R_rimm16, /* type. */
+ HOWTO (R_BFIN_RIMM16, /* type. */
0, /* rightshift. */
1, /* size (0 = byte, 1 = short, 2 = long). */
16, /* bitsize. */
0, /* bitpos. */
complain_overflow_signed, /* complain_on_overflow. */
bfin_imm16_reloc, /* special_function. */
- "R_rimm16", /* name. */
+ "R_BFIN_RIMM16", /* name. */
FALSE, /* partial_inplace. */
0, /* src_mask. */
0x0000FFFF, /* dst_mask. */
TRUE), /* pcrel_offset. */
- HOWTO (R_luimm16, /* type. */
+ HOWTO (R_BFIN_LUIMM16, /* type. */
0, /* rightshift. */
1, /* size (0 = byte, 1 = short, 2 = long). */
16, /* bitsize. */
0, /* bitpos. */
complain_overflow_dont, /* complain_on_overflow. */
bfin_imm16_reloc, /* special_function. */
- "R_luimm16", /* name. */
+ "R_BFIN_LUIMM16", /* name. */
FALSE, /* partial_inplace. */
0, /* src_mask. */
0x0000FFFF, /* dst_mask. */
TRUE), /* pcrel_offset. */
- HOWTO (R_huimm16, /* type. */
+ HOWTO (R_BFIN_HUIMM16, /* type. */
16, /* rightshift. */
1, /* size (0 = byte, 1 = short, 2 = long). */
16, /* bitsize. */
0, /* bitpos. */
complain_overflow_unsigned, /* complain_on_overflow. */
bfin_imm16_reloc, /* special_function. */
- "R_huimm16", /* name. */
+ "R_BFIN_HUIMM16", /* name. */
FALSE, /* partial_inplace. */
0, /* src_mask. */
0x0000FFFF, /* dst_mask. */
TRUE), /* pcrel_offset. */
- HOWTO (R_pcrel12_jump_s, /* type. */
+ HOWTO (R_BFIN_PCREL12_JUMP_S, /* type. */
1, /* rightshift. */
1, /* size (0 = byte, 1 = short, 2 = long). */
12, /* bitsize. */
0, /* bitpos. */
complain_overflow_signed, /* complain_on_overflow. */
bfin_bfd_reloc, /* special_function. */
- "R_pcrel12_jump_s", /* name. */
+ "R_BFIN_PCREL12_JUMP_S", /* name. */
FALSE, /* partial_inplace. */
0, /* src_mask. */
0x00000FFF, /* dst_mask. */
TRUE), /* pcrel_offset. */
- HOWTO (R_pcrel24_jump_x, /* type. */
+ HOWTO (R_BFIN_PCREL24_JUMP_X, /* type. */
1, /* rightshift. */
2, /* size (0 = byte, 1 = short, 2 = long). */
24, /* bitsize. */
0, /* bitpos. */
complain_overflow_signed, /* complain_on_overflow. */
bfin_pcrel24_reloc, /* special_function. */
- "R_pcrel24_jump_x", /* name. */
+ "R_BFIN_PCREL24_JUMP_X", /* name. */
FALSE, /* partial_inplace. */
0, /* src_mask. */
0x00FFFFFF, /* dst_mask. */
TRUE), /* pcrel_offset. */
- HOWTO (R_pcrel24, /* type. */
+ HOWTO (R_BFIN_PCREL24, /* type. */
1, /* rightshift. */
2, /* size (0 = byte, 1 = short, 2 = long). */
24, /* bitsize. */
0, /* bitpos. */
complain_overflow_signed, /* complain_on_overflow. */
bfin_pcrel24_reloc, /* special_function. */
- "R_pcrel24", /* name. */
+ "R_BFIN_PCREL24", /* name. */
FALSE, /* partial_inplace. */
0, /* src_mask. */
0x00FFFFFF, /* dst_mask. */
TRUE), /* pcrel_offset. */
- HOWTO (R_unusedb, /* type. */
+ HOWTO (R_BFIN_UNUSEDB, /* type. */
0, /* rightshift. */
2, /* size (0 = byte, 1 = short, 2 = long). */
32, /* bitsize. */
0, /* bitpos. */
complain_overflow_dont, /* complain_on_overflow. */
bfd_elf_generic_reloc, /* special_function. */
- "R_unusedb", /* name. */
+ "R_BFIN_UNUSEDB", /* name. */
FALSE, /* partial_inplace. */
0, /* src_mask. */
0, /* dst_mask. */
FALSE), /* pcrel_offset. */
- HOWTO (R_unusedc, /* type. */
+ HOWTO (R_BFIN_UNUSEDC, /* type. */
0, /* rightshift. */
2, /* size (0 = byte, 1 = short, 2 = long). */
32, /* bitsize. */
0, /* bitpos. */
complain_overflow_dont, /* complain_on_overflow. */
bfd_elf_generic_reloc, /* special_function. */
- "R_unusedc", /* name. */
+ "R_BFIN_UNUSEDC", /* name. */
FALSE, /* partial_inplace. */
0, /* src_mask. */
0, /* dst_mask. */
FALSE), /* pcrel_offset. */
- HOWTO (R_pcrel24_jump_l, /* type. */
+ HOWTO (R_BFIN_PCREL24_JUMP_L, /* type. */
1, /* rightshift. */
2, /* size (0 = byte, 1 = short, 2 = long). */
24, /* bitsize. */
0, /* bitpos. */
complain_overflow_signed, /* complain_on_overflow. */
bfin_pcrel24_reloc, /* special_function. */
- "R_pcrel24_jump_l", /* name. */
+ "R_BFIN_PCREL24_JUMP_L", /* name. */
FALSE, /* partial_inplace. */
0, /* src_mask. */
0x00FFFFFF, /* dst_mask. */
TRUE), /* pcrel_offset. */
- HOWTO (R_pcrel24_call_x, /* type. */
+ HOWTO (R_BFIN_PCREL24_CALL_X, /* type. */
1, /* rightshift. */
2, /* size (0 = byte, 1 = short, 2 = long). */
24, /* bitsize. */
0, /* bitpos. */
complain_overflow_signed, /* complain_on_overflow. */
bfin_pcrel24_reloc, /* special_function. */
- "R_pcrel24_call_x", /* name. */
+ "R_BFIN_PCREL24_CALL_X", /* name. */
FALSE, /* partial_inplace. */
0, /* src_mask. */
0x00FFFFFF, /* dst_mask. */
TRUE), /* pcrel_offset. */
- HOWTO (R_var_eq_symb, /* type. */
+ HOWTO (R_BFIN_VAR_EQ_SYMB, /* type. */
0, /* rightshift. */
2, /* size (0 = byte, 1 = short, 2 = long). */
32, /* bitsize. */
0, /* bitpos. */
complain_overflow_bitfield, /* complain_on_overflow. */
bfin_bfd_reloc, /* special_function. */
- "R_var_eq_symb", /* name. */
+ "R_BFIN_VAR_EQ_SYMB", /* name. */
FALSE, /* partial_inplace. */
0, /* src_mask. */
0, /* dst_mask. */
FALSE), /* pcrel_offset. */
- HOWTO (R_byte_data, /* type. */
+ HOWTO (R_BFIN_BYTE_DATA, /* type. */
0, /* rightshift. */
0, /* size (0 = byte, 1 = short, 2 = long). */
8, /* bitsize. */
0, /* bitpos. */
complain_overflow_unsigned, /* complain_on_overflow. */
bfin_bfd_reloc, /* special_function. */
- "R_byte_data", /* name. */
+ "R_BFIN_BYTE_DATA", /* name. */
FALSE, /* partial_inplace. */
0, /* src_mask. */
0xFF, /* dst_mask. */
TRUE), /* pcrel_offset. */
- HOWTO (R_byte2_data, /* type. */
+ HOWTO (R_BFIN_BYTE2_DATA, /* type. */
0, /* rightshift. */
1, /* size (0 = byte, 1 = short, 2 = long). */
16, /* bitsize. */
0, /* bitpos. */
complain_overflow_signed, /* complain_on_overflow. */
bfin_bfd_reloc, /* special_function. */
- "R_byte2_data", /* name. */
+ "R_BFIN_BYTE2_DATA", /* name. */
FALSE, /* partial_inplace. */
0, /* src_mask. */
0xFFFF, /* dst_mask. */
TRUE), /* pcrel_offset. */
- HOWTO (R_byte4_data, /* type. */
+ HOWTO (R_BFIN_BYTE4_DATA, /* type. */
0, /* rightshift. */
2, /* size (0 = byte, 1 = short, 2 = long). */
32, /* bitsize. */
0, /* bitpos. */
complain_overflow_unsigned, /* complain_on_overflow. */
bfin_byte4_reloc, /* special_function. */
- "R_byte4_data", /* name. */
+ "R_BFIN_BYTE4_DATA", /* name. */
FALSE, /* partial_inplace. */
0, /* src_mask. */
0xFFFFFFFF, /* dst_mask. */
TRUE), /* pcrel_offset. */
- HOWTO (R_pcrel11, /* type. */
+ HOWTO (R_BFIN_PCREL11, /* type. */
1, /* rightshift. */
1, /* size (0 = byte, 1 = short, 2 = long). */
10, /* bitsize. */
0, /* bitpos. */
complain_overflow_unsigned, /* complain_on_overflow. */
bfin_bfd_reloc, /* special_function. */
- "R_pcrel11", /* name. */
+ "R_BFIN_PCREL11", /* name. */
FALSE, /* partial_inplace. */
0, /* src_mask. */
0x000003FF, /* dst_mask. */
static reloc_howto_type bfin_gnuext_howto_table [] =
{
- HOWTO (R_pltpc, /* type. */
+ HOWTO (R_BFIN_PLTPC, /* type. */
0, /* rightshift. */
1, /* size (0 = byte, 1 = short, 2 = long). */
16, /* bitsize. */
0, /* bitpos. */
complain_overflow_bitfield, /* complain_on_overflow. */
bfin_pltpc_reloc, /* special_function. */
- "R_pltpc", /* name. */
+ "R_BFIN_PLTPC", /* name. */
FALSE, /* partial_inplace. */
0xffff, /* src_mask. */
0xffff, /* dst_mask. */
FALSE), /* pcrel_offset. */
- HOWTO (R_got, /* type. */
+ HOWTO (R_BFIN_GOT, /* type. */
0, /* rightshift. */
1, /* size (0 = byte, 1 = short, 2 = long). */
16, /* bitsize. */
0, /* bitpos. */
complain_overflow_bitfield, /* complain_on_overflow. */
bfd_elf_generic_reloc, /* special_function. */
- "R_got", /* name. */
+ "R_BFIN_GOT", /* name. */
FALSE, /* partial_inplace. */
0x7fff, /* src_mask. */
0x7fff, /* dst_mask. */
static const struct bfin_reloc_map bfin_reloc_map [] =
{
- { BFD_RELOC_NONE, R_unused0 },
- { BFD_RELOC_BFIN_5_PCREL, R_pcrel5m2 },
- { BFD_RELOC_NONE, R_unused1 },
- { BFD_RELOC_BFIN_10_PCREL, R_pcrel10 },
- { BFD_RELOC_BFIN_12_PCREL_JUMP, R_pcrel12_jump },
- { BFD_RELOC_BFIN_16_IMM, R_rimm16 },
- { BFD_RELOC_BFIN_16_LOW, R_luimm16 },
- { BFD_RELOC_BFIN_16_HIGH, R_huimm16 },
- { BFD_RELOC_BFIN_12_PCREL_JUMP_S, R_pcrel12_jump_s },
- { BFD_RELOC_24_PCREL, R_pcrel24 },
- { BFD_RELOC_24_PCREL, R_pcrel24 },
- { BFD_RELOC_BFIN_24_PCREL_JUMP_L, R_pcrel24_jump_l },
- { BFD_RELOC_NONE, R_unusedb },
- { BFD_RELOC_NONE, R_unusedc },
- { BFD_RELOC_BFIN_24_PCREL_CALL_X, R_pcrel24_call_x },
- { BFD_RELOC_8, R_byte_data },
- { BFD_RELOC_16, R_byte2_data },
- { BFD_RELOC_32, R_byte4_data },
- { BFD_RELOC_BFIN_11_PCREL, R_pcrel11 },
- { BFD_RELOC_BFIN_GOT, R_got },
- { BFD_RELOC_BFIN_PLTPC, R_pltpc },
+ { BFD_RELOC_NONE, R_BFIN_UNUSED0 },
+ { BFD_RELOC_BFIN_5_PCREL, R_BFIN_PCREL5M2 },
+ { BFD_RELOC_NONE, R_BFIN_UNUSED1 },
+ { BFD_RELOC_BFIN_10_PCREL, R_BFIN_PCREL10 },
+ { BFD_RELOC_BFIN_12_PCREL_JUMP, R_BFIN_PCREL12_JUMP },
+ { BFD_RELOC_BFIN_16_IMM, R_BFIN_RIMM16 },
+ { BFD_RELOC_BFIN_16_LOW, R_BFIN_LUIMM16 },
+ { BFD_RELOC_BFIN_16_HIGH, R_BFIN_HUIMM16 },
+ { BFD_RELOC_BFIN_12_PCREL_JUMP_S, R_BFIN_PCREL12_JUMP_S },
+ { BFD_RELOC_24_PCREL, R_BFIN_PCREL24 },
+ { BFD_RELOC_24_PCREL, R_BFIN_PCREL24 },
+ { BFD_RELOC_BFIN_24_PCREL_JUMP_L, R_BFIN_PCREL24_JUMP_L },
+ { BFD_RELOC_NONE, R_BFIN_UNUSEDB },
+ { BFD_RELOC_NONE, R_BFIN_UNUSEDC },
+ { BFD_RELOC_BFIN_24_PCREL_CALL_X, R_BFIN_PCREL24_CALL_X },
+ { BFD_RELOC_8, R_BFIN_BYTE_DATA },
+ { BFD_RELOC_16, R_BFIN_BYTE2_DATA },
+ { BFD_RELOC_32, R_BFIN_BYTE4_DATA },
+ { BFD_RELOC_BFIN_11_PCREL, R_BFIN_PCREL11 },
+ { BFD_RELOC_BFIN_GOT, R_BFIN_GOT },
+ { BFD_RELOC_BFIN_PLTPC, R_BFIN_PLTPC },
{ BFD_RELOC_BFIN_GOT17M4, R_BFIN_GOT17M4 },
{ BFD_RELOC_BFIN_GOTHI, R_BFIN_GOTHI },
return FALSE;
break;
- case R_got:
+ case R_BFIN_GOT:
if (h != NULL
&& strcmp (h->root.root.string, "__GLOBAL_OFFSET_TABLE_") == 0)
break;
{
int r_type = ELF32_R_TYPE (rel->r_info);
- if (r_type == R_pcrel24 || r_type == R_pcrel24_jump_l)
+ if (r_type == R_BFIN_PCREL24 || r_type == R_BFIN_PCREL24_JUMP_L)
{
bfd_reloc_status_type r = bfd_reloc_ok;
bfd_vma x;
case R_BFIN_GNU_VTENTRY:
return bfd_reloc_ok;
- case R_got:
+ case R_BFIN_GOT:
/* Relocation is to the address of the entry for this symbol
in the global offset table. */
if (h != NULL
outrel.r_offset = (sgot->output_section->vma
+ sgot->output_offset + off);
outrel.r_info =
- ELF32_R_INFO (0, R_pcrel24);
+ ELF32_R_INFO (0, R_BFIN_PCREL24);
outrel.r_addend = relocation;
loc = s->contents;
loc +=
switch (ELF32_R_TYPE (rel->r_info))
{
- case R_got:
+ case R_BFIN_GOT:
r_symndx = ELF32_R_SYM (rel->r_info);
if (r_symndx >= symtab_hdr->sh_info)
{
needed for this symbol. */
unsigned done:1;
- /* The number of R_byte4_data, R_BFIN_FUNCDESC and R_BFIN_FUNCDESC_VALUE
+ /* The number of R_BFIN_BYTE4_DATA, R_BFIN_FUNCDESC and R_BFIN_FUNCDESC_VALUE
relocations referencing the symbol. */
unsigned relocs32, relocsfd, relocsfdv;
+ bfinfdpic_got_section (info)
->output_section->vma
+ bfinfdpic_got_section (info)->output_offset,
- R_byte4_data, idx, ad, entry);
+ R_BFIN_BYTE4_DATA, idx, ad, entry);
bfd_put_32 (output_bfd, ad,
bfinfdpic_got_section (info)->contents
so reference it directly. */
if (elf_hash_table (info)->dynamic_sections_created)
BFD_ASSERT (entry->privfd);
- reloc = R_byte4_data;
+ reloc = R_BFIN_BYTE4_DATA;
idx = elf_section_data (bfinfdpic_got_section (info)
->output_section)->dynindx;
ad = bfinfdpic_got_section (info)->output_offset
switch (r_type)
{
- case R_pcrel24:
- case R_pcrel24_jump_l:
- case R_byte4_data:
+ case R_BFIN_PCREL24:
+ case R_BFIN_PCREL24_JUMP_L:
+ case R_BFIN_BYTE4_DATA:
if (! IS_FDPIC (output_bfd))
goto non_fdpic;
switch (r_type)
{
- case R_pcrel24:
- case R_pcrel24_jump_l:
+ case R_BFIN_PCREL24:
+ case R_BFIN_PCREL24_JUMP_L:
check_segment[0] = isec_segment;
if (! IS_FDPIC (output_bfd))
check_segment[1] = isec_segment;
/* Otherwise, we know we have a private function
descriptor, so reference it directly. */
BFD_ASSERT (picrel->privfd);
- r_type = R_byte4_data;
+ r_type = R_BFIN_BYTE4_DATA;
dynindx = elf_section_data (bfinfdpic_got_section (info)
->output_section)->dynindx;
addend = bfinfdpic_got_section (info)->output_offset
_bfinfdpic_add_dyn_reloc (output_bfd,
bfinfdpic_gotrel_section (info),
0,
- R_unused0,
+ R_BFIN_UNUSED0,
dynindx, addend, picrel);
else
_bfinfdpic_add_dyn_reloc (output_bfd,
check_segment[0] = check_segment[1] = got_segment;
break;
- case R_byte4_data:
+ case R_BFIN_BYTE4_DATA:
if (! IS_FDPIC (output_bfd))
{
check_segment[0] = check_segment[1] = -1;
if (offset >= (bfd_vma)-2)
_bfinfdpic_add_dyn_reloc (output_bfd,
bfinfdpic_gotrel_section (info),
- 0, R_unused0, dynindx, addend, picrel);
+ 0, R_BFIN_UNUSED0, dynindx, addend, picrel);
else
_bfinfdpic_add_dyn_reloc (output_bfd,
bfinfdpic_gotrel_section (info),
switch (r_type)
{
- case R_pcrel24:
- case R_pcrel24_jump_l:
+ case R_BFIN_PCREL24:
+ case R_BFIN_PCREL24_JUMP_L:
if (! IS_FDPIC (output_bfd) || ! picrel->plt)
break;
/* Fall through. */
switch (ELF32_R_TYPE (rel->r_info))
{
- case R_pcrel24:
- case R_pcrel24_jump_l:
+ case R_BFIN_PCREL24:
+ case R_BFIN_PCREL24_JUMP_L:
picrel->call--;
break;
picrel->relocs32++;
/* Fall through. */
- case R_byte4_data:
+ case R_BFIN_BYTE4_DATA:
picrel->sym--;
if (bfd_get_section_flags (abfd, sec) & SEC_ALLOC)
picrel->relocs32--;
if (! IS_FDPIC (abfd))
goto bad_reloc;
/* Fall through. */
- case R_pcrel24:
- case R_pcrel24_jump_l:
- case R_byte4_data:
+ case R_BFIN_PCREL24:
+ case R_BFIN_PCREL24_JUMP_L:
+ case R_BFIN_BYTE4_DATA:
if (IS_FDPIC (abfd) && ! dynobj)
{
elf_hash_table (info)->dynobj = dynobj = abfd;
switch (ELF32_R_TYPE (rel->r_info))
{
- case R_pcrel24:
- case R_pcrel24_jump_l:
+ case R_BFIN_PCREL24:
+ case R_BFIN_PCREL24_JUMP_L:
if (IS_FDPIC (abfd))
picrel->call++;
break;
picrel->relocs32--;
/* Fall through. */
- case R_byte4_data:
+ case R_BFIN_BYTE4_DATA:
if (! IS_FDPIC (abfd))
break;
return FALSE;
break;
- case R_huimm16:
- case R_luimm16:
- case R_pcrel12_jump_s:
- case R_pcrel10:
+ case R_BFIN_HUIMM16:
+ case R_BFIN_LUIMM16:
+ case R_BFIN_PCREL12_JUMP_S:
+ case R_BFIN_PCREL10:
break;
default:
|| h->dynindx == -1 || h->forced_local) && h->def_regular)
{
fprintf(stderr, "*** check this relocation %s\n", __FUNCTION__);
- rela.r_info = ELF32_R_INFO (0, R_pcrel24);
+ rela.r_info = ELF32_R_INFO (0, R_BFIN_PCREL24);
rela.r_addend = bfd_get_signed_32 (output_bfd,
(sgot->contents
+
{
bfd_put_32 (output_bfd, (bfd_vma) 0,
sgot->contents + (h->got.offset & ~(bfd_vma) 1));
- rela.r_info = ELF32_R_INFO (h->dynindx, R_got);
+ rela.r_info = ELF32_R_INFO (h->dynindx, R_BFIN_GOT);
rela.r_addend = 0;
}
characters. */
/* We can only relocate absolute longword relocs at run time. */
- if (ELF32_R_TYPE (irel->r_info) != (int) R_byte4_data)
+ if (ELF32_R_TYPE (irel->r_info) != (int) R_BFIN_BYTE4_DATA)
{
*errmsg = _("unsupported reloc type");
bfd_set_error (bfd_error_bad_value);
#ifndef _ELF_BFIN_H
#define _ELF_BFIN_H
-
+
#include "elf/reloc-macros.h"
START_RELOC_NUMBERS (elf_bfin_reloc_type)
- RELOC_NUMBER (R_unused0, 0x00) /* relocation type 0 is not defined*/
- RELOC_NUMBER (R_pcrel5m2, 0x01) /*LSETUP part a*/
- RELOC_NUMBER (R_unused1, 0x02) /* relocation type 2 is not defined*/
- RELOC_NUMBER (R_pcrel10, 0x03) /* type 3, 0x00) if cc jump <target> */
- RELOC_NUMBER (R_pcrel12_jump, 0x04) /* type 4, 0x00) jump <target> */
- RELOC_NUMBER (R_rimm16, 0x05) /* type 0x5, 0x00) rN = <target> */
- RELOC_NUMBER (R_luimm16, 0x06) /* # 0x6, 0x00) preg.l=<target> Load imm 16 to lower half */
- RELOC_NUMBER (R_huimm16, 0x07) /* # 0x7, 0x00) preg.h=<target> Load imm 16 to upper half*/
- RELOC_NUMBER (R_pcrel12_jump_s, 0x08) /* # 0x8 jump.s <target> */
- RELOC_NUMBER (R_pcrel24_jump_x, 0x09) /* # 0x9 jump.x <target> */
- RELOC_NUMBER (R_pcrel24, 0x0a) /* # 0xa call <target> , 0x00) not expandable*/
- RELOC_NUMBER (R_unusedb, 0x0b) /* # 0xb not generated */
- RELOC_NUMBER (R_unusedc, 0x0c) /* # 0xc not used */
- RELOC_NUMBER (R_pcrel24_jump_l, 0x0d) /*0xd jump.l <target>*/
- RELOC_NUMBER (R_pcrel24_call_x, 0x0e) /* 0xE, 0x00) call.x <target> if <target> is above 24 bit limit call through P1 */
- RELOC_NUMBER (R_var_eq_symb, 0x0f) /* 0xf, 0x00) linker should treat it same as 0x12 */
- RELOC_NUMBER (R_byte_data, 0x10) /* 0x10, 0x00) .byte var = symbol */
- RELOC_NUMBER (R_byte2_data, 0x11) /* 0x11, 0x00) .byte2 var = symbol */
- RELOC_NUMBER (R_byte4_data, 0x12) /* 0x12, 0x00) .byte4 var = symbol and .var var=symbol */
- RELOC_NUMBER (R_pcrel11, 0x13) /* 0x13, 0x00) lsetup part b */
+ RELOC_NUMBER (R_BFIN_UNUSED0, 0x00) /* relocation type 0 is not defined */
+ RELOC_NUMBER (R_BFIN_PCREL5M2, 0x01) /* LSETUP part a */
+ RELOC_NUMBER (R_BFIN_UNUSED1, 0x02) /* relocation type 2 is not defined */
+ RELOC_NUMBER (R_BFIN_PCREL10, 0x03) /* type 3, 0x00) if cc jump <target> */
+ RELOC_NUMBER (R_BFIN_PCREL12_JUMP, 0x04) /* type 4, 0x00) jump <target> */
+ RELOC_NUMBER (R_BFIN_RIMM16, 0x05) /* type 0x5, 0x00) rN = <target> */
+ RELOC_NUMBER (R_BFIN_LUIMM16, 0x06) /* # 0x6, 0x00) preg.l=<target> Load imm 16 to lower half */
+ RELOC_NUMBER (R_BFIN_HUIMM16, 0x07) /* # 0x7, 0x00) preg.h=<target> Load imm 16 to upper half */
+ RELOC_NUMBER (R_BFIN_PCREL12_JUMP_S, 0x08) /* # 0x8 jump.s <target> */
+ RELOC_NUMBER (R_BFIN_PCREL24_JUMP_X, 0x09) /* # 0x9 jump.x <target> */
+ RELOC_NUMBER (R_BFIN_PCREL24, 0x0a) /* # 0xa call <target> , 0x00) not expandable */
+ RELOC_NUMBER (R_BFIN_UNUSEDB, 0x0b) /* # 0xb not generated */
+ RELOC_NUMBER (R_BFIN_UNUSEDC, 0x0c) /* # 0xc not used */
+ RELOC_NUMBER (R_BFIN_PCREL24_JUMP_L, 0x0d) /* 0xd jump.l <target> */
+ RELOC_NUMBER (R_BFIN_PCREL24_CALL_X, 0x0e) /* 0xE, 0x00) call.x <target> if <target> is above 24 bit limit call through P1 */
+ RELOC_NUMBER (R_BFIN_VAR_EQ_SYMB, 0x0f) /* 0xf, 0x00) linker should treat it same as 0x12 */
+ RELOC_NUMBER (R_BFIN_BYTE_DATA, 0x10) /* 0x10, 0x00) .byte var = symbol */
+ RELOC_NUMBER (R_BFIN_BYTE2_DATA, 0x11) /* 0x11, 0x00) .byte2 var = symbol */
+ RELOC_NUMBER (R_BFIN_BYTE4_DATA, 0x12) /* 0x12, 0x00) .byte4 var = symbol and .var var=symbol */
+ RELOC_NUMBER (R_BFIN_PCREL11, 0x13) /* 0x13, 0x00) lsetup part b */
RELOC_NUMBER (R_BFIN_GOT17M4, 0x14)
RELOC_NUMBER (R_BFIN_GOTHI, 0x15)
RELOC_NUMBER (R_BFIN_GOTLO, 0x16)
RELOC_NUMBER (R_BFIN_GOTOFFHI, 0x20)
RELOC_NUMBER (R_BFIN_GOTOFFLO, 0x21)
- RELOC_NUMBER (R_push, 0xE0)
- RELOC_NUMBER (R_const, 0xE1)
- RELOC_NUMBER (R_add, 0xE2)
- RELOC_NUMBER (R_sub, 0xE3)
- RELOC_NUMBER (R_mult, 0xE4)
- RELOC_NUMBER (R_div, 0xE5)
- RELOC_NUMBER (R_mod, 0xE6)
- RELOC_NUMBER (R_lshift, 0xE7)
- RELOC_NUMBER (R_rshift, 0xE8)
- RELOC_NUMBER (R_and, 0xE9)
- RELOC_NUMBER (R_or, 0xEA)
- RELOC_NUMBER (R_xor, 0xEB)
- RELOC_NUMBER (R_land, 0xEC)
- RELOC_NUMBER (R_lor, 0xED)
- RELOC_NUMBER (R_len, 0xEE)
- RELOC_NUMBER (R_neg, 0xEF)
- RELOC_NUMBER (R_comp, 0xF0)
- RELOC_NUMBER (R_page, 0xF1)
- RELOC_NUMBER (R_hwpage, 0xF2)
- RELOC_NUMBER (R_addr, 0xF3)
- RELOC_NUMBER (R_pltpc, 0x40) /* PLT gnu only relocation */
- RELOC_NUMBER (R_got, 0x41) /* GOT gnu only relocation */
+ RELOC_NUMBER (R_BFIN_PUSH, 0xE0)
+ RELOC_NUMBER (R_BFIN_CONST, 0xE1)
+ RELOC_NUMBER (R_BFIN_ADD, 0xE2)
+ RELOC_NUMBER (R_BFIN_SUB, 0xE3)
+ RELOC_NUMBER (R_BFIN_MULT, 0xE4)
+ RELOC_NUMBER (R_BFIN_DIV, 0xE5)
+ RELOC_NUMBER (R_BFIN_MOD, 0xE6)
+ RELOC_NUMBER (R_BFIN_LSHIFT, 0xE7)
+ RELOC_NUMBER (R_BFIN_RSHIFT, 0xE8)
+ RELOC_NUMBER (R_BFIN_AND, 0xE9)
+ RELOC_NUMBER (R_BFIN_OR, 0xEA)
+ RELOC_NUMBER (R_BFIN_XOR, 0xEB)
+ RELOC_NUMBER (R_BFIN_LAND, 0xEC)
+ RELOC_NUMBER (R_BFIN_LOR, 0xED)
+ RELOC_NUMBER (R_BFIN_LEN, 0xEE)
+ RELOC_NUMBER (R_BFIN_NEG, 0xEF)
+ RELOC_NUMBER (R_BFIN_COMP, 0xF0)
+ RELOC_NUMBER (R_BFIN_PAGE, 0xF1)
+ RELOC_NUMBER (R_BFIN_HWPAGE, 0xF2)
+ RELOC_NUMBER (R_BFIN_ADDR, 0xF3)
+ RELOC_NUMBER (R_BFIN_PLTPC, 0x40) /* PLT gnu only relocation */
+ RELOC_NUMBER (R_BFIN_GOT, 0x41) /* GOT gnu only relocation */
RELOC_NUMBER (R_BFIN_GNU_VTINHERIT, 0x42) /* C++, gnu only */
RELOC_NUMBER (R_BFIN_GNU_VTENTRY, 0x43) /* C++, gnu only */
-END_RELOC_NUMBERS (R_max)
+END_RELOC_NUMBERS (R_BFIN_max)
/* Processor specific flags for the ELF header e_flags field. */
#define EF_BFIN_PIC 0x00000001 /* -fpic */