I didn't examine ld testsuite logs properly after
cf95b909e2c2.
Replacing one of the "return false" with BFD_ASSERT in
finish_dynamic_symbol was wrong as it causes segmentation faults on
testcases expected to fail. Revert those changes and instead make
a bfd_final_link failure noisy.
RELATIVE reloc. The entry in the global offset table
will already have been initialized in the
relocate_section function. */
- BFD_ASSERT (h->def_regular || ELF_COMMON_DEF_P (h));
+ if (!(h->def_regular || ELF_COMMON_DEF_P (h)))
+ return false;
BFD_ASSERT((h->got.offset & 1) != 0);
rela.r_info = ELF32_R_INFO (0, R_390_RELATIVE);
rela.r_addend = (h->root.u.def.value
RELATIVE reloc. The entry in the global offset table
will already have been initialized in the
relocate_section function. */
- BFD_ASSERT (h->def_regular || ELF_COMMON_DEF_P (h));
+ if (!(h->def_regular || ELF_COMMON_DEF_P (h)))
+ return false;
BFD_ASSERT((h->got.offset & 1) != 0);
rela.r_info = ELF64_R_INFO (0, R_390_RELATIVE);
rela.r_addend = (h->root.u.def.value
else if (bfd_link_pic (info)
&& SYMBOL_REFERENCES_LOCAL_P (info, h))
{
- BFD_ASSERT (SYMBOL_DEFINED_NON_SHARED_P (h));
+ if (!SYMBOL_DEFINED_NON_SHARED_P (h))
+ return false;
BFD_ASSERT((h->got.offset & 1) != 0);
if (info->enable_dt_relr)
generate_dynamic_reloc = false;
}
else if (bfd_link_pic (info) && SYMBOL_REFERENCES_LOCAL (info, h))
{
- BFD_ASSERT (h->def_regular || ELF_COMMON_DEF_P (h));
+ if (!(h->def_regular || ELF_COMMON_DEF_P (h)))
+ return false;
BFD_ASSERT ((h->got.offset & 1) != 0);
rela.r_info = ELFNN_R_INFO (0, AARCH64_R (RELATIVE));
rela.r_addend = (h->root.u.def.value
if (bfd_link_pic (info) && SYMBOL_REFERENCES_LOCAL (info, h))
{
- BFD_ASSERT (h->def_regular);
+ if (!h->def_regular)
+ return false;
/* in case of PLT related GOT entry, it is not clear who is
supposed to set the LSB of GOT entry...
split_sections (link_info.output_bfd, &link_info);
if (!bfd_final_link (link_info.output_bfd, &link_info))
{
- /* If there was an error recorded, print it out. Otherwise assume
- an appropriate error message like unknown symbol was printed
- out. */
-
if (bfd_get_error () != bfd_error_no_error)
einfo (_("%F%P: final link failed: %E\n"));
else
- xexit (1);
+ einfo (_("%F%P: final link failed\n"));
}
}