This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Blackfin: Rename the relocations
- From: Bernd Schmidt <bernds_cb1 at t-online dot de>
- To: binutils at sources dot redhat dot com
- Cc: Mike Frysinger <vapier dot adi at gmail dot com>
- Date: Sun, 09 Aug 2009 18:44:02 +0100
- Subject: Blackfin: Rename the relocations
This is a patch by Mike Frysinger which gives the Blackfin-specific
relocs better names. We've had this in our local tree for a while, and
some other tools (such as elf2flt) don't build without it anymore.
Committed.
Bernd
--
This footer brought to you by insane German lawmakers.
Analog Devices GmbH Wilhelm-Wagenfeld-Str. 6 80807 Muenchen
Sitz der Gesellschaft Muenchen, Registergericht Muenchen HRB 40368
Geschaeftsfuehrer Thomas Wessel, William A. Martin, Margaret Seif
Index: bfd/ChangeLog
===================================================================
RCS file: /cvs/src/src/bfd/ChangeLog,v
retrieving revision 1.4726
diff -c -p -r1.4726 ChangeLog
*** bfd/ChangeLog 8 Aug 2009 01:43:28 -0000 1.4726
--- bfd/ChangeLog 9 Aug 2009 16:39:30 -0000
***************
*** 1,3 ****
--- 1,13 ----
+ 2006-08-09 Bernd Schmidt <bernd.schmidt@analog.com>
+
+ From Mike Frysinger <michael.frysinger@analog.com>
+ * elf32-bfin.c (bfin_howto_table, bfin_reloc_map, bfin_check_relocs,
+ bfin_final_link_relocate, bfin_relocate_section, bfin_gc_sweep_hook,
+ _bfinfdpic_emit_got_relocs_plt_entries, bfinfdpic_relocate_section,
+ bfinfdpic_gc_sweep_hook, bfinfdpic_check_relocs,
+ bfin_finish_dynamic_symbol, bfd_bfin_elf32_create_embedded_relocs):
+ Adjust to match the renamed reloc definitions.
+
2009-08-08 Alan Modra <amodra@bigpond.net.au>
PR 10494
Index: bfd/elf32-bfin.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-bfin.c,v
retrieving revision 1.38
diff -c -p -r1.38 elf32-bfin.c
*** bfd/elf32-bfin.c 10 Jul 2009 15:26:56 -0000 1.38
--- bfd/elf32-bfin.c 9 Aug 2009 16:39:31 -0000
*************** bfin_bfd_reloc (bfd *abfd,
*** 421,427 ****
static reloc_howto_type bfin_howto_table [] =
{
/* This reloc does nothing. . */
! HOWTO (R_unused0, /* type. */
0, /* rightshift. */
2, /* size (0 = byte, 1 = short, 2 = long). */
32, /* bitsize. */
--- 421,427 ----
static reloc_howto_type bfin_howto_table [] =
{
/* This reloc does nothing. . */
! HOWTO (R_BFIN_UNUSED0, /* type. */
0, /* rightshift. */
2, /* size (0 = byte, 1 = short, 2 = long). */
32, /* bitsize. */
*************** static reloc_howto_type bfin_howto_table
*** 429,441 ****
0, /* bitpos. */
complain_overflow_bitfield, /* complain_on_overflow. */
bfd_elf_generic_reloc, /* special_function. */
! "R_unused0", /* name. */
FALSE, /* partial_inplace. */
0, /* src_mask. */
0, /* dst_mask. */
FALSE), /* pcrel_offset. */
! HOWTO (R_pcrel5m2, /* type. */
1, /* rightshift. */
1, /* size (0 = byte, 1 = short, 2 = long).. */
4, /* bitsize. */
--- 429,441 ----
0, /* bitpos. */
complain_overflow_bitfield, /* complain_on_overflow. */
bfd_elf_generic_reloc, /* special_function. */
! "R_BFIN_UNUSED0", /* name. */
FALSE, /* partial_inplace. */
0, /* src_mask. */
0, /* dst_mask. */
FALSE), /* pcrel_offset. */
! HOWTO (R_BFIN_PCREL5M2, /* type. */
1, /* rightshift. */
1, /* size (0 = byte, 1 = short, 2 = long).. */
4, /* bitsize. */
*************** static reloc_howto_type bfin_howto_table
*** 443,455 ****
0, /* bitpos. */
complain_overflow_unsigned, /* complain_on_overflow. */
bfin_bfd_reloc, /* special_function. */
! "R_pcrel5m2", /* name. */
FALSE, /* partial_inplace. */
0, /* src_mask. */
0x0000000F, /* dst_mask. */
FALSE), /* pcrel_offset. */
! HOWTO (R_unused1, /* type. */
0, /* rightshift. */
2, /* size (0 = byte, 1 = short, 2 = long). */
32, /* bitsize. */
--- 443,455 ----
0, /* bitpos. */
complain_overflow_unsigned, /* complain_on_overflow. */
bfin_bfd_reloc, /* special_function. */
! "R_BFIN_PCREL5M2", /* name. */
FALSE, /* partial_inplace. */
0, /* src_mask. */
0x0000000F, /* dst_mask. */
FALSE), /* pcrel_offset. */
! HOWTO (R_BFIN_UNUSED1, /* type. */
0, /* rightshift. */
2, /* size (0 = byte, 1 = short, 2 = long). */
32, /* bitsize. */
*************** static reloc_howto_type bfin_howto_table
*** 457,469 ****
0, /* bitpos. */
complain_overflow_bitfield, /* complain_on_overflow. */
bfd_elf_generic_reloc, /* special_function. */
! "R_unused1", /* name. */
FALSE, /* partial_inplace. */
0, /* src_mask. */
0, /* dst_mask. */
FALSE), /* pcrel_offset. */
! HOWTO (R_pcrel10, /* type. */
1, /* rightshift. */
1, /* size (0 = byte, 1 = short, 2 = long). */
10, /* bitsize. */
--- 457,469 ----
0, /* bitpos. */
complain_overflow_bitfield, /* complain_on_overflow. */
bfd_elf_generic_reloc, /* special_function. */
! "R_BFIN_UNUSED1", /* name. */
FALSE, /* partial_inplace. */
0, /* src_mask. */
0, /* dst_mask. */
FALSE), /* pcrel_offset. */
! HOWTO (R_BFIN_PCREL10, /* type. */
1, /* rightshift. */
1, /* size (0 = byte, 1 = short, 2 = long). */
10, /* bitsize. */
*************** static reloc_howto_type bfin_howto_table
*** 471,483 ****
0, /* bitpos. */
complain_overflow_signed, /* complain_on_overflow. */
bfin_bfd_reloc, /* special_function. */
! "R_pcrel10", /* name. */
FALSE, /* partial_inplace. */
0, /* src_mask. */
0x000003FF, /* dst_mask. */
TRUE), /* pcrel_offset. */
! HOWTO (R_pcrel12_jump, /* type. */
1, /* rightshift. */
/* the offset is actually 13 bit
aligned on a word boundary so
--- 471,483 ----
0, /* bitpos. */
complain_overflow_signed, /* complain_on_overflow. */
bfin_bfd_reloc, /* special_function. */
! "R_BFIN_PCREL10", /* name. */
FALSE, /* partial_inplace. */
0, /* src_mask. */
0x000003FF, /* dst_mask. */
TRUE), /* pcrel_offset. */
! HOWTO (R_BFIN_PCREL12_JUMP, /* type. */
1, /* rightshift. */
/* the offset is actually 13 bit
aligned on a word boundary so
*************** static reloc_howto_type bfin_howto_table
*** 489,501 ****
0, /* bitpos. */
complain_overflow_signed, /* complain_on_overflow. */
bfin_bfd_reloc, /* special_function. */
! "R_pcrel12_jump", /* name. */
FALSE, /* partial_inplace. */
0, /* src_mask. */
0x0FFF, /* dst_mask. */
TRUE), /* pcrel_offset. */
! HOWTO (R_rimm16, /* type. */
0, /* rightshift. */
1, /* size (0 = byte, 1 = short, 2 = long). */
16, /* bitsize. */
--- 489,501 ----
0, /* bitpos. */
complain_overflow_signed, /* complain_on_overflow. */
bfin_bfd_reloc, /* special_function. */
! "R_BFIN_PCREL12_JUMP", /* name. */
FALSE, /* partial_inplace. */
0, /* src_mask. */
0x0FFF, /* dst_mask. */
TRUE), /* pcrel_offset. */
! HOWTO (R_BFIN_RIMM16, /* type. */
0, /* rightshift. */
1, /* size (0 = byte, 1 = short, 2 = long). */
16, /* bitsize. */
*************** static reloc_howto_type bfin_howto_table
*** 503,515 ****
0, /* bitpos. */
complain_overflow_signed, /* complain_on_overflow. */
bfin_imm16_reloc, /* special_function. */
! "R_rimm16", /* name. */
FALSE, /* partial_inplace. */
0, /* src_mask. */
0x0000FFFF, /* dst_mask. */
TRUE), /* pcrel_offset. */
! HOWTO (R_luimm16, /* type. */
0, /* rightshift. */
1, /* size (0 = byte, 1 = short, 2 = long). */
16, /* bitsize. */
--- 503,515 ----
0, /* bitpos. */
complain_overflow_signed, /* complain_on_overflow. */
bfin_imm16_reloc, /* special_function. */
! "R_BFIN_RIMM16", /* name. */
FALSE, /* partial_inplace. */
0, /* src_mask. */
0x0000FFFF, /* dst_mask. */
TRUE), /* pcrel_offset. */
! HOWTO (R_BFIN_LUIMM16, /* type. */
0, /* rightshift. */
1, /* size (0 = byte, 1 = short, 2 = long). */
16, /* bitsize. */
*************** static reloc_howto_type bfin_howto_table
*** 517,529 ****
0, /* bitpos. */
complain_overflow_dont, /* complain_on_overflow. */
bfin_imm16_reloc, /* special_function. */
! "R_luimm16", /* name. */
FALSE, /* partial_inplace. */
0, /* src_mask. */
0x0000FFFF, /* dst_mask. */
TRUE), /* pcrel_offset. */
! HOWTO (R_huimm16, /* type. */
16, /* rightshift. */
1, /* size (0 = byte, 1 = short, 2 = long). */
16, /* bitsize. */
--- 517,529 ----
0, /* bitpos. */
complain_overflow_dont, /* complain_on_overflow. */
bfin_imm16_reloc, /* special_function. */
! "R_BFIN_LUIMM16", /* name. */
FALSE, /* partial_inplace. */
0, /* src_mask. */
0x0000FFFF, /* dst_mask. */
TRUE), /* pcrel_offset. */
! HOWTO (R_BFIN_HUIMM16, /* type. */
16, /* rightshift. */
1, /* size (0 = byte, 1 = short, 2 = long). */
16, /* bitsize. */
*************** static reloc_howto_type bfin_howto_table
*** 531,543 ****
0, /* bitpos. */
complain_overflow_unsigned, /* complain_on_overflow. */
bfin_imm16_reloc, /* special_function. */
! "R_huimm16", /* name. */
FALSE, /* partial_inplace. */
0, /* src_mask. */
0x0000FFFF, /* dst_mask. */
TRUE), /* pcrel_offset. */
! HOWTO (R_pcrel12_jump_s, /* type. */
1, /* rightshift. */
1, /* size (0 = byte, 1 = short, 2 = long). */
12, /* bitsize. */
--- 531,543 ----
0, /* bitpos. */
complain_overflow_unsigned, /* complain_on_overflow. */
bfin_imm16_reloc, /* special_function. */
! "R_BFIN_HUIMM16", /* name. */
FALSE, /* partial_inplace. */
0, /* src_mask. */
0x0000FFFF, /* dst_mask. */
TRUE), /* pcrel_offset. */
! HOWTO (R_BFIN_PCREL12_JUMP_S, /* type. */
1, /* rightshift. */
1, /* size (0 = byte, 1 = short, 2 = long). */
12, /* bitsize. */
*************** static reloc_howto_type bfin_howto_table
*** 545,557 ****
0, /* bitpos. */
complain_overflow_signed, /* complain_on_overflow. */
bfin_bfd_reloc, /* special_function. */
! "R_pcrel12_jump_s", /* name. */
FALSE, /* partial_inplace. */
0, /* src_mask. */
0x00000FFF, /* dst_mask. */
TRUE), /* pcrel_offset. */
! HOWTO (R_pcrel24_jump_x, /* type. */
1, /* rightshift. */
2, /* size (0 = byte, 1 = short, 2 = long). */
24, /* bitsize. */
--- 545,557 ----
0, /* bitpos. */
complain_overflow_signed, /* complain_on_overflow. */
bfin_bfd_reloc, /* special_function. */
! "R_BFIN_PCREL12_JUMP_S", /* name. */
FALSE, /* partial_inplace. */
0, /* src_mask. */
0x00000FFF, /* dst_mask. */
TRUE), /* pcrel_offset. */
! HOWTO (R_BFIN_PCREL24_JUMP_X, /* type. */
1, /* rightshift. */
2, /* size (0 = byte, 1 = short, 2 = long). */
24, /* bitsize. */
*************** static reloc_howto_type bfin_howto_table
*** 559,571 ****
0, /* bitpos. */
complain_overflow_signed, /* complain_on_overflow. */
bfin_pcrel24_reloc, /* special_function. */
! "R_pcrel24_jump_x", /* name. */
FALSE, /* partial_inplace. */
0, /* src_mask. */
0x00FFFFFF, /* dst_mask. */
TRUE), /* pcrel_offset. */
! HOWTO (R_pcrel24, /* type. */
1, /* rightshift. */
2, /* size (0 = byte, 1 = short, 2 = long). */
24, /* bitsize. */
--- 559,571 ----
0, /* bitpos. */
complain_overflow_signed, /* complain_on_overflow. */
bfin_pcrel24_reloc, /* special_function. */
! "R_BFIN_PCREL24_JUMP_X", /* name. */
FALSE, /* partial_inplace. */
0, /* src_mask. */
0x00FFFFFF, /* dst_mask. */
TRUE), /* pcrel_offset. */
! HOWTO (R_BFIN_PCREL24, /* type. */
1, /* rightshift. */
2, /* size (0 = byte, 1 = short, 2 = long). */
24, /* bitsize. */
*************** static reloc_howto_type bfin_howto_table
*** 573,585 ****
0, /* bitpos. */
complain_overflow_signed, /* complain_on_overflow. */
bfin_pcrel24_reloc, /* special_function. */
! "R_pcrel24", /* name. */
FALSE, /* partial_inplace. */
0, /* src_mask. */
0x00FFFFFF, /* dst_mask. */
TRUE), /* pcrel_offset. */
! HOWTO (R_unusedb, /* type. */
0, /* rightshift. */
2, /* size (0 = byte, 1 = short, 2 = long). */
32, /* bitsize. */
--- 573,585 ----
0, /* bitpos. */
complain_overflow_signed, /* complain_on_overflow. */
bfin_pcrel24_reloc, /* special_function. */
! "R_BFIN_PCREL24", /* name. */
FALSE, /* partial_inplace. */
0, /* src_mask. */
0x00FFFFFF, /* dst_mask. */
TRUE), /* pcrel_offset. */
! HOWTO (R_BFIN_UNUSEDB, /* type. */
0, /* rightshift. */
2, /* size (0 = byte, 1 = short, 2 = long). */
32, /* bitsize. */
*************** static reloc_howto_type bfin_howto_table
*** 587,599 ****
0, /* bitpos. */
complain_overflow_dont, /* complain_on_overflow. */
bfd_elf_generic_reloc, /* special_function. */
! "R_unusedb", /* name. */
FALSE, /* partial_inplace. */
0, /* src_mask. */
0, /* dst_mask. */
FALSE), /* pcrel_offset. */
! HOWTO (R_unusedc, /* type. */
0, /* rightshift. */
2, /* size (0 = byte, 1 = short, 2 = long). */
32, /* bitsize. */
--- 587,599 ----
0, /* bitpos. */
complain_overflow_dont, /* complain_on_overflow. */
bfd_elf_generic_reloc, /* special_function. */
! "R_BFIN_UNUSEDB", /* name. */
FALSE, /* partial_inplace. */
0, /* src_mask. */
0, /* dst_mask. */
FALSE), /* pcrel_offset. */
! HOWTO (R_BFIN_UNUSEDC, /* type. */
0, /* rightshift. */
2, /* size (0 = byte, 1 = short, 2 = long). */
32, /* bitsize. */
*************** static reloc_howto_type bfin_howto_table
*** 601,613 ****
0, /* bitpos. */
complain_overflow_dont, /* complain_on_overflow. */
bfd_elf_generic_reloc, /* special_function. */
! "R_unusedc", /* name. */
FALSE, /* partial_inplace. */
0, /* src_mask. */
0, /* dst_mask. */
FALSE), /* pcrel_offset. */
! HOWTO (R_pcrel24_jump_l, /* type. */
1, /* rightshift. */
2, /* size (0 = byte, 1 = short, 2 = long). */
24, /* bitsize. */
--- 601,613 ----
0, /* bitpos. */
complain_overflow_dont, /* complain_on_overflow. */
bfd_elf_generic_reloc, /* special_function. */
! "R_BFIN_UNUSEDC", /* name. */
FALSE, /* partial_inplace. */
0, /* src_mask. */
0, /* dst_mask. */
FALSE), /* pcrel_offset. */
! HOWTO (R_BFIN_PCREL24_JUMP_L, /* type. */
1, /* rightshift. */
2, /* size (0 = byte, 1 = short, 2 = long). */
24, /* bitsize. */
*************** static reloc_howto_type bfin_howto_table
*** 615,627 ****
0, /* bitpos. */
complain_overflow_signed, /* complain_on_overflow. */
bfin_pcrel24_reloc, /* special_function. */
! "R_pcrel24_jump_l", /* name. */
FALSE, /* partial_inplace. */
0, /* src_mask. */
0x00FFFFFF, /* dst_mask. */
TRUE), /* pcrel_offset. */
! HOWTO (R_pcrel24_call_x, /* type. */
1, /* rightshift. */
2, /* size (0 = byte, 1 = short, 2 = long). */
24, /* bitsize. */
--- 615,627 ----
0, /* bitpos. */
complain_overflow_signed, /* complain_on_overflow. */
bfin_pcrel24_reloc, /* special_function. */
! "R_BFIN_PCREL24_JUMP_L", /* name. */
FALSE, /* partial_inplace. */
0, /* src_mask. */
0x00FFFFFF, /* dst_mask. */
TRUE), /* pcrel_offset. */
! HOWTO (R_BFIN_PCREL24_CALL_X, /* type. */
1, /* rightshift. */
2, /* size (0 = byte, 1 = short, 2 = long). */
24, /* bitsize. */
*************** static reloc_howto_type bfin_howto_table
*** 629,641 ****
0, /* bitpos. */
complain_overflow_signed, /* complain_on_overflow. */
bfin_pcrel24_reloc, /* special_function. */
! "R_pcrel24_call_x", /* name. */
FALSE, /* partial_inplace. */
0, /* src_mask. */
0x00FFFFFF, /* dst_mask. */
TRUE), /* pcrel_offset. */
! HOWTO (R_var_eq_symb, /* type. */
0, /* rightshift. */
2, /* size (0 = byte, 1 = short, 2 = long). */
32, /* bitsize. */
--- 629,641 ----
0, /* bitpos. */
complain_overflow_signed, /* complain_on_overflow. */
bfin_pcrel24_reloc, /* special_function. */
! "R_BFIN_PCREL24_CALL_X", /* name. */
FALSE, /* partial_inplace. */
0, /* src_mask. */
0x00FFFFFF, /* dst_mask. */
TRUE), /* pcrel_offset. */
! HOWTO (R_BFIN_VAR_EQ_SYMB, /* type. */
0, /* rightshift. */
2, /* size (0 = byte, 1 = short, 2 = long). */
32, /* bitsize. */
*************** static reloc_howto_type bfin_howto_table
*** 643,655 ****
0, /* bitpos. */
complain_overflow_bitfield, /* complain_on_overflow. */
bfin_bfd_reloc, /* special_function. */
! "R_var_eq_symb", /* name. */
FALSE, /* partial_inplace. */
0, /* src_mask. */
0, /* dst_mask. */
FALSE), /* pcrel_offset. */
! HOWTO (R_byte_data, /* type. */
0, /* rightshift. */
0, /* size (0 = byte, 1 = short, 2 = long). */
8, /* bitsize. */
--- 643,655 ----
0, /* bitpos. */
complain_overflow_bitfield, /* complain_on_overflow. */
bfin_bfd_reloc, /* special_function. */
! "R_BFIN_VAR_EQ_SYMB", /* name. */
FALSE, /* partial_inplace. */
0, /* src_mask. */
0, /* dst_mask. */
FALSE), /* pcrel_offset. */
! HOWTO (R_BFIN_BYTE_DATA, /* type. */
0, /* rightshift. */
0, /* size (0 = byte, 1 = short, 2 = long). */
8, /* bitsize. */
*************** static reloc_howto_type bfin_howto_table
*** 657,669 ****
0, /* bitpos. */
complain_overflow_unsigned, /* complain_on_overflow. */
bfin_bfd_reloc, /* special_function. */
! "R_byte_data", /* name. */
FALSE, /* partial_inplace. */
0, /* src_mask. */
0xFF, /* dst_mask. */
TRUE), /* pcrel_offset. */
! HOWTO (R_byte2_data, /* type. */
0, /* rightshift. */
1, /* size (0 = byte, 1 = short, 2 = long). */
16, /* bitsize. */
--- 657,669 ----
0, /* bitpos. */
complain_overflow_unsigned, /* complain_on_overflow. */
bfin_bfd_reloc, /* special_function. */
! "R_BFIN_BYTE_DATA", /* name. */
FALSE, /* partial_inplace. */
0, /* src_mask. */
0xFF, /* dst_mask. */
TRUE), /* pcrel_offset. */
! HOWTO (R_BFIN_BYTE2_DATA, /* type. */
0, /* rightshift. */
1, /* size (0 = byte, 1 = short, 2 = long). */
16, /* bitsize. */
*************** static reloc_howto_type bfin_howto_table
*** 671,683 ****
0, /* bitpos. */
complain_overflow_signed, /* complain_on_overflow. */
bfin_bfd_reloc, /* special_function. */
! "R_byte2_data", /* name. */
FALSE, /* partial_inplace. */
0, /* src_mask. */
0xFFFF, /* dst_mask. */
TRUE), /* pcrel_offset. */
! HOWTO (R_byte4_data, /* type. */
0, /* rightshift. */
2, /* size (0 = byte, 1 = short, 2 = long). */
32, /* bitsize. */
--- 671,683 ----
0, /* bitpos. */
complain_overflow_signed, /* complain_on_overflow. */
bfin_bfd_reloc, /* special_function. */
! "R_BFIN_BYTE2_DATA", /* name. */
FALSE, /* partial_inplace. */
0, /* src_mask. */
0xFFFF, /* dst_mask. */
TRUE), /* pcrel_offset. */
! HOWTO (R_BFIN_BYTE4_DATA, /* type. */
0, /* rightshift. */
2, /* size (0 = byte, 1 = short, 2 = long). */
32, /* bitsize. */
*************** static reloc_howto_type bfin_howto_table
*** 685,697 ****
0, /* bitpos. */
complain_overflow_unsigned, /* complain_on_overflow. */
bfin_byte4_reloc, /* special_function. */
! "R_byte4_data", /* name. */
FALSE, /* partial_inplace. */
0, /* src_mask. */
0xFFFFFFFF, /* dst_mask. */
TRUE), /* pcrel_offset. */
! HOWTO (R_pcrel11, /* type. */
1, /* rightshift. */
1, /* size (0 = byte, 1 = short, 2 = long). */
10, /* bitsize. */
--- 685,697 ----
0, /* bitpos. */
complain_overflow_unsigned, /* complain_on_overflow. */
bfin_byte4_reloc, /* special_function. */
! "R_BFIN_BYTE4_DATA", /* name. */
FALSE, /* partial_inplace. */
0, /* src_mask. */
0xFFFFFFFF, /* dst_mask. */
TRUE), /* pcrel_offset. */
! HOWTO (R_BFIN_PCREL11, /* type. */
1, /* rightshift. */
1, /* size (0 = byte, 1 = short, 2 = long). */
10, /* bitsize. */
*************** static reloc_howto_type bfin_howto_table
*** 699,705 ****
0, /* bitpos. */
complain_overflow_unsigned, /* complain_on_overflow. */
bfin_bfd_reloc, /* special_function. */
! "R_pcrel11", /* name. */
FALSE, /* partial_inplace. */
0, /* src_mask. */
0x000003FF, /* dst_mask. */
--- 699,705 ----
0, /* bitpos. */
complain_overflow_unsigned, /* complain_on_overflow. */
bfin_bfd_reloc, /* special_function. */
! "R_BFIN_PCREL11", /* name. */
FALSE, /* partial_inplace. */
0, /* src_mask. */
0x000003FF, /* dst_mask. */
*************** static reloc_howto_type bfin_howto_table
*** 931,937 ****
static reloc_howto_type bfin_gnuext_howto_table [] =
{
! HOWTO (R_pltpc, /* type. */
0, /* rightshift. */
1, /* size (0 = byte, 1 = short, 2 = long). */
16, /* bitsize. */
--- 931,937 ----
static reloc_howto_type bfin_gnuext_howto_table [] =
{
! HOWTO (R_BFIN_PLTPC, /* type. */
0, /* rightshift. */
1, /* size (0 = byte, 1 = short, 2 = long). */
16, /* bitsize. */
*************** static reloc_howto_type bfin_gnuext_howt
*** 939,951 ****
0, /* bitpos. */
complain_overflow_bitfield, /* complain_on_overflow. */
bfin_pltpc_reloc, /* special_function. */
! "R_pltpc", /* name. */
FALSE, /* partial_inplace. */
0xffff, /* src_mask. */
0xffff, /* dst_mask. */
FALSE), /* pcrel_offset. */
! HOWTO (R_got, /* type. */
0, /* rightshift. */
1, /* size (0 = byte, 1 = short, 2 = long). */
16, /* bitsize. */
--- 939,951 ----
0, /* bitpos. */
complain_overflow_bitfield, /* complain_on_overflow. */
bfin_pltpc_reloc, /* special_function. */
! "R_BFIN_PLTPC", /* name. */
FALSE, /* partial_inplace. */
0xffff, /* src_mask. */
0xffff, /* dst_mask. */
FALSE), /* pcrel_offset. */
! HOWTO (R_BFIN_GOT, /* type. */
0, /* rightshift. */
1, /* size (0 = byte, 1 = short, 2 = long). */
16, /* bitsize. */
*************** static reloc_howto_type bfin_gnuext_howt
*** 953,959 ****
0, /* bitpos. */
complain_overflow_bitfield, /* complain_on_overflow. */
bfd_elf_generic_reloc, /* special_function. */
! "R_got", /* name. */
FALSE, /* partial_inplace. */
0x7fff, /* src_mask. */
0x7fff, /* dst_mask. */
--- 953,959 ----
0, /* bitpos. */
complain_overflow_bitfield, /* complain_on_overflow. */
bfd_elf_generic_reloc, /* special_function. */
! "R_BFIN_GOT", /* name. */
FALSE, /* partial_inplace. */
0x7fff, /* src_mask. */
0x7fff, /* dst_mask. */
*************** struct bfin_reloc_map
*** 998,1024 ****
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_BFIN_GOT17M4, R_BFIN_GOT17M4 },
{ BFD_RELOC_BFIN_GOTHI, R_BFIN_GOTHI },
--- 998,1024 ----
static const struct bfin_reloc_map bfin_reloc_map [] =
{
! { 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 },
*************** bfin_check_relocs (bfd * abfd,
*** 1191,1197 ****
return FALSE;
break;
! case R_got:
if (h != NULL
&& strcmp (h->root.root.string, "__GLOBAL_OFFSET_TABLE_") == 0)
break;
--- 1191,1197 ----
return FALSE;
break;
! case R_BFIN_GOT:
if (h != NULL
&& strcmp (h->root.root.string, "__GLOBAL_OFFSET_TABLE_") == 0)
break;
*************** bfin_final_link_relocate (Elf_Internal_R
*** 1301,1307 ****
{
int r_type = ELF32_R_TYPE (rel->r_info);
! if (r_type == R_pcrel24 || r_type == R_pcrel24_jump_l)
{
bfd_reloc_status_type r = bfd_reloc_ok;
bfd_vma x;
--- 1301,1307 ----
{
int r_type = ELF32_R_TYPE (rel->r_info);
! if (r_type == R_BFIN_PCREL24 || r_type == R_BFIN_PCREL24_JUMP_L)
{
bfd_reloc_status_type r = bfd_reloc_ok;
bfd_vma x;
*************** bfin_relocate_section (bfd * output_bfd,
*** 1450,1456 ****
case R_BFIN_GNU_VTENTRY:
return bfd_reloc_ok;
! case R_got:
/* Relocation is to the address of the entry for this symbol
in the global offset table. */
if (h != NULL
--- 1450,1456 ----
case R_BFIN_GNU_VTENTRY:
return bfd_reloc_ok;
! case R_BFIN_GOT:
/* Relocation is to the address of the entry for this symbol
in the global offset table. */
if (h != NULL
*************** bfin_relocate_section (bfd * output_bfd,
*** 1543,1549 ****
outrel.r_offset = (sgot->output_section->vma
+ sgot->output_offset + off);
outrel.r_info =
! ELF32_R_INFO (0, R_pcrel24);
outrel.r_addend = relocation;
loc = s->contents;
loc +=
--- 1543,1549 ----
outrel.r_offset = (sgot->output_section->vma
+ sgot->output_offset + off);
outrel.r_info =
! ELF32_R_INFO (0, R_BFIN_PCREL24);
outrel.r_addend = relocation;
loc = s->contents;
loc +=
*************** bfin_gc_sweep_hook (bfd * abfd,
*** 1675,1681 ****
switch (ELF32_R_TYPE (rel->r_info))
{
! case R_got:
r_symndx = ELF32_R_SYM (rel->r_info);
if (r_symndx >= symtab_hdr->sh_info)
{
--- 1675,1681 ----
switch (ELF32_R_TYPE (rel->r_info))
{
! case R_BFIN_GOT:
r_symndx = ELF32_R_SYM (rel->r_info);
if (r_symndx >= symtab_hdr->sh_info)
{
*************** struct bfinfdpic_relocs_info
*** 1893,1899 ****
needed for this symbol. */
unsigned done:1;
! /* The number of R_byte4_data, R_BFIN_FUNCDESC and R_BFIN_FUNCDESC_VALUE
relocations referencing the symbol. */
unsigned relocs32, relocsfd, relocsfdv;
--- 1893,1899 ----
needed for this symbol. */
unsigned done:1;
! /* The number of R_BFIN_BYTE4_DATA, R_BFIN_FUNCDESC and R_BFIN_FUNCDESC_VALUE
relocations referencing the symbol. */
unsigned relocs32, relocsfd, relocsfdv;
*************** _bfinfdpic_emit_got_relocs_plt_entries (
*** 2209,2215 ****
+ bfinfdpic_got_section (info)
->output_section->vma
+ bfinfdpic_got_section (info)->output_offset,
! R_byte4_data, idx, ad, entry);
bfd_put_32 (output_bfd, ad,
bfinfdpic_got_section (info)->contents
--- 2209,2215 ----
+ bfinfdpic_got_section (info)
->output_section->vma
+ bfinfdpic_got_section (info)->output_offset,
! R_BFIN_BYTE4_DATA, idx, ad, entry);
bfd_put_32 (output_bfd, ad,
bfinfdpic_got_section (info)->contents
*************** _bfinfdpic_emit_got_relocs_plt_entries (
*** 2261,2267 ****
so reference it directly. */
if (elf_hash_table (info)->dynamic_sections_created)
BFD_ASSERT (entry->privfd);
! reloc = R_byte4_data;
idx = elf_section_data (bfinfdpic_got_section (info)
->output_section)->dynindx;
ad = bfinfdpic_got_section (info)->output_offset
--- 2261,2267 ----
so reference it directly. */
if (elf_hash_table (info)->dynamic_sections_created)
BFD_ASSERT (entry->privfd);
! reloc = R_BFIN_BYTE4_DATA;
idx = elf_section_data (bfinfdpic_got_section (info)
->output_section)->dynindx;
ad = bfinfdpic_got_section (info)->output_offset
*************** bfinfdpic_relocate_section (bfd * output
*** 2665,2673 ****
switch (r_type)
{
! case R_pcrel24:
! case R_pcrel24_jump_l:
! case R_byte4_data:
if (! IS_FDPIC (output_bfd))
goto non_fdpic;
--- 2665,2673 ----
switch (r_type)
{
! case R_BFIN_PCREL24:
! case R_BFIN_PCREL24_JUMP_L:
! case R_BFIN_BYTE4_DATA:
if (! IS_FDPIC (output_bfd))
goto non_fdpic;
*************** bfinfdpic_relocate_section (bfd * output
*** 2727,2734 ****
switch (r_type)
{
! case R_pcrel24:
! case R_pcrel24_jump_l:
check_segment[0] = isec_segment;
if (! IS_FDPIC (output_bfd))
check_segment[1] = isec_segment;
--- 2727,2734 ----
switch (r_type)
{
! 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;
*************** bfinfdpic_relocate_section (bfd * output
*** 2826,2832 ****
/* Otherwise, we know we have a private function
descriptor, so reference it directly. */
BFD_ASSERT (picrel->privfd);
! r_type = R_byte4_data;
dynindx = elf_section_data (bfinfdpic_got_section (info)
->output_section)->dynindx;
addend = bfinfdpic_got_section (info)->output_offset
--- 2826,2832 ----
/* Otherwise, we know we have a private function
descriptor, so reference it directly. */
BFD_ASSERT (picrel->privfd);
! 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_relocate_section (bfd * output
*** 2893,2899 ****
_bfinfdpic_add_dyn_reloc (output_bfd,
bfinfdpic_gotrel_section (info),
0,
! R_unused0,
dynindx, addend, picrel);
else
_bfinfdpic_add_dyn_reloc (output_bfd,
--- 2893,2899 ----
_bfinfdpic_add_dyn_reloc (output_bfd,
bfinfdpic_gotrel_section (info),
0,
! R_BFIN_UNUSED0,
dynindx, addend, picrel);
else
_bfinfdpic_add_dyn_reloc (output_bfd,
*************** bfinfdpic_relocate_section (bfd * output
*** 2916,2922 ****
check_segment[0] = check_segment[1] = got_segment;
break;
! case R_byte4_data:
if (! IS_FDPIC (output_bfd))
{
check_segment[0] = check_segment[1] = -1;
--- 2916,2922 ----
check_segment[0] = check_segment[1] = got_segment;
break;
! case R_BFIN_BYTE4_DATA:
if (! IS_FDPIC (output_bfd))
{
check_segment[0] = check_segment[1] = -1;
*************** bfinfdpic_relocate_section (bfd * output
*** 3037,3043 ****
if (offset >= (bfd_vma)-2)
_bfinfdpic_add_dyn_reloc (output_bfd,
bfinfdpic_gotrel_section (info),
! 0, R_unused0, dynindx, addend, picrel);
else
_bfinfdpic_add_dyn_reloc (output_bfd,
bfinfdpic_gotrel_section (info),
--- 3037,3043 ----
if (offset >= (bfd_vma)-2)
_bfinfdpic_add_dyn_reloc (output_bfd,
bfinfdpic_gotrel_section (info),
! 0, R_BFIN_UNUSED0, dynindx, addend, picrel);
else
_bfinfdpic_add_dyn_reloc (output_bfd,
bfinfdpic_gotrel_section (info),
*************** bfinfdpic_relocate_section (bfd * output
*** 3153,3160 ****
switch (r_type)
{
! case R_pcrel24:
! case R_pcrel24_jump_l:
if (! IS_FDPIC (output_bfd) || ! picrel->plt)
break;
/* Fall through. */
--- 3153,3160 ----
switch (r_type)
{
! case R_BFIN_PCREL24:
! case R_BFIN_PCREL24_JUMP_L:
if (! IS_FDPIC (output_bfd) || ! picrel->plt)
break;
/* Fall through. */
*************** bfinfdpic_gc_sweep_hook (bfd *abfd,
*** 3284,3291 ****
switch (ELF32_R_TYPE (rel->r_info))
{
! case R_pcrel24:
! case R_pcrel24_jump_l:
picrel->call--;
break;
--- 3284,3291 ----
switch (ELF32_R_TYPE (rel->r_info))
{
! case R_BFIN_PCREL24:
! case R_BFIN_PCREL24_JUMP_L:
picrel->call--;
break;
*************** bfinfdpic_gc_sweep_hook (bfd *abfd,
*** 3295,3301 ****
picrel->relocs32++;
/* Fall through. */
! case R_byte4_data:
picrel->sym--;
if (bfd_get_section_flags (abfd, sec) & SEC_ALLOC)
picrel->relocs32--;
--- 3295,3301 ----
picrel->relocs32++;
/* Fall through. */
! case R_BFIN_BYTE4_DATA:
picrel->sym--;
if (bfd_get_section_flags (abfd, sec) & SEC_ALLOC)
picrel->relocs32--;
*************** bfinfdpic_check_relocs (bfd *abfd, struc
*** 4653,4661 ****
if (! IS_FDPIC (abfd))
goto bad_reloc;
/* Fall through. */
! case R_pcrel24:
! case R_pcrel24_jump_l:
! case R_byte4_data:
if (IS_FDPIC (abfd) && ! dynobj)
{
elf_hash_table (info)->dynobj = dynobj = abfd;
--- 4653,4661 ----
if (! IS_FDPIC (abfd))
goto bad_reloc;
/* Fall through. */
! 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;
*************** bfinfdpic_check_relocs (bfd *abfd, struc
*** 4699,4706 ****
switch (ELF32_R_TYPE (rel->r_info))
{
! case R_pcrel24:
! case R_pcrel24_jump_l:
if (IS_FDPIC (abfd))
picrel->call++;
break;
--- 4699,4706 ----
switch (ELF32_R_TYPE (rel->r_info))
{
! case R_BFIN_PCREL24:
! case R_BFIN_PCREL24_JUMP_L:
if (IS_FDPIC (abfd))
picrel->call++;
break;
*************** bfinfdpic_check_relocs (bfd *abfd, struc
*** 4711,4717 ****
picrel->relocs32--;
/* Fall through. */
! case R_byte4_data:
if (! IS_FDPIC (abfd))
break;
--- 4711,4717 ----
picrel->relocs32--;
/* Fall through. */
! case R_BFIN_BYTE4_DATA:
if (! IS_FDPIC (abfd))
break;
*************** bfinfdpic_check_relocs (bfd *abfd, struc
*** 4774,4783 ****
return FALSE;
break;
! case R_huimm16:
! case R_luimm16:
! case R_pcrel12_jump_s:
! case R_pcrel10:
break;
default:
--- 4774,4783 ----
return FALSE;
break;
! case R_BFIN_HUIMM16:
! case R_BFIN_LUIMM16:
! case R_BFIN_PCREL12_JUMP_S:
! case R_BFIN_PCREL10:
break;
default:
*************** bfin_finish_dynamic_symbol (bfd * output
*** 5094,5100 ****
|| 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_addend = bfd_get_signed_32 (output_bfd,
(sgot->contents
+
--- 5094,5100 ----
|| 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_BFIN_PCREL24);
rela.r_addend = bfd_get_signed_32 (output_bfd,
(sgot->contents
+
*************** bfin_finish_dynamic_symbol (bfd * output
*** 5105,5111 ****
{
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_addend = 0;
}
--- 5105,5111 ----
{
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_BFIN_GOT);
rela.r_addend = 0;
}
*************** bfd_bfin_elf32_create_embedded_relocs (
*** 5500,5506 ****
characters. */
/* We can only relocate absolute longword relocs at run time. */
! if (ELF32_R_TYPE (irel->r_info) != (int) R_byte4_data)
{
*errmsg = _("unsupported reloc type");
bfd_set_error (bfd_error_bad_value);
--- 5500,5506 ----
characters. */
/* We can only relocate absolute longword relocs at run time. */
! if (ELF32_R_TYPE (irel->r_info) != (int) R_BFIN_BYTE4_DATA)
{
*errmsg = _("unsupported reloc type");
bfd_set_error (bfd_error_bad_value);
Index: gas/testsuite/ChangeLog
===================================================================
RCS file: /cvs/src/src/gas/testsuite/ChangeLog,v
retrieving revision 1.1518
diff -c -p -r1.1518 ChangeLog
*** gas/testsuite/ChangeLog 7 Aug 2009 19:30:31 -0000 1.1518
--- gas/testsuite/ChangeLog 9 Aug 2009 16:39:31 -0000
***************
*** 1,3 ****
--- 1,8 ----
+ 2006-08-09 Bernd Schmidt <bernd.schmidt@analog.com>
+
+ From Mike Frysinger <michael.frysinger@analog.com>
+ * gas/bfin/reloc.d: Adjust for the renamed relocations.
+
2009-08-07 Daniel Jacobowitz <dan@codesourcery.com>
* gas/arm/mapping2.s: Test code after .ident.
Index: gas/testsuite/gas/bfin/reloc.d
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/bfin/reloc.d,v
retrieving revision 1.2
diff -c -p -r1.2 reloc.d
*** gas/testsuite/gas/bfin/reloc.d 24 Oct 2005 18:42:37 -0000 1.2
--- gas/testsuite/gas/bfin/reloc.d 9 Aug 2009 16:39:31 -0000
***************
*** 4,20 ****
RELOCATION RECORDS FOR \[\.text\]:
OFFSET TYPE VALUE
! 0*0004 R_pcrel24 _call_data1
! 0*0008 R_rimm16 .data
! 0*000a R_pcrel12_jump_s .text\+0x00000018
! 0*000e R_pcrel24 call_data1\+0x00000008
! 0*0012 R_huimm16 .data\+0x00000002
! 0*0016 R_luimm16 .data\+0x00000004
! 0*001a R_huimm16 load_extern1
RELOCATION RECORDS FOR \[\.data\]:
OFFSET TYPE VALUE
! 0*0006 R_byte_data load_extern1
--- 4,20 ----
RELOCATION RECORDS FOR \[\.text\]:
OFFSET TYPE VALUE
! 0*0004 R_BFIN_PCREL24 _call_data1
! 0*0008 R_BFIN_RIMM16 .data
! 0*000a R_BFIN_PCREL12_JUMP_S .text\+0x00000018
! 0*000e R_BFIN_PCREL24 call_data1\+0x00000008
! 0*0012 R_BFIN_HUIMM16 .data\+0x00000002
! 0*0016 R_BFIN_LUIMM16 .data\+0x00000004
! 0*001a R_BFIN_HUIMM16 load_extern1
RELOCATION RECORDS FOR \[\.data\]:
OFFSET TYPE VALUE
! 0*0006 R_BFIN_BYTE_DATA load_extern1
Index: include/elf/ChangeLog
===================================================================
RCS file: /cvs/src/src/include/elf/ChangeLog,v
retrieving revision 1.376
diff -c -p -r1.376 ChangeLog
*** include/elf/ChangeLog 6 Aug 2009 17:38:03 -0000 1.376
--- include/elf/ChangeLog 9 Aug 2009 16:39:32 -0000
***************
*** 1,3 ****
--- 1,26 ----
+ 2006-08-09 Bernd Schmidt <bernd.schmidt@analog.com>
+
+ From Mike Frysinger <michael.frysinger@analog.com>
+ * bfin.h (R_BFIN_UNUSED, R_BFIN_PCREL5M2, R_BFIN_UNUSED1,
+ R_BFIN_PCREL10, R_BFIN_PCREL12_JUMP, R_BFIN_RIMM16,
+ R_BFIN_LUIMM16, R_BFIN_HUIMM16, R_BFIN_PCREL12_JUMP_S,
+ R_BFIN_PCREL24_JUMP_X, R_BFIN_PCREL24, R_BFIN_UNUSEDB,
+ R_BFIN_UNUSEDC, R_BFIN_PCREL24_JUMP_L, R_BFIN_PCREL24_CALL_X,
+ R_BFIN_VAR_EQ_SYMB, R_BFIN_BYTE_DATA, R_BFIN_BYTE2_DATA,
+ R_BFIN_BYTE4_DATA, R_BFIN_PCREL11, R_BFIN_PUSH, R_BFIN_CONST,
+ R_BFIN_ADD, R_BFIN_SUB, R_BFIN_MULT, R_BFIN_DIV, R_BFIN_MOD,
+ R_BFIN_LSHIFT, R_BFIN_RSHIFT, R_BFIN_AND, R_BFIN_OR, R_BFIN_XOR,
+ R_BFIN_LAND, R_BFIN_LOR, R_BFIN_LEN, R_BFIN_NEG, R_BFIN_COMP,
+ R_BFIN_PAGE, R_BFIN_HWPAGE, R_BFIN_ADDR, R_BFIN_PLTPLC,
+ R_BFIN_GOT, R_BFIN_MAX): Renamed from R_unused0, R_pcrel5ms,
+ R_unused1, R_pcrel10, R_pcrel12_jump, R_rimm16, R_luimm16,
+ R_huimm16, R_pcrel12_jump_s, R_pcrel24_jump_x, R_pcrel24,
+ R_unusedb, R_unusedc, R_pcrel24_jump_l, R_pcrel24_call_x,
+ R_var_eq_symb, R_byte_data, R_byte2_data, R_byte4_data, R_pcrel11,
+ R_push, R_const, R_add, R_sub, R_mult, R_div, R_mod, R_lshift,
+ R_rshift, R_and, R_or, R_xor, R_land, R_lor, R_len, R_neg, R_comp,
+ R_page, R_hwpage, R_addr, R_pltpc, R_got.
+
2009-08-06 Michael Eager <eager@eagercon.com>
* elf/common.h: Define EM_MICROBLAZE & EM_MICROBLAZE_OLD.
Index: include/elf/bfin.h
===================================================================
RCS file: /cvs/src/src/include/elf/bfin.h,v
retrieving revision 1.4
diff -c -p -r1.4 bfin.h
*** include/elf/bfin.h 12 Jul 2008 08:54:12 -0000 1.4
--- include/elf/bfin.h 9 Aug 2009 16:39:32 -0000
*************** along with this program; if not, write t
*** 19,48 ****
#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_GOT17M4, 0x14)
RELOC_NUMBER (R_BFIN_GOTHI, 0x15)
RELOC_NUMBER (R_BFIN_GOTLO, 0x16)
--- 19,48 ----
#ifndef _ELF_BFIN_H
#define _ELF_BFIN_H
!
#include "elf/reloc-macros.h"
START_RELOC_NUMBERS (elf_bfin_reloc_type)
! 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)
*************** START_RELOC_NUMBERS (elf_bfin_reloc_type
*** 58,88 ****
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_GNU_VTINHERIT, 0x42) /* C++, gnu only */
RELOC_NUMBER (R_BFIN_GNU_VTENTRY, 0x43) /* C++, gnu only */
! END_RELOC_NUMBERS (R_max)
/* Processor specific flags for the ELF header e_flags field. */
#define EF_BFIN_PIC 0x00000001 /* -fpic */
--- 58,88 ----
RELOC_NUMBER (R_BFIN_GOTOFFHI, 0x20)
RELOC_NUMBER (R_BFIN_GOTOFFLO, 0x21)
! 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_BFIN_max)
/* Processor specific flags for the ELF header e_flags field. */
#define EF_BFIN_PIC 0x00000001 /* -fpic */