[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/27659] BFD (GNU Binutils for Debian) 2.36.1 internal error, abor

From: amodra at gmail dot com
Subject: [Bug ld/27659] BFD (GNU Binutils for Debian) 2.36.1 internal error, aborting at ../../bfd/elfcode.h:224 in bfd_elf32_swap_symbol_out
Date: Tue, 06 Jul 2021 02:09:16 +0000


--- Comment #16 from Alan Modra <amodra at gmail dot com> ---
(In reply to Nick Clifton from comment #12)
> It may be that a NULL shndx pointer is
> actually allowed
No, it isn't allowed (and passing a 0 as the *pointer* arg to H_PUT_32, see
bfd_putl32/bfd_putb32, will surely result in a segfault).

The patch was commited with 6e0dfbf420, accidentally I assume..

If you have an internal st_shndx greater than a little less than 64k, then ELF
requires those symbols to be represented externally with st_shndx 0xffff and
have the actual section index stored in an array of 32-bit words in a
SHT_SYMTAB_SHNDX section.  See elflink.c:bfd_elf_final_link

  /* The real buffer will be allocated in elf_link_swap_symbols_out.  */
    = (elf_numsections (abfd) > (SHN_LORESERVE & 0xFFFF)
       ? (Elf_External_Sym_Shndx *) -1 : NULL);

I think the most likely cause of this problem is a symbol st_shndx entry being
overwritten with bogus data somehow.

You are receiving this mail because:
You are on the CC list for the bug.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]