Failure with PR16566 new test on Mingw hosts
Clément Chigot
chigot@adacore.com
Tue May 23 08:48:06 GMT 2023
Hi Nick,
I've a weird failure on the new test introduced by 496917ce46 and its
-print-map-locals. On mingw, when cross-linking to any ELF targets,
adding the option results in a crash when writing the output
executable:
| $ ./ld-new.exe -o tmpdir/map-address -T .../map-address.t
tmpdir/map-address.o \
| -Map=tmpdir/map-locals.map --print-map-locals
| ld-new.exe: tmpdir/map-address: final close failed: No space left on device
It seems that a call to fwrite is failing with EPIPE, when writing the strtab.
| (gdb) bt
| #0 cache_bwrite (abfd=0x1014120,
| from=0x7ff769108395 <__PRETTY_FUNCTION__.0+85>, nbytes=1)
| at ./binutils-gdb/bfd/cache.c:383
| #1 0x00007ff768f2c88b in bfd_bwrite (
| ptr=0x7ff769108395 <__PRETTY_FUNCTION__.0+85>, size=1, abfd=0x1014120)
| at ./binutils-gdb/bfd/bfdio.c:316
| #2 0x00007ff768fa4265 in _bfd_elf_strtab_emit (abfd=0x1014120,
tab=0x102c9a0)
| at ./binutils-gdb/bfd/elf-strtab.c:318
| #3 0x00007ff768f6f9fd in _bfd_elf_write_object_contents (abfd=0x1014120)
| at ./binutils-gdb/bfd/elf.c:6743
| #4 0x00007ff768f3a8d4 in bfd_close (abfd=0x1014120)
| at ./binutils-gdb/bfd/opncls.c:887
| #5 0x00007ff768f019f4 in main (argc=8, argv=0x37c3dd0)
| at ./binutils-gdb/ld/ldmain.c:568
I don't know why but this seems to be triggered by the new call to
bfd_canonicalize_symtab introduced when we are logging the local
symbols [1].
Any idea about what's going on ?
[1] https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=ld/ldlang.c;hb=HEAD#l4918
Thanks,
Clément
More information about the Binutils
mailing list