]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
PR 32603, ld -w misbehaviour
authorAlan Modra <amodra@gmail.com>
Thu, 6 Feb 2025 11:16:22 +0000 (21:46 +1030)
committerAlan Modra <amodra@gmail.com>
Thu, 6 Feb 2025 11:45:08 +0000 (22:15 +1030)
commit8d97c1a53f3dc9fd8e1ccdb039b8a33d50133150
treeb084d1b4155dd60617396fb2d51179d276f75038
parent6be6e5b8ee95eda6f12f5bb0fbc2a17a42265ffb
PR 32603, ld -w misbehaviour

ld -w currently causes segmentation faults and other misbehaviour
since it changes einfo with %F in the format string (fatal error) to
not exit.  This patch fixes that by introducing a new variant of einfo
called "fatal" that always exits, and replaces all einfo calls using
%F with a call to fatal without the %F.  I considered modifying einfo
to inspect the first 2 or 4 chars in the format string, looking for
%F, but decided that was probably a bad idea given that translators
might have moved the %F.  It's also a little nicer to inform the
compiler of a function that doesn't return.

The patch also fixes some formatting nits, and makes use of %pA
to print section names in a couple of places in aix.em.
55 files changed:
ld/emulparams/call_nop.sh
ld/emulparams/cet.sh
ld/emulparams/elf32mcore.sh
ld/emulparams/x86-64-lam.sh
ld/emulparams/x86-64-level-report.sh
ld/emulparams/x86-64-level.sh
ld/emultempl/aarch64elf.em
ld/emultempl/aix.em
ld/emultempl/armelf.em
ld/emultempl/avrelf.em
ld/emultempl/beos.em
ld/emultempl/cr16elf.em
ld/emultempl/cskyelf.em
ld/emultempl/elf.em
ld/emultempl/hppaelf.em
ld/emultempl/kvxelf.em
ld/emultempl/loongarchelf.em
ld/emultempl/m68hc1xelf.em
ld/emultempl/m68kelf.em
ld/emultempl/metagelf.em
ld/emultempl/mipself.em
ld/emultempl/mmix-elfnmmo.em
ld/emultempl/nds32elf.em
ld/emultempl/nto.em
ld/emultempl/pe.em
ld/emultempl/pep.em
ld/emultempl/ppc32elf.em
ld/emultempl/ppc64elf.em
ld/emultempl/riscvelf.em
ld/emultempl/s390.em
ld/emultempl/scoreelf.em
ld/emultempl/spuelf.em
ld/emultempl/tic6xdsbt.em
ld/emultempl/ticoff.em
ld/emultempl/v850elf.em
ld/emultempl/vms.em
ld/emultempl/xtensaelf.em
ld/emultempl/z80.em
ld/ldcref.c
ld/ldelf.c
ld/ldelfgen.c
ld/ldemul.c
ld/ldexp.c
ld/ldfile.c
ld/ldgram.y
ld/ldlang.c
ld/ldlex.l
ld/ldmain.c
ld/ldmisc.c
ld/ldmisc.h
ld/ldwrite.c
ld/lexsup.c
ld/mri.c
ld/pe-dll.c
ld/plugin.c