aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/python.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2025-08-05 21:18:44 +0930
committerAlan Modra <amodra@gmail.com>2025-08-06 08:53:19 +0930
commitb64e0a281623be62ffb610bb3c401317a1154524 (patch)
treefd11ab63ef7e1bdca1cc50c5f5cdf79e30cd0992 /gdb/python/python.c
parent9dd189d3ed6ea239247637656bf2990f6dfb4522 (diff)
downloadbinutils-b64e0a281623be62ffb610bb3c401317a1154524.zip
binutils-b64e0a281623be62ffb610bb3c401317a1154524.tar.gz
binutils-b64e0a281623be62ffb610bb3c401317a1154524.tar.bz2
Remove bfd_check_format_lto
Tidy changes to bfd_check_format_matches made by commit 9b854f169df9 which added a bfd_plugin_specified_p test and commit f752be8f916e which added an lto_sections_removed arg. Both of these changes are unnecessary if plugin_format is set to bfd_plugin_no before calling bfd_check_format. bfd_plugin_no will prevent the plugin object_p function from returning a match (and in the first case from a segfault when loading plugins while a plugin is running). The plugin object_p function already protected itself from recursive calls by setting bfd_plugin_no before loading a plugin, but commit 9b854f169df9 opened new bfds so they were unprotected. It isn't strictly necessary to test for bfd_plugin_no in bfd_check_format_matches but I kept the check to minimise functional changes. Close inspection of the patch will notice I've added an is_linker_input test too. That also isn't strictly necessary, I think, but the match_count test was for the linker. See commit 999d6dff80fa. PR 12291 PR 12430 PR 13298 PR 33198 bfd/ * format.c (bfd_check_format_lto): Revert to bfd_check_format. (bfd_check_format_matches_lto): Revert to bfd_check_format_matches. Correct comments. Manage both the lto_sections_removed and bfd_plugin_specified_p cases by testing for bfd_plugin_no. * plugin.c (bfd_plugin_get_symbols_in_object_only): Set plugin_format to bfd_plugin_no before checking new bfds. (try_load_plugin): Comment setting bfd_plugin_no. (bfd_plugin_specified_p): Delete. * plugin.h (bfd_plugin_specified_p): Delete. * bfd-in2.h: Regenerate. binutils/ * objcopy.c (copy_archive): Replace bfd_check_format_lto calls with bfd_check_format using plugin_format set to bfd_plugin_no. (check_format_object): New function. (copy_file): Use it.
Diffstat (limited to 'gdb/python/python.c')
0 files changed, 0 insertions, 0 deletions