aboutsummaryrefslogtreecommitdiff
path: root/gdb/ChangeLog-1999
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2025-08-04 15:29:22 +0930
committerAlan Modra <amodra@gmail.com>2025-08-16 10:28:58 +0930
commit28daddd33accbfc519a2663a4e1bfaa66eafcef0 (patch)
tree9607099cfcf57c5ee33f9c50eee1651bb8e93e93 /gdb/ChangeLog-1999
parentbcd739ed0439c29f5789f57f8e28cd0534f721c7 (diff)
downloadgdb-master.zip
gdb-master.tar.gz
gdb-master.tar.bz2
Make bfd_check_format better respect given targetHEADmaster
bfd_check_format currently does not take much notice of the target set in its abfd arg, merely checking that target first if target_defaulted is false. As the comment says this was due to complications with archive handling which I think was fixed in commit f832531609d0. It should now be possible to just check the given target, except for linker input files. This will speed checking the target of the first file in archives, which is done in the process of matching archive targets. This will no doubt expose some misuse of target options, as found in the binutils "efi app" tests. The stricter checking also exposed some errors. Cris targets gave "FAIL: objcopy decompress debug sections in archive (reason: unexpected output)" "FAIL: objcopy decompress debug sections in archive with zlib-gabi (reason: unexpected output)" without the bfd_generic_archive_p fix. cris has a default target of cris-aout which doesn't match objects for any of the cris-elf or cris-linux targets. The problem here was that checking the first object file in archives didn't match but a logic error there meant bfd_error_wrong_object_format wasn't returned as it should be. There was also a possibility of bfd_error_wrong_object_format persisting from one target check to the next. bfd/ * archive.c (bfd_generic_archive_p): Correct object in archive target test. * format.c (bfd_check_format_matches_lto): Try to match given target first even when target_defaulted is set. Don't try other targets if !target_defaulted except for linker input. Clear bfd_error before attempted target matches. * targets.c (bfd_find_target): Set target_defaulted for plugin target. binutils/ * bucomm.h (set_plugin_target): Set target_defaulted. * testsuite/binutils-all/aarch64/pei-aarch64-little.d: Don't wrongly specify both input and output target, just specify output. * testsuite/binutils-all/loongarch64/pei-loongarch64.d: Likewise. * testsuite/binutils-all/riscv/pei-riscv64.d: Likewise.
Diffstat (limited to 'gdb/ChangeLog-1999')
0 files changed, 0 insertions, 0 deletions