PATCH bfd: Fix linker warning for recently introduced arm attributes

Simon Marchi simon.marchi@polymtl.ca
Tue Oct 5 02:49:58 GMT 2021


On 2021-09-27 10:40, Andrea Corallo wrote:> Hi all,
> 
> this simple patch updates the value of 'NUM_KNOWN_OBJ_ATTRIBUTES' so
> that when linking objects with 'Tag_BTI_use' or 'Tag_PACRET_use' set ld
> does not emit the "unknown EABI object attribute" warning.
> 
> Regtested clean, okay for trunk?
> 
> Best Regards
> 
>   Andrea
> 
Hi Andrea,

I get some GDB failures starting with this commit.  To run:

gdb/ $ make check TESTS="gdb.cp/ambiguous.exp"

And in gdb.log:

    49 (gdb) file /home/simark/build/binutils-gdb/gdb/testsuite/outputs/gdb.cp/ambiguous/ambiguous^M
    50 BFD: BFD (GNU Binutils) 2.37.50.20210924 assertion fail /home/simark/src/binutils-gdb/bfd/elf.c:240^M
    51 BFD: /home/simark/build/binutils-gdb/gdb/testsuite/outputs/gdb.cp/ambiguous/ambiguous: warning: multiple dynamic symbol tables detected - ignoring the table in section 6^M
    52 ^M
    53 ^M
    54 Fatal signal: Segmentation fault^M

Just loading the file in GDB is enough to reproduce:

  $ ./gdb -nx -q --data-directory=data-directory testsuite/outputs/gdb.cp/ambiguous/ambiguous

crashes here:

    #16 0x55695f64f856 in handle_sigsegv /home/simark/src/binutils-gdb/gdb/event-top.c:971
    #17 0x7fd2187fe86f  (/usr/lib/libpthread.so.0+0x1386f)
    #18 0x556960b22a45 in bfd_section_from_shdr /home/simark/src/binutils-gdb/bfd/elf.c:2308
    #19 0x556960b07f92 in bfd_elf64_object_p /home/simark/src/binutils-gdb/bfd/elfcode.h:834
    #20 0x556960aa5eec in bfd_check_format_matches /home/simark/src/binutils-gdb/bfd/format.c:343
    #21 0x55695f65703b in exec_file_attach(char const*, int) /home/simark/src/binutils-gdb/gdb/exec.c:471
    #22 0x55695fa8aa48 in catch_command_errors /home/simark/src/binutils-gdb/gdb/main.c:523
    #23 0x55695fa8db42 in captured_main_1 /home/simark/src/binutils-gdb/gdb/main.c:1233
    #24 0x55695fa8edbe in captured_main /home/simark/src/binutils-gdb/gdb/main.c:1343
    #25 0x55695fa8ee53 in gdb_main(captured_main_args*) /home/simark/src/binutils-gdb/gdb/main.c:1368
    #26 0x55695ecd5ad8 in main /home/simark/src/binutils-gdb/gdb/gdb.c:32
    #27 0x7fd217f11b24 in __libc_start_main (/usr/lib/libc.so.6+0x27b24)
    #28 0x55695ecd58ad in _start (/home/simark/build/binutils-gdb/gdb/gdb+0x12ec8ad)

Simon


More information about the Binutils mailing list