mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-23 18:14:13 +08:00
Fix sanitization problems running the linker testsuite for the alpha-elf target.
PR 26416 * elf64-alpha.c (elf64_alpha_relax_tls_get_addr): Test for and ignore local symbols. (elf64_alpha_relax_got_load): Do not check for local dynamic symbols. (OP_LDA, OP_LDAH, OP_LDQ, OP_BR, OP_BSR): Use unsigned constant values. (INSN_A) Cast the A parameter to unsigned. (INSN_AB): Define in terms of INSN_A. (INSN_ABC): Likewise. (INSN_ABO): Likewise. (INSN_AD): Likewise.
This commit is contained in:
parent
b74a6c6086
commit
eae0b5c3b2
@ -1,5 +1,18 @@
|
||||
2020-08-26 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
PR 26416
|
||||
* elf64-alpha.c (elf64_alpha_relax_tls_get_addr): Test for and
|
||||
ignore local symbols.
|
||||
(elf64_alpha_relax_got_load): Do not check for local dynamic
|
||||
symbols.
|
||||
(OP_LDA, OP_LDAH, OP_LDQ, OP_BR, OP_BSR): Use unsigned constant
|
||||
values.
|
||||
(INSN_A) Cast the A parameter to unsigned.
|
||||
(INSN_AB): Define in terms of INSN_A.
|
||||
(INSN_ABC): Likewise.
|
||||
(INSN_ABO): Likewise.
|
||||
(INSN_AD): Likewise.
|
||||
|
||||
PR 26411
|
||||
* elfnn-aarch64.c (elfNN_aarch64_relocate_section): Use an
|
||||
unsigned long constant when creating a mask to test for alignment
|
||||
|
@ -52,11 +52,11 @@
|
||||
|
||||
/* Instruction data for plt generation and relaxation. */
|
||||
|
||||
#define OP_LDA 0x08
|
||||
#define OP_LDAH 0x09
|
||||
#define OP_LDQ 0x29
|
||||
#define OP_BR 0x30
|
||||
#define OP_BSR 0x34
|
||||
#define OP_LDA 0x08U
|
||||
#define OP_LDAH 0x09U
|
||||
#define OP_LDQ 0x29U
|
||||
#define OP_BR 0x30U
|
||||
#define OP_BSR 0x34U
|
||||
|
||||
#define INSN_LDA (OP_LDA << 26)
|
||||
#define INSN_LDAH (OP_LDAH << 26)
|
||||
@ -73,11 +73,11 @@
|
||||
#define INSN_JMP 0x68000000
|
||||
#define INSN_JSR_MASK 0xfc00c000
|
||||
|
||||
#define INSN_A(I,A) (I | (A << 21))
|
||||
#define INSN_AB(I,A,B) (I | (A << 21) | (B << 16))
|
||||
#define INSN_ABC(I,A,B,C) (I | (A << 21) | (B << 16) | C)
|
||||
#define INSN_ABO(I,A,B,O) (I | (A << 21) | (B << 16) | ((O) & 0xffff))
|
||||
#define INSN_AD(I,A,D) (I | (A << 21) | (((D) >> 2) & 0x1fffff))
|
||||
#define INSN_A(I,A) (I | ((unsigned) A << 21))
|
||||
#define INSN_AB(I,A,B) (INSN_A (I, A) | (B << 16))
|
||||
#define INSN_ABC(I,A,B,C) (INSN_A (I, A) | (B << 16) | C)
|
||||
#define INSN_ABO(I,A,B,O) (INSN_A (I, A) | (B << 16) | ((O) & 0xffff))
|
||||
#define INSN_AD(I,A,D) (INSN_A (I, A) | (((D) >> 2) & 0x1fffff))
|
||||
|
||||
/* PLT/GOT Stuff */
|
||||
|
||||
@ -2995,7 +2995,8 @@ elf64_alpha_relax_got_load (struct alpha_relax_info *info, bfd_vma symval,
|
||||
}
|
||||
|
||||
/* Can't relax dynamic symbols. */
|
||||
if (alpha_elf_dynamic_symbol_p (&info->h->root, info->link_info))
|
||||
if (info->h != NULL
|
||||
&& alpha_elf_dynamic_symbol_p (&info->h->root, info->link_info))
|
||||
return TRUE;
|
||||
|
||||
/* Can't use local-exec relocations in shared libraries. */
|
||||
@ -3463,6 +3464,8 @@ elf64_alpha_relax_tls_get_addr (struct alpha_relax_info *info, bfd_vma symval,
|
||||
bfd_boolean dynamic, use_gottprel;
|
||||
unsigned long new_symndx;
|
||||
|
||||
if (info->h == NULL)
|
||||
return TRUE; /* FIXME: Should this be return FALSE ? */
|
||||
dynamic = alpha_elf_dynamic_symbol_p (&info->h->root, info->link_info);
|
||||
|
||||
/* If a TLS symbol is accessed using IE at least once, there is no point
|
||||
|
Loading…
Reference in New Issue
Block a user