* mn10300.h (elf_mn10300_reloc_type): Add R_MN10300_TLS_GD,
R_MN10300_TLS_LD, R_MN10300_TLS_LDO, R_MN10300_TLS_GOTIE, R_MN10300_TLS_IE, R_MN10300_TLS_LE, R_MN10300_TLS_DPTMOD, R_MN10300_TLS_DTPOFF and R_MN10300_TLS_TPOFF. * elf-m10300.c (elf32_mn10300_link_hash_entry): Add tls_type field. (elf32_mn10300_link_hash_table): Add tls_ldm_got entry; (elf_mn10300_tdata): Define. (elf_mn10300_local_got_tls_type): Define. (elf_mn10300_howto_table): Add entries for R_MN10300_TLS_GD, R_MN10300_TLS_LD, R_MN10300_TLS_LDO, R_MN10300_TLS_GOTIE, R_MN10300_TLS_IE, R_MN10300_TLS_LE, R_MN10300_TLS_DPTMOD, R_MN10300_TLS_DTPOFF, R_MN10300_TLS_TPOFF relocs. (mn10300_reloc_map): Likewise. (elf_mn10300_tls_transition): New function. (dtpoff, tpoff, mn10300_do_tls_transition): New functions. (mn10300_elf_check_relocs): Add TLS support. (mn10300_elf_final_link_relocate): Likewise. (mn10300_elf_relocate_section): Likewise. (mn10300_elf_relax_section): Likewise. (elf32_mn10300_link_hash_newfunc): Initialise new field. (_bfd_mn10300_copy_indirect_symbol): New function. (elf32_mn10300_link_hash_table_create): Initialise new fields. (_bfd_mn10300_elf_size_dynamic_sections): Add TLS support. (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise. (_bfd_mn10300_elf_reloc_type_class): Allocate an elf_mn10300_obj_tdata structure. (elf_backend_copy_indirect_symbol): Define. * reloc.c (BFD_MN10300_TLS_GD, BFD_MN10300_TLS_LD, BFD_MN10300_TLS_LDO, BFD_MN10300_TLS_GOTIE, BFD_MN10300_TLS_IE, BFD_MN10300_TLS_LE, BFD_MN10300_TLS_DPTMOD, BFD_MN10300_TLS_DTPOFF, BFD_MN10300_TLS_TPOFF): New relocations. (BFD_RELOC_MN10300_32_PCREL, BFD_RELOC_MN10300_16_PCREL): Move to alongside other MN10300 relocations. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. * config/tc-mn10300.c (other_registers): Add SSP and USP. (md_assemble): Add support for TLS relocs. (mn10300_parse_name): Likewise. * readelf.c (is_16bit_abs_reloc): Add detection of R_MN10300_16.
This commit is contained in:
parent
0c13fc49f4
commit
0a22ae8eb5
11 changed files with 935 additions and 110 deletions
|
@ -1,3 +1,38 @@
|
|||
2012-03-07 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* elf-m10300.c (elf32_mn10300_link_hash_entry): Add tls_type
|
||||
field.
|
||||
(elf32_mn10300_link_hash_table): Add tls_ldm_got entry;
|
||||
(elf_mn10300_tdata): Define.
|
||||
(elf_mn10300_local_got_tls_type): Define.
|
||||
(elf_mn10300_howto_table): Add entries for R_MN10300_TLS_GD,
|
||||
R_MN10300_TLS_LD, R_MN10300_TLS_LDO, R_MN10300_TLS_GOTIE,
|
||||
R_MN10300_TLS_IE, R_MN10300_TLS_LE, R_MN10300_TLS_DPTMOD,
|
||||
R_MN10300_TLS_DTPOFF, R_MN10300_TLS_TPOFF relocs.
|
||||
(mn10300_reloc_map): Likewise.
|
||||
(elf_mn10300_tls_transition): New function.
|
||||
(dtpoff, tpoff, mn10300_do_tls_transition): New functions.
|
||||
(mn10300_elf_check_relocs): Add TLS support.
|
||||
(mn10300_elf_final_link_relocate): Likewise.
|
||||
(mn10300_elf_relocate_section): Likewise.
|
||||
(mn10300_elf_relax_section): Likewise.
|
||||
(elf32_mn10300_link_hash_newfunc): Initialise new field.
|
||||
(_bfd_mn10300_copy_indirect_symbol): New function.
|
||||
(elf32_mn10300_link_hash_table_create): Initialise new fields.
|
||||
(_bfd_mn10300_elf_size_dynamic_sections): Add TLS support.
|
||||
(_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
|
||||
(_bfd_mn10300_elf_reloc_type_class): Allocate an
|
||||
elf_mn10300_obj_tdata structure.
|
||||
(elf_backend_copy_indirect_symbol): Define.
|
||||
* reloc.c (BFD_MN10300_TLS_GD, BFD_MN10300_TLS_LD,
|
||||
BFD_MN10300_TLS_LDO, BFD_MN10300_TLS_GOTIE, BFD_MN10300_TLS_IE,
|
||||
BFD_MN10300_TLS_LE, BFD_MN10300_TLS_DPTMOD,
|
||||
BFD_MN10300_TLS_DTPOFF, BFD_MN10300_TLS_TPOFF): New relocations.
|
||||
(BFD_RELOC_MN10300_32_PCREL, BFD_RELOC_MN10300_16_PCREL): Move to
|
||||
alongside other MN10300 relocations.
|
||||
* bfd-in2.h: Regenerate.
|
||||
* libbfd.h: Regenerate.
|
||||
|
||||
2012-03-06 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* elf64-x86-64.c (elf_x86_64_relocate_section): For R_X86_64_RELATIVE
|
||||
|
|
|
@ -2963,6 +2963,25 @@ be honoured at the offset's location, regardless of linker
|
|||
relaxation. */
|
||||
BFD_RELOC_MN10300_ALIGN,
|
||||
|
||||
/* Various TLS-related relocations. */
|
||||
BFD_RELOC_MN10300_TLS_GD,
|
||||
BFD_RELOC_MN10300_TLS_LD,
|
||||
BFD_RELOC_MN10300_TLS_LDO,
|
||||
BFD_RELOC_MN10300_TLS_GOTIE,
|
||||
BFD_RELOC_MN10300_TLS_IE,
|
||||
BFD_RELOC_MN10300_TLS_LE,
|
||||
BFD_RELOC_MN10300_TLS_DTPMOD,
|
||||
BFD_RELOC_MN10300_TLS_DTPOFF,
|
||||
BFD_RELOC_MN10300_TLS_TPOFF,
|
||||
|
||||
/* This is a 32bit pcrel reloc for the mn10300, offset by two bytes in the
|
||||
instruction. */
|
||||
BFD_RELOC_MN10300_32_PCREL,
|
||||
|
||||
/* This is a 16bit pcrel reloc for the mn10300, offset by two bytes in the
|
||||
instruction. */
|
||||
BFD_RELOC_MN10300_16_PCREL,
|
||||
|
||||
|
||||
/* i386/elf relocations */
|
||||
BFD_RELOC_386_GOT32,
|
||||
|
@ -3798,14 +3817,6 @@ instructions. */
|
|||
/* start data in text. */
|
||||
BFD_RELOC_V850_DATA,
|
||||
|
||||
/* This is a 32bit pcrel reloc for the mn10300, offset by two bytes in the
|
||||
instruction. */
|
||||
BFD_RELOC_MN10300_32_PCREL,
|
||||
|
||||
/* This is a 16bit pcrel reloc for the mn10300, offset by two bytes in the
|
||||
instruction. */
|
||||
BFD_RELOC_MN10300_16_PCREL,
|
||||
|
||||
/* This is a 8bit DP reloc for the tms320c30, where the most
|
||||
significant 8 bits of a 24 bit word are placed into the least
|
||||
significant 8 bits of the opcode. */
|
||||
|
|
783
bfd/elf-m10300.c
783
bfd/elf-m10300.c
File diff suppressed because it is too large
Load diff
13
bfd/libbfd.h
13
bfd/libbfd.h
|
@ -1225,6 +1225,17 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
|
|||
"BFD_RELOC_MN10300_RELATIVE",
|
||||
"BFD_RELOC_MN10300_SYM_DIFF",
|
||||
"BFD_RELOC_MN10300_ALIGN",
|
||||
"BFD_RELOC_MN10300_TLS_GD",
|
||||
"BFD_RELOC_MN10300_TLS_LD",
|
||||
"BFD_RELOC_MN10300_TLS_LDO",
|
||||
"BFD_RELOC_MN10300_TLS_GOTIE",
|
||||
"BFD_RELOC_MN10300_TLS_IE",
|
||||
"BFD_RELOC_MN10300_TLS_LE",
|
||||
"BFD_RELOC_MN10300_TLS_DTPMOD",
|
||||
"BFD_RELOC_MN10300_TLS_DTPOFF",
|
||||
"BFD_RELOC_MN10300_TLS_TPOFF",
|
||||
"BFD_RELOC_MN10300_32_PCREL",
|
||||
"BFD_RELOC_MN10300_16_PCREL",
|
||||
|
||||
"BFD_RELOC_386_GOT32",
|
||||
"BFD_RELOC_386_PLT32",
|
||||
|
@ -1733,8 +1744,6 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
|
|||
"BFD_RELOC_V850_32_GOTOFF",
|
||||
"BFD_RELOC_V850_CODE",
|
||||
"BFD_RELOC_V850_DATA",
|
||||
"BFD_RELOC_MN10300_32_PCREL",
|
||||
"BFD_RELOC_MN10300_16_PCREL",
|
||||
"BFD_RELOC_TIC30_LDP",
|
||||
"BFD_RELOC_TIC54X_PARTLS7",
|
||||
"BFD_RELOC_TIC54X_PARTMS9",
|
||||
|
|
40
bfd/reloc.c
40
bfd/reloc.c
|
@ -2547,6 +2547,36 @@ ENUMDOC
|
|||
The addend of this reloc is an alignment power that must
|
||||
be honoured at the offset's location, regardless of linker
|
||||
relaxation.
|
||||
ENUM
|
||||
BFD_RELOC_MN10300_TLS_GD
|
||||
ENUMX
|
||||
BFD_RELOC_MN10300_TLS_LD
|
||||
ENUMX
|
||||
BFD_RELOC_MN10300_TLS_LDO
|
||||
ENUMX
|
||||
BFD_RELOC_MN10300_TLS_GOTIE
|
||||
ENUMX
|
||||
BFD_RELOC_MN10300_TLS_IE
|
||||
ENUMX
|
||||
BFD_RELOC_MN10300_TLS_LE
|
||||
ENUMX
|
||||
BFD_RELOC_MN10300_TLS_DTPMOD
|
||||
ENUMX
|
||||
BFD_RELOC_MN10300_TLS_DTPOFF
|
||||
ENUMX
|
||||
BFD_RELOC_MN10300_TLS_TPOFF
|
||||
ENUMDOC
|
||||
Various TLS-related relocations.
|
||||
ENUM
|
||||
BFD_RELOC_MN10300_32_PCREL
|
||||
ENUMDOC
|
||||
This is a 32bit pcrel reloc for the mn10300, offset by two bytes in the
|
||||
instruction.
|
||||
ENUM
|
||||
BFD_RELOC_MN10300_16_PCREL
|
||||
ENUMDOC
|
||||
This is a 16bit pcrel reloc for the mn10300, offset by two bytes in the
|
||||
instruction.
|
||||
COMMENT
|
||||
|
||||
ENUM
|
||||
|
@ -3921,16 +3951,6 @@ ENUM
|
|||
BFD_RELOC_V850_DATA
|
||||
ENUMDOC
|
||||
start data in text.
|
||||
ENUM
|
||||
BFD_RELOC_MN10300_32_PCREL
|
||||
ENUMDOC
|
||||
This is a 32bit pcrel reloc for the mn10300, offset by two bytes in the
|
||||
instruction.
|
||||
ENUM
|
||||
BFD_RELOC_MN10300_16_PCREL
|
||||
ENUMDOC
|
||||
This is a 16bit pcrel reloc for the mn10300, offset by two bytes in the
|
||||
instruction.
|
||||
|
||||
ENUM
|
||||
BFD_RELOC_TIC30_LDP
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2012-03-07 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* readelf.c (is_16bit_abs_reloc): Add detection of R_MN10300_16.
|
||||
|
||||
2012-02-29 Jeff Law <law@redhat.com>
|
||||
|
||||
* doc/binutils.texi (c++filt): Fix typos.
|
||||
|
|
|
@ -10084,6 +10084,9 @@ is_16bit_abs_reloc (unsigned int reloc_type)
|
|||
case EM_XC16X:
|
||||
case EM_C166:
|
||||
return reloc_type == 2; /* R_XC16C_ABS_16. */
|
||||
case EM_CYGNUS_MN10300:
|
||||
case EM_MN10300:
|
||||
return reloc_type == 2; /* R_MN10300_16. */
|
||||
default:
|
||||
return FALSE;
|
||||
}
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
2012-03-07 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* config/tc-mn10300.c (other_registers): Add SSP and USP.
|
||||
(md_assemble): Add support for TLS relocs.
|
||||
(mn10300_parse_name): Likewise.
|
||||
|
||||
2012-02-27 Alan Modra <amodra@gmail.com>
|
||||
|
||||
* config/tc-crx.c (check_range): Correct uint32_t misconceptions.
|
||||
|
|
|
@ -281,6 +281,8 @@ static const struct reg_name other_registers[] =
|
|||
{ "pc", AM33 },
|
||||
{ "psw", 0 },
|
||||
{ "sp", 0 },
|
||||
{ "ssp", 0 },
|
||||
{ "usp", 0 },
|
||||
};
|
||||
|
||||
#define OTHER_REG_NAME_CNT ARRAY_SIZE (other_registers)
|
||||
|
@ -2063,6 +2065,12 @@ keep_going:
|
|||
&& fixups[i].reloc != BFD_RELOC_32_GOT_PCREL
|
||||
&& fixups[i].reloc != BFD_RELOC_32_GOTOFF
|
||||
&& fixups[i].reloc != BFD_RELOC_32_PLT_PCREL
|
||||
&& fixups[i].reloc != BFD_RELOC_MN10300_TLS_GD
|
||||
&& fixups[i].reloc != BFD_RELOC_MN10300_TLS_LD
|
||||
&& fixups[i].reloc != BFD_RELOC_MN10300_TLS_LDO
|
||||
&& fixups[i].reloc != BFD_RELOC_MN10300_TLS_GOTIE
|
||||
&& fixups[i].reloc != BFD_RELOC_MN10300_TLS_IE
|
||||
&& fixups[i].reloc != BFD_RELOC_MN10300_TLS_LE
|
||||
&& fixups[i].reloc != BFD_RELOC_MN10300_GOT32)
|
||||
{
|
||||
reloc_howto_type *reloc_howto;
|
||||
|
@ -2501,6 +2509,18 @@ mn10300_parse_name (char const *name,
|
|||
reloc_type = BFD_RELOC_MN10300_GOT32;
|
||||
else if ((next_end = mn10300_end_of_match (next + 1, "PLT")))
|
||||
reloc_type = BFD_RELOC_32_PLT_PCREL;
|
||||
else if ((next_end = mn10300_end_of_match (next + 1, "tlsgd")))
|
||||
reloc_type = BFD_RELOC_MN10300_TLS_GD;
|
||||
else if ((next_end = mn10300_end_of_match (next + 1, "tlsldm")))
|
||||
reloc_type = BFD_RELOC_MN10300_TLS_LD;
|
||||
else if ((next_end = mn10300_end_of_match (next + 1, "dtpoff")))
|
||||
reloc_type = BFD_RELOC_MN10300_TLS_LDO;
|
||||
else if ((next_end = mn10300_end_of_match (next + 1, "gotntpoff")))
|
||||
reloc_type = BFD_RELOC_MN10300_TLS_GOTIE;
|
||||
else if ((next_end = mn10300_end_of_match (next + 1, "indntpoff")))
|
||||
reloc_type = BFD_RELOC_MN10300_TLS_IE;
|
||||
else if ((next_end = mn10300_end_of_match (next + 1, "tpoff")))
|
||||
reloc_type = BFD_RELOC_MN10300_TLS_LE;
|
||||
else
|
||||
goto no_suffix;
|
||||
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
2012-03-07 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* mn10300.h (elf_mn10300_reloc_type): Add R_MN10300_TLS_GD,
|
||||
R_MN10300_TLS_LD, R_MN10300_TLS_LDO, R_MN10300_TLS_GOTIE,
|
||||
R_MN10300_TLS_IE, R_MN10300_TLS_LE, R_MN10300_TLS_DPTMOD,
|
||||
R_MN10300_TLS_DTPOFF and R_MN10300_TLS_TPOFF.
|
||||
|
||||
2012-02-25 Walter Lee <walt@tilera.com>
|
||||
|
||||
* tilegx.h (R_TILEGX_IMM16_X0_HW1_GOT): Delete.
|
||||
|
|
|
@ -51,6 +51,15 @@ START_RELOC_NUMBERS (elf_mn10300_reloc_type)
|
|||
RELOC_NUMBER (R_MN10300_GLOB_DAT, 21)
|
||||
RELOC_NUMBER (R_MN10300_JMP_SLOT, 22)
|
||||
RELOC_NUMBER (R_MN10300_RELATIVE, 23)
|
||||
RELOC_NUMBER (R_MN10300_TLS_GD, 24)
|
||||
RELOC_NUMBER (R_MN10300_TLS_LD, 25)
|
||||
RELOC_NUMBER (R_MN10300_TLS_LDO, 26)
|
||||
RELOC_NUMBER (R_MN10300_TLS_GOTIE, 27)
|
||||
RELOC_NUMBER (R_MN10300_TLS_IE, 28)
|
||||
RELOC_NUMBER (R_MN10300_TLS_LE, 29)
|
||||
RELOC_NUMBER (R_MN10300_TLS_DTPMOD, 30)
|
||||
RELOC_NUMBER (R_MN10300_TLS_DTPOFF, 31)
|
||||
RELOC_NUMBER (R_MN10300_TLS_TPOFF, 32)
|
||||
RELOC_NUMBER (R_MN10300_SYM_DIFF, 33)
|
||||
RELOC_NUMBER (R_MN10300_ALIGN, 34)
|
||||
END_RELOC_NUMBERS (R_MN10300_MAX)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue