Relocations for Nios II R2
2015-07-01 Sandra Loosemore <sandra@codesourcery.com> Cesar Philippidis <cesar@codesourcery.com> bfd/ * bfd-in2.h: Regenerated. * elf32-nios2.c (elf_nios2_howto_table_rel): Rename to... (elf_nios2_r1_howto_table_rel): This. (elf_nios2_r2_howto_table_rel): New. (BFD_IS_R2): New. (lookup_howto): Add ABFD parameter. Adjust to look up in either the R1 or R2 relocation table, as determined by ABFD. (nios2_reloc_map): Add R2 relocations. (nios2_elf32_bfd_reloc_type_lookup): Do lookup using lookup_howto. Pass it the ABFD parameter. (nios2_elf32_bfd_reloc_name_lookup): Use ABFD to decide whether to return an R1 or R2 relocation. (nios2_elf32_info_to_howto): Do lookup using lookup_howto. Pass it the ABFD parameter. (nios2_elf32_do_call26_relocate): Check for alignment on a 4-byte boundary. (nios2_elf32_relocate_section): Adjust call to lookup_howto. * libbfd.h: Regenerated. * reloc.c (BFD_RELOC_NIOS2_R2_S12): New. (BFD_RELOC_NIOS2_R2_I10_1_PCREL): New. (BFD_RELOC_NIOS2_R2_T1I7_1_PCREL): New. (BFD_RELOC_NIOS2_R2_T1I7_2): New. (BFD_RELOC_NIOS2_R2_T2I4): New. (BFD_RELOC_NIOS2_R2_T2I4_1): New. (BFD_RELOC_NIOS2_R2_T2I4_2): New. (BFD_RELOC_NIOS2_R2_X1I7_2): New. (BFD_RELOC_NIOS2_R2_X2L5): New. (BFD_RELOC_NIOS2_R2_F1I5_2): New. (BFD_RELOC_NIOS2_R2_L5I4X1): New. (BFD_RELOC_NIOS2_R2_T1X1I6): New. (BFD_RELOC_NIOS2_R2_T1X1I6_2): New. include/elf/ * nios2.h (R_NIOS2_R2_S12): New. (R_NIOS2_R2_I10_1_PCREL): New. (R_NIOS2_R2_T1I7_1_PCREL): New. (R_NIOS2_R2_T1I7_2): New. (R_NIOS2_R2_T2I4): New. (R_NIOS2_R2_T2I4_1): New. (R_NIOS2_R2_T2I4_2): New. (R_NIOS2_R2_X1I7_2): New. (R_NIOS2_R2_X2L5): New. (R_NIOS2_R2_F1I5_2): New. (R_NIOS2_R2_L5I4X1): New. (R_NIOS2_R2_T1X1I6): New. (R_NIOS2_R2_T1X1I6_2): New. (R_NIOS2_ILLEGAL): Renumber.
This commit is contained in:
parent
965b1d8083
commit
8c163c5a87
@ -1,3 +1,38 @@
|
||||
2015-07-01 Sandra Loosemore <sandra@codesourcery.com>
|
||||
Cesar Philippidis <cesar@codesourcery.com>
|
||||
|
||||
* bfd-in2.h: Regenerated.
|
||||
* elf32-nios2.c (elf_nios2_howto_table_rel): Rename to...
|
||||
(elf_nios2_r1_howto_table_rel): This.
|
||||
(elf_nios2_r2_howto_table_rel): New.
|
||||
(BFD_IS_R2): New.
|
||||
(lookup_howto): Add ABFD parameter. Adjust to look up in either
|
||||
the R1 or R2 relocation table, as determined by ABFD.
|
||||
(nios2_reloc_map): Add R2 relocations.
|
||||
(nios2_elf32_bfd_reloc_type_lookup): Do lookup using lookup_howto.
|
||||
Pass it the ABFD parameter.
|
||||
(nios2_elf32_bfd_reloc_name_lookup): Use ABFD to decide whether to
|
||||
return an R1 or R2 relocation.
|
||||
(nios2_elf32_info_to_howto): Do lookup using lookup_howto.
|
||||
Pass it the ABFD parameter.
|
||||
(nios2_elf32_do_call26_relocate): Check for alignment on a 4-byte
|
||||
boundary.
|
||||
(nios2_elf32_relocate_section): Adjust call to lookup_howto.
|
||||
* libbfd.h: Regenerated.
|
||||
* reloc.c (BFD_RELOC_NIOS2_R2_S12): New.
|
||||
(BFD_RELOC_NIOS2_R2_I10_1_PCREL): New.
|
||||
(BFD_RELOC_NIOS2_R2_T1I7_1_PCREL): New.
|
||||
(BFD_RELOC_NIOS2_R2_T1I7_2): New.
|
||||
(BFD_RELOC_NIOS2_R2_T2I4): New.
|
||||
(BFD_RELOC_NIOS2_R2_T2I4_1): New.
|
||||
(BFD_RELOC_NIOS2_R2_T2I4_2): New.
|
||||
(BFD_RELOC_NIOS2_R2_X1I7_2): New.
|
||||
(BFD_RELOC_NIOS2_R2_X2L5): New.
|
||||
(BFD_RELOC_NIOS2_R2_F1I5_2): New.
|
||||
(BFD_RELOC_NIOS2_R2_L5I4X1): New.
|
||||
(BFD_RELOC_NIOS2_R2_T1X1I6): New.
|
||||
(BFD_RELOC_NIOS2_R2_T1X1I6_2): New.
|
||||
|
||||
2015-07-01 Sandra Loosemore <sandra@codesourcery.com>
|
||||
Cesar Philippidis <cesar@codesourcery.com>
|
||||
|
||||
|
@ -5353,6 +5353,19 @@ a matching LO8XG part. */
|
||||
BFD_RELOC_NIOS2_GOT_HA,
|
||||
BFD_RELOC_NIOS2_CALL_LO,
|
||||
BFD_RELOC_NIOS2_CALL_HA,
|
||||
BFD_RELOC_NIOS2_R2_S12,
|
||||
BFD_RELOC_NIOS2_R2_I10_1_PCREL,
|
||||
BFD_RELOC_NIOS2_R2_T1I7_1_PCREL,
|
||||
BFD_RELOC_NIOS2_R2_T1I7_2,
|
||||
BFD_RELOC_NIOS2_R2_T2I4,
|
||||
BFD_RELOC_NIOS2_R2_T2I4_1,
|
||||
BFD_RELOC_NIOS2_R2_T2I4_2,
|
||||
BFD_RELOC_NIOS2_R2_X1I7_2,
|
||||
BFD_RELOC_NIOS2_R2_X2L5,
|
||||
BFD_RELOC_NIOS2_R2_F1I5_2,
|
||||
BFD_RELOC_NIOS2_R2_L5I4X1,
|
||||
BFD_RELOC_NIOS2_R2_T1X1I6,
|
||||
BFD_RELOC_NIOS2_R2_T1X1I6_2,
|
||||
|
||||
/* IQ2000 Relocations. */
|
||||
BFD_RELOC_IQ2000_OFFSET_16,
|
||||
|
File diff suppressed because it is too large
Load Diff
13
bfd/libbfd.h
13
bfd/libbfd.h
@ -2600,6 +2600,19 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
|
||||
"BFD_RELOC_NIOS2_GOT_HA",
|
||||
"BFD_RELOC_NIOS2_CALL_LO",
|
||||
"BFD_RELOC_NIOS2_CALL_HA",
|
||||
"BFD_RELOC_NIOS2_R2_S12",
|
||||
"BFD_RELOC_NIOS2_R2_I10_1_PCREL",
|
||||
"BFD_RELOC_NIOS2_R2_T1I7_1_PCREL",
|
||||
"BFD_RELOC_NIOS2_R2_T1I7_2",
|
||||
"BFD_RELOC_NIOS2_R2_T2I4",
|
||||
"BFD_RELOC_NIOS2_R2_T2I4_1",
|
||||
"BFD_RELOC_NIOS2_R2_T2I4_2",
|
||||
"BFD_RELOC_NIOS2_R2_X1I7_2",
|
||||
"BFD_RELOC_NIOS2_R2_X2L5",
|
||||
"BFD_RELOC_NIOS2_R2_F1I5_2",
|
||||
"BFD_RELOC_NIOS2_R2_L5I4X1",
|
||||
"BFD_RELOC_NIOS2_R2_T1X1I6",
|
||||
"BFD_RELOC_NIOS2_R2_T1X1I6_2",
|
||||
"BFD_RELOC_IQ2000_OFFSET_16",
|
||||
"BFD_RELOC_IQ2000_OFFSET_21",
|
||||
"BFD_RELOC_IQ2000_UHI16",
|
||||
|
26
bfd/reloc.c
26
bfd/reloc.c
@ -6232,6 +6232,32 @@ ENUMX
|
||||
BFD_RELOC_NIOS2_CALL_LO
|
||||
ENUMX
|
||||
BFD_RELOC_NIOS2_CALL_HA
|
||||
ENUMX
|
||||
BFD_RELOC_NIOS2_R2_S12
|
||||
ENUMX
|
||||
BFD_RELOC_NIOS2_R2_I10_1_PCREL
|
||||
ENUMX
|
||||
BFD_RELOC_NIOS2_R2_T1I7_1_PCREL
|
||||
ENUMX
|
||||
BFD_RELOC_NIOS2_R2_T1I7_2
|
||||
ENUMX
|
||||
BFD_RELOC_NIOS2_R2_T2I4
|
||||
ENUMX
|
||||
BFD_RELOC_NIOS2_R2_T2I4_1
|
||||
ENUMX
|
||||
BFD_RELOC_NIOS2_R2_T2I4_2
|
||||
ENUMX
|
||||
BFD_RELOC_NIOS2_R2_X1I7_2
|
||||
ENUMX
|
||||
BFD_RELOC_NIOS2_R2_X2L5
|
||||
ENUMX
|
||||
BFD_RELOC_NIOS2_R2_F1I5_2
|
||||
ENUMX
|
||||
BFD_RELOC_NIOS2_R2_L5I4X1
|
||||
ENUMX
|
||||
BFD_RELOC_NIOS2_R2_T1X1I6
|
||||
ENUMX
|
||||
BFD_RELOC_NIOS2_R2_T1X1I6_2
|
||||
ENUMDOC
|
||||
Relocations used by the Altera Nios II core.
|
||||
|
||||
|
@ -1,3 +1,21 @@
|
||||
2015-07-01 Sandra Loosemore <sandra@codesourcery.com>
|
||||
Cesar Philippidis <cesar@codesourcery.com>
|
||||
|
||||
* nios2.h (R_NIOS2_R2_S12): New.
|
||||
(R_NIOS2_R2_I10_1_PCREL): New.
|
||||
(R_NIOS2_R2_T1I7_1_PCREL): New.
|
||||
(R_NIOS2_R2_T1I7_2): New.
|
||||
(R_NIOS2_R2_T2I4): New.
|
||||
(R_NIOS2_R2_T2I4_1): New.
|
||||
(R_NIOS2_R2_T2I4_2): New.
|
||||
(R_NIOS2_R2_X1I7_2): New.
|
||||
(R_NIOS2_R2_X2L5): New.
|
||||
(R_NIOS2_R2_F1I5_2): New.
|
||||
(R_NIOS2_R2_L5I4X1): New.
|
||||
(R_NIOS2_R2_T1X1I6): New.
|
||||
(R_NIOS2_R2_T1X1I6_2): New.
|
||||
(R_NIOS2_ILLEGAL): Renumber.
|
||||
|
||||
2015-07-01 Sandra Loosemore <sandra@codesourcery.com>
|
||||
Cesar Philippidis <cesar@codesourcery.com>
|
||||
|
||||
|
@ -34,6 +34,8 @@
|
||||
function to work properly. */
|
||||
|
||||
START_RELOC_NUMBERS (elf_nios2_reloc_type)
|
||||
/* Relocs used by both R1 and R2, with different howtos to match
|
||||
the respective encodings. */
|
||||
RELOC_NUMBER (R_NIOS2_NONE, 0)
|
||||
RELOC_NUMBER (R_NIOS2_S16, 1)
|
||||
RELOC_NUMBER (R_NIOS2_U16, 2)
|
||||
@ -80,7 +82,24 @@ START_RELOC_NUMBERS (elf_nios2_reloc_type)
|
||||
RELOC_NUMBER (R_NIOS2_GOT_HA, 43)
|
||||
RELOC_NUMBER (R_NIOS2_CALL_LO, 44)
|
||||
RELOC_NUMBER (R_NIOS2_CALL_HA, 45)
|
||||
RELOC_NUMBER (R_NIOS2_ILLEGAL, 46)
|
||||
|
||||
/* Relocs specific to R2. */
|
||||
RELOC_NUMBER (R_NIOS2_R2_S12, 64)
|
||||
RELOC_NUMBER (R_NIOS2_R2_I10_1_PCREL, 65)
|
||||
RELOC_NUMBER (R_NIOS2_R2_T1I7_1_PCREL, 66)
|
||||
RELOC_NUMBER (R_NIOS2_R2_T1I7_2, 67)
|
||||
RELOC_NUMBER (R_NIOS2_R2_T2I4, 68)
|
||||
RELOC_NUMBER (R_NIOS2_R2_T2I4_1, 69)
|
||||
RELOC_NUMBER (R_NIOS2_R2_T2I4_2, 70)
|
||||
RELOC_NUMBER (R_NIOS2_R2_X1I7_2, 71)
|
||||
RELOC_NUMBER (R_NIOS2_R2_X2L5, 72)
|
||||
RELOC_NUMBER (R_NIOS2_R2_F1I5_2, 73)
|
||||
RELOC_NUMBER (R_NIOS2_R2_L5I4X1, 74)
|
||||
RELOC_NUMBER (R_NIOS2_R2_T1X1I6, 75)
|
||||
RELOC_NUMBER (R_NIOS2_R2_T1X1I6_2, 76)
|
||||
|
||||
/* Last reloc. */
|
||||
RELOC_NUMBER (R_NIOS2_ILLEGAL, 77)
|
||||
END_RELOC_NUMBERS (R_NIOS2_maxext)
|
||||
|
||||
/* Processor-specific section flags. */
|
||||
|
Loading…
Reference in New Issue
Block a user