[PATCH] elf: Get the real kept section
H.J. Lu
hjl.tools@gmail.com
Sat Nov 28 02:31:22 GMT 2020
On Fri, Nov 27, 2020 at 2:27 PM Alan Modra <amodra@gmail.com> wrote:
>
> On Fri, Nov 27, 2020 at 04:57:05PM +0100, Hans-Peter Nilsson via Binutils wrote:
> > I'll have to investigate this on my side.
>
> FWIW, I didn't see any cris fails either. My current list of fails
> for the new test is:
>
> $ grep 26936 gastest_results
> am33_2.0-linux FAIL: ld-elf/pr26936
> arc-elf FAIL: ld-elf/pr26936
> arm-symbianelf FAIL: ld-elf/pr26936
> hppa64-hp-hpux11.23 FAIL: ld-elf/pr26936
> mips-sgi-irix6 FAIL: ld-elf/pr26936
> mipstx39-elf FAIL: ld-elf/pr26936
> mn10300-elf FAIL: ld-elf/pr26936
> riscv64-linux FAIL: ld-elf/pr26936
> xtensa-elf FAIL: ld-elf/pr26936
>
linkonce section may not be mixed with comdat section. For xtensa-elf,
COMDAT group section [ 1] `.group' [__x86.get_pc_thunk.bx] contains
3 sections:
[Index] Name
[ 5] .text.__x86.get_pc_thunk.bx
[ 15] .xt.prop.bx
[ 16] .rela.xt.prop.bx
elflink.c has
/* A single member comdat group section may be discarded by a
linkonce section and vice versa. */
if ((flags & SEC_GROUP) != 0)
{
asection *first = elf_next_in_group (sec);
if (first != NULL && elf_next_in_group (first) == first)
/* Check this single member group against linkonce sections. */
for (l = already_linked_list->entry; l != NULL; l = l->next)
if ((l->sec->flags & SEC_GROUP) == 0
&& bfd_elf_match_symbols_in_sections (l->sec, first, info))
{
first->output_section = bfd_abs_section_ptr;
first->kept_section = l->sec;
sec->output_section = bfd_abs_section_ptr;
break;
}
}
--
H.J.
More information about the Binutils
mailing list