unsigned int r_type;
unsigned int r_symndx;
struct elf_link_hash_entry *h;
+ bool is_abs_symbol = false;
Elf_Internal_Sym *isym = NULL;
r_symndx = ELFNN_R_SYM (rel->r_info);
if (isym == NULL)
return false;
+ is_abs_symbol = isym->st_shndx == SHN_ABS;
if (ELF_ST_TYPE (isym->st_info) == STT_GNU_IFUNC)
{
h = elfNN_loongarch_get_local_sym_hash (htab, abfd, rel, true);
while (h->root.type == bfd_link_hash_indirect
|| h->root.type == bfd_link_hash_warning)
h = (struct elf_link_hash_entry *) h->root.u.i.link;
+ is_abs_symbol = bfd_is_abs_symbol (&h->root);
}
/* It is referenced by a non-shared object. */
&& bfd_link_pic (info)
&& (sec->flags & SEC_ALLOC) != 0)
{
- bool is_abs_symbol = false;
-
- if (r_symndx < symtab_hdr->sh_info)
- is_abs_symbol = isym->st_shndx == SHN_ABS;
- else
- is_abs_symbol = bfd_is_abs_symbol (&h->root);
-
if (!is_abs_symbol)
{
_bfd_error_handler
case R_LARCH_JUMP_SLOT:
case R_LARCH_64:
+ /* Resolved to const. */
+ if (is_abs_symbol)
+ break;
+
need_dynreloc = 1;
/* If resolved symbol is defined in this object,
run_dump_test "relr-discard-shared"
run_dump_test "relr-got-shared"
run_dump_test "relr-text-shared"
+ run_dump_test "abssym_shared"
}
if [check_pie_support] {
run_dump_test "relr-discard-pie"
run_dump_test "relr-got-pie"
run_dump_test "relr-text-pie"
+ run_dump_test "abssym_pie"
}
run_dump_test "max_imm_b16"