mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-03 04:12:10 +08:00
c63d486281
The warning about discarded sections in elf_link_input_bfd doesn't belong there since the code is dealing with symbols. Multiple symbols in a discarded section will result in multiple identical warnings about the section. Move the warning to a new function in ldlang.c. The patch also tidies the warning quoting of section and file names, consistently using `%pA' and `%pB'. I'm no stickler for one style of section and file name quoting, but they ought to be consistent within a warning, eg. see the first one fixed in ldlang.c, and when a warning is emitted for multiple targets they all ought to use exactly the same format string to reduce translation work. elf64-ppc.c loses the build_one_stub errors since we won't get there before hitting the fatal errors in size_one_stub. bfd/ * elflink.c (elf_link_input_bfd): Don't warn here about discarded sections. * elf32-arm.c (arm_build_one_stub): Use consistent style in --enable-non-contiguous-regions error. * elf32-csky.c (csky_build_one_stub): Likewise. * elf32-hppa.c (hppa_build_one_stub): Likewise. * elf32-m68hc11.c (m68hc11_elf_build_one_stub): Likewise. * elf32-m68hc12.c (m68hc12_elf_build_one_stub): Likewise. * elf32-metag.c (metag_build_one_stub): Likewise. * elf32-nios2.c (nios2_build_one_stub): Likewise. * elfnn-aarch64.c (aarch64_build_one_stub): Likewise. * xcofflink.c (xcoff_build_one_stub): Likewise. * elf64-ppc.c (ppc_size_one_stub): Likewise. (ppc_build_one_stub): Delete dead code. ld/ * ldlang.c (lang_add_section): Use consistent style in --enable-non-contiguous-regions warnings. (size_input_section): Likewise. (warn_non_contiguous_discards): New function. (lang_process): Call it. * testsuite/ld-arm/non-contiguous-arm.d: Update. * testsuite/ld-arm/non-contiguous-arm4.d: Update. * testsuite/ld-arm/non-contiguous-arm7.d: Add --enable-non-contiguous-regions-warnings. * testsuite/ld-arm/non-contiguous-arm7.err: New. * testsuite/ld-powerpc/non-contiguous-powerpc.d: Update. * testsuite/ld-powerpc/non-contiguous-powerpc64.d: Update. |
||
---|---|---|
.. | ||
config | ||
ld-aarch64 | ||
ld-alpha | ||
ld-arc | ||
ld-arm | ||
ld-auto-import | ||
ld-avr | ||
ld-bootstrap | ||
ld-bpf | ||
ld-cdtest | ||
ld-checks | ||
ld-cris | ||
ld-crx | ||
ld-csky | ||
ld-ctf | ||
ld-cygwin | ||
ld-d10v | ||
ld-discard | ||
ld-dynamic | ||
ld-elf | ||
ld-elfcomm | ||
ld-elfvers | ||
ld-elfweak | ||
ld-fastcall | ||
ld-frv | ||
ld-gc | ||
ld-h8300 | ||
ld-i386 | ||
ld-ia64 | ||
ld-ifunc | ||
ld-libs | ||
ld-linkonce | ||
ld-loongarch-elf | ||
ld-m68hc11 | ||
ld-m68k | ||
ld-mep | ||
ld-metag | ||
ld-mips-elf | ||
ld-misc | ||
ld-mmix | ||
ld-mn10300 | ||
ld-msp430-elf | ||
ld-nds32 | ||
ld-nios2 | ||
ld-or1k | ||
ld-pdp11 | ||
ld-pe | ||
ld-pie | ||
ld-plugin | ||
ld-powerpc | ||
ld-pru | ||
ld-riscv-elf | ||
ld-s12z | ||
ld-s390 | ||
ld-scripts | ||
ld-selective | ||
ld-sframe | ||
ld-sh | ||
ld-shared | ||
ld-size | ||
ld-sparc | ||
ld-spu | ||
ld-srec | ||
ld-tic6x | ||
ld-tilegx | ||
ld-tilepro | ||
ld-undefined | ||
ld-unique | ||
ld-v850 | ||
ld-vax-elf | ||
ld-visium | ||
ld-vsb | ||
ld-vxworks | ||
ld-x86-64 | ||
ld-xstormy16 | ||
ld-xtensa | ||
ld-z8k | ||
ld-z80 | ||
lib | ||
ChangeLog-2004 | ||
ChangeLog-2005 | ||
ChangeLog-2006 | ||
ChangeLog-2007 | ||
ChangeLog-2008 | ||
ChangeLog-2009 | ||
ChangeLog-2010 | ||
ChangeLog-2011 | ||
ChangeLog-2012 | ||
ChangeLog-2013 | ||
ChangeLog-2014 | ||
ChangeLog-2015 | ||
ChangeLog-9303 |