2007-08-21 H.J. Lu <hongjiu.lu@intel.com>
* elf32-i386.c (elf_i386_tls_transition): Accept a pointer to ELF hash entry instead of an integer for local test. (elf_i386_check_relocs): Updated. (elf_i386_gc_sweep_hook): Likewise. (elf_i386_relocate_section): Likewise. * elf64-x86-64.c (elf64_x86_64_tls_transition): Accept a pointer to ELF hash entry instead of an integer for local test. (elf64_x86_64_check_relocs): Updated. (elf64_x86_64_gc_sweep_hook): Likewise. (elf64_x86_64_relocate_section): Likewise.
This commit is contained in:
parent
f429d7d03d
commit
2f3bf80a30
@ -1,3 +1,18 @@
|
||||
2007-08-21 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* elf32-i386.c (elf_i386_tls_transition): Accept a pointer
|
||||
to ELF hash entry instead of an integer for local test.
|
||||
(elf_i386_check_relocs): Updated.
|
||||
(elf_i386_gc_sweep_hook): Likewise.
|
||||
(elf_i386_relocate_section): Likewise.
|
||||
|
||||
* elf64-x86-64.c (elf64_x86_64_tls_transition): Accept a
|
||||
pointer to ELF hash entry instead of an integer for local
|
||||
test.
|
||||
(elf64_x86_64_check_relocs): Updated.
|
||||
(elf64_x86_64_gc_sweep_hook): Likewise.
|
||||
(elf64_x86_64_relocate_section): Likewise.
|
||||
|
||||
2007-08-20 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* elf32-i386.c (elf_i386_tls_transition): Break long line.
|
||||
|
@ -895,7 +895,7 @@ elf_i386_copy_indirect_symbol (struct bfd_link_info *info,
|
||||
|
||||
static int
|
||||
elf_i386_tls_transition (struct bfd_link_info *info, int r_type,
|
||||
int is_local)
|
||||
struct elf_link_hash_entry *h)
|
||||
{
|
||||
if (info->shared)
|
||||
return r_type;
|
||||
@ -906,12 +906,12 @@ elf_i386_tls_transition (struct bfd_link_info *info, int r_type,
|
||||
case R_386_TLS_GOTDESC:
|
||||
case R_386_TLS_DESC_CALL:
|
||||
case R_386_TLS_IE_32:
|
||||
if (is_local)
|
||||
if (h == NULL)
|
||||
return R_386_TLS_LE_32;
|
||||
return R_386_TLS_IE_32;
|
||||
case R_386_TLS_IE:
|
||||
case R_386_TLS_GOTIE:
|
||||
if (is_local)
|
||||
if (h == NULL)
|
||||
return R_386_TLS_LE_32;
|
||||
return r_type;
|
||||
case R_386_TLS_LDM:
|
||||
@ -975,7 +975,7 @@ elf_i386_check_relocs (bfd *abfd,
|
||||
h = (struct elf_link_hash_entry *) h->root.u.i.link;
|
||||
}
|
||||
|
||||
r_type = elf_i386_tls_transition (info, r_type, h == NULL);
|
||||
r_type = elf_i386_tls_transition (info, r_type, h);
|
||||
|
||||
switch (r_type)
|
||||
{
|
||||
@ -1364,7 +1364,7 @@ elf_i386_gc_sweep_hook (bfd *abfd,
|
||||
}
|
||||
|
||||
r_type = ELF32_R_TYPE (rel->r_info);
|
||||
r_type = elf_i386_tls_transition (info, r_type, h != NULL);
|
||||
r_type = elf_i386_tls_transition (info, r_type, h);
|
||||
switch (r_type)
|
||||
{
|
||||
case R_386_TLS_LDM:
|
||||
@ -2624,7 +2624,7 @@ elf_i386_relocate_section (bfd *output_bfd,
|
||||
case R_386_TLS_DESC_CALL:
|
||||
case R_386_TLS_IE_32:
|
||||
case R_386_TLS_GOTIE:
|
||||
r_type = elf_i386_tls_transition (info, r_type, h == NULL);
|
||||
r_type = elf_i386_tls_transition (info, r_type, h);
|
||||
tls_type = GOT_UNKNOWN;
|
||||
if (h == NULL && local_got_offsets)
|
||||
tls_type = elf_i386_local_got_tls_type (input_bfd) [r_symndx];
|
||||
|
@ -714,7 +714,7 @@ elf64_x86_64_elf_object_p (bfd *abfd)
|
||||
|
||||
static int
|
||||
elf64_x86_64_tls_transition (struct bfd_link_info *info, int r_type,
|
||||
int is_local)
|
||||
struct elf_link_hash_entry *h)
|
||||
{
|
||||
if (info->shared)
|
||||
return r_type;
|
||||
@ -725,7 +725,7 @@ elf64_x86_64_tls_transition (struct bfd_link_info *info, int r_type,
|
||||
case R_X86_64_GOTPC32_TLSDESC:
|
||||
case R_X86_64_TLSDESC_CALL:
|
||||
case R_X86_64_GOTTPOFF:
|
||||
if (is_local)
|
||||
if (h == NULL)
|
||||
return R_X86_64_TPOFF32;
|
||||
return R_X86_64_GOTTPOFF;
|
||||
case R_X86_64_TLSLD:
|
||||
@ -786,7 +786,7 @@ elf64_x86_64_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec,
|
||||
h = (struct elf_link_hash_entry *) h->root.u.i.link;
|
||||
}
|
||||
|
||||
r_type = elf64_x86_64_tls_transition (info, r_type, h == NULL);
|
||||
r_type = elf64_x86_64_tls_transition (info, r_type, h);
|
||||
switch (r_type)
|
||||
{
|
||||
case R_X86_64_TLSLD:
|
||||
@ -1216,7 +1216,7 @@ elf64_x86_64_gc_sweep_hook (bfd *abfd, struct bfd_link_info *info,
|
||||
}
|
||||
|
||||
r_type = ELF64_R_TYPE (rel->r_info);
|
||||
r_type = elf64_x86_64_tls_transition (info, r_type, h != NULL);
|
||||
r_type = elf64_x86_64_tls_transition (info, r_type, h);
|
||||
switch (r_type)
|
||||
{
|
||||
case R_X86_64_TLSLD:
|
||||
@ -2502,7 +2502,7 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
|
||||
case R_X86_64_GOTPC32_TLSDESC:
|
||||
case R_X86_64_TLSDESC_CALL:
|
||||
case R_X86_64_GOTTPOFF:
|
||||
r_type = elf64_x86_64_tls_transition (info, r_type, h == NULL);
|
||||
r_type = elf64_x86_64_tls_transition (info, r_type, h);
|
||||
tls_type = GOT_UNKNOWN;
|
||||
if (h == NULL && local_got_offsets)
|
||||
tls_type = elf64_x86_64_local_got_tls_type (input_bfd) [r_symndx];
|
||||
|
Loading…
Reference in New Issue
Block a user