x86: Pass "%F%P:" to linker callback in case of error
We should pass "%F%P:" to linker callback in case of error. Otherwise, linker will report: : failed to create GNU property section * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Pass "%F%P:", instead of "%F:", to linker callback in case of error.
This commit is contained in:
parent
6a6196fc71
commit
2c244f9b09
2 changed files with 15 additions and 10 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2017-11-17 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
|
* elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Pass
|
||||||
|
"%F%P:", instead of "%F:", to linker callback in case of error.
|
||||||
|
|
||||||
2017-11-16 Nick Clifton <nickc@redhat.com>
|
2017-11-16 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
PR 22421
|
PR 22421
|
||||||
|
|
|
@ -2401,7 +2401,7 @@ _bfd_x86_elf_link_setup_gnu_properties
|
||||||
| SEC_HAS_CONTENTS
|
| SEC_HAS_CONTENTS
|
||||||
| SEC_DATA));
|
| SEC_DATA));
|
||||||
if (sec == NULL)
|
if (sec == NULL)
|
||||||
info->callbacks->einfo (_("%F: failed to create GNU property section\n"));
|
info->callbacks->einfo (_("%F%P: failed to create GNU property section\n"));
|
||||||
|
|
||||||
if (!bfd_set_section_alignment (ebfd, sec, class_align))
|
if (!bfd_set_section_alignment (ebfd, sec, class_align))
|
||||||
{
|
{
|
||||||
|
@ -2556,7 +2556,7 @@ error_alignment:
|
||||||
&& !elf_vxworks_create_dynamic_sections (dynobj, info,
|
&& !elf_vxworks_create_dynamic_sections (dynobj, info,
|
||||||
&htab->srelplt2))
|
&htab->srelplt2))
|
||||||
{
|
{
|
||||||
info->callbacks->einfo (_("%F: failed to create VxWorks dynamic sections\n"));
|
info->callbacks->einfo (_("%F%P: failed to create VxWorks dynamic sections\n"));
|
||||||
return pbfd;
|
return pbfd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2565,7 +2565,7 @@ error_alignment:
|
||||||
don't need to do it in check_relocs. */
|
don't need to do it in check_relocs. */
|
||||||
if (htab->elf.sgot == NULL
|
if (htab->elf.sgot == NULL
|
||||||
&& !_bfd_elf_create_got_section (dynobj, info))
|
&& !_bfd_elf_create_got_section (dynobj, info))
|
||||||
info->callbacks->einfo (_("%F: failed to create GOT sections\n"));
|
info->callbacks->einfo (_("%F%P: failed to create GOT sections\n"));
|
||||||
|
|
||||||
got_align = (bed->target_id == X86_64_ELF_DATA) ? 3 : 2;
|
got_align = (bed->target_id == X86_64_ELF_DATA) ? 3 : 2;
|
||||||
|
|
||||||
|
@ -2583,7 +2583,7 @@ error_alignment:
|
||||||
/* Create the ifunc sections here so that check_relocs can be
|
/* Create the ifunc sections here so that check_relocs can be
|
||||||
simplified. */
|
simplified. */
|
||||||
if (!_bfd_elf_create_ifunc_sections (dynobj, info))
|
if (!_bfd_elf_create_ifunc_sections (dynobj, info))
|
||||||
info->callbacks->einfo (_("%F: failed to create ifunc sections\n"));
|
info->callbacks->einfo (_("%F%P: failed to create ifunc sections\n"));
|
||||||
|
|
||||||
plt_alignment = bfd_log2 (htab->plt.plt_entry_size);
|
plt_alignment = bfd_log2 (htab->plt.plt_entry_size);
|
||||||
|
|
||||||
|
@ -2624,7 +2624,7 @@ error_alignment:
|
||||||
".plt.got",
|
".plt.got",
|
||||||
pltflags);
|
pltflags);
|
||||||
if (sec == NULL)
|
if (sec == NULL)
|
||||||
info->callbacks->einfo (_("%F: failed to create GOT PLT section\n"));
|
info->callbacks->einfo (_("%F%P: failed to create GOT PLT section\n"));
|
||||||
|
|
||||||
if (!bfd_set_section_alignment (dynobj, sec,
|
if (!bfd_set_section_alignment (dynobj, sec,
|
||||||
non_lazy_plt_alignment))
|
non_lazy_plt_alignment))
|
||||||
|
@ -2645,7 +2645,7 @@ error_alignment:
|
||||||
".plt.sec",
|
".plt.sec",
|
||||||
pltflags);
|
pltflags);
|
||||||
if (sec == NULL)
|
if (sec == NULL)
|
||||||
info->callbacks->einfo (_("%F: failed to create IBT-enabled PLT section\n"));
|
info->callbacks->einfo (_("%F%P: failed to create IBT-enabled PLT section\n"));
|
||||||
|
|
||||||
if (!bfd_set_section_alignment (dynobj, sec,
|
if (!bfd_set_section_alignment (dynobj, sec,
|
||||||
plt_alignment))
|
plt_alignment))
|
||||||
|
@ -2660,7 +2660,7 @@ error_alignment:
|
||||||
".plt.sec",
|
".plt.sec",
|
||||||
pltflags);
|
pltflags);
|
||||||
if (sec == NULL)
|
if (sec == NULL)
|
||||||
info->callbacks->einfo (_("%F: failed to create BND PLT section\n"));
|
info->callbacks->einfo (_("%F%P: failed to create BND PLT section\n"));
|
||||||
|
|
||||||
if (!bfd_set_section_alignment (dynobj, sec,
|
if (!bfd_set_section_alignment (dynobj, sec,
|
||||||
non_lazy_plt_alignment))
|
non_lazy_plt_alignment))
|
||||||
|
@ -2681,7 +2681,7 @@ error_alignment:
|
||||||
".eh_frame",
|
".eh_frame",
|
||||||
flags);
|
flags);
|
||||||
if (sec == NULL)
|
if (sec == NULL)
|
||||||
info->callbacks->einfo (_("%F: failed to create PLT .eh_frame section\n"));
|
info->callbacks->einfo (_("%F%P: failed to create PLT .eh_frame section\n"));
|
||||||
|
|
||||||
if (!bfd_set_section_alignment (dynobj, sec, class_align))
|
if (!bfd_set_section_alignment (dynobj, sec, class_align))
|
||||||
goto error_alignment;
|
goto error_alignment;
|
||||||
|
@ -2694,7 +2694,7 @@ error_alignment:
|
||||||
".eh_frame",
|
".eh_frame",
|
||||||
flags);
|
flags);
|
||||||
if (sec == NULL)
|
if (sec == NULL)
|
||||||
info->callbacks->einfo (_("%F: failed to create GOT PLT .eh_frame section\n"));
|
info->callbacks->einfo (_("%F%P: failed to create GOT PLT .eh_frame section\n"));
|
||||||
|
|
||||||
if (!bfd_set_section_alignment (dynobj, sec, class_align))
|
if (!bfd_set_section_alignment (dynobj, sec, class_align))
|
||||||
goto error_alignment;
|
goto error_alignment;
|
||||||
|
@ -2708,7 +2708,7 @@ error_alignment:
|
||||||
".eh_frame",
|
".eh_frame",
|
||||||
flags);
|
flags);
|
||||||
if (sec == NULL)
|
if (sec == NULL)
|
||||||
info->callbacks->einfo (_("%F: failed to create the second PLT .eh_frame section\n"));
|
info->callbacks->einfo (_("%F%P: failed to create the second PLT .eh_frame section\n"));
|
||||||
|
|
||||||
if (!bfd_set_section_alignment (dynobj, sec, class_align))
|
if (!bfd_set_section_alignment (dynobj, sec, class_align))
|
||||||
goto error_alignment;
|
goto error_alignment;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue