+2018-03-07 Renlin Li <renlin.li@arm.com>
+
+ PR ld/20402
+ * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Check absolute
+ symbol, and don't emit relocation in specific case.
+
2018-03-07 Alan Modra <amodra@gmail.com>
* elf64-mips.c (mips_elf64_rtype_to_howto): Return NULL on error.
asection *base_got;
bfd_vma orig_value = value;
bfd_boolean resolved_to_zero;
+ bfd_boolean abs_symbol_p;
globals = elf_aarch64_hash_table (info);
weak_undef_p = (h ? h->root.type == bfd_link_hash_undefweak
: bfd_is_und_section (sym_sec));
+ abs_symbol_p = (h !=NULL && h->root.type == bfd_link_hash_defined
+ && bfd_is_abs_section (h->root.u.def.section));
+
/* Since STT_GNU_IFUNC symbol must go through PLT, we handle
it here if it is defined in a non-shared object. */
skip = TRUE;
relocate = TRUE;
}
+ else if (abs_symbol_p)
+ {
+ /* Local absolute symbol. */
+ skip = (h->forced_local || (h->dynindx == -1));
+ relocate = skip;
+ }
outrel.r_offset += (input_section->output_section->vma
+ input_section->output_offset);
else if (h != NULL
&& h->dynindx != -1
&& (!bfd_link_pic (info)
- || !(bfd_link_pie (info)
- || SYMBOLIC_BIND (info, h))
+ || !(bfd_link_pie (info) || SYMBOLIC_BIND (info, h))
|| !h->def_regular))
outrel.r_info = ELFNN_R_INFO (h->dynindx, r_type);
else
+2018-03-07 Renlin Li <renlin.li@arm.com>
+
+ PR ld/20402
+ * testsuite/ld-aarch64/aarch64-elf.exp: Run new test.
+ * testsuite/ld-aarch64/pr20402.s: New.
+ * testsuite/ld-aarch64/pr20402.d: New.
+
2018-03-06 Jim Wilson <jimw@sifive.com>
PR 22920
--- /dev/null
+#ld: -pie -defsym foo=0x1 -defsym bar=0x2
+#readelf: -r
+
+Relocation section '\.rela\.dyn' at offset .* contains 2 entries:
+ Offset Info Type Sym\. Value Sym\. Name \+ Addend
+000000000000 000000000000 R_AARCH64_NONE 0
+000000000000 000000000000 R_AARCH64_NONE 0