aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2023-04-13 11:44:41 +0930
committerAlan Modra <amodra@gmail.com>2023-04-13 12:26:00 +0930
commit5d1fefd3b35589d792e5bff800d2bb7e9c4431e2 (patch)
tree6b45cc40038a212c3031a4f7341106ed5304e8fb /gdb
parent89558daae726d14f33a0dd65178527c072b158cd (diff)
downloadbinutils-5d1fefd3b35589d792e5bff800d2bb7e9c4431e2.zip
binutils-5d1fefd3b35589d792e5bff800d2bb7e9c4431e2.tar.gz
binutils-5d1fefd3b35589d792e5bff800d2bb7e9c4431e2.tar.bz2
Re: pe_ILF_object_p and bfd_check_format_matches
The last patch wasn't quite correct. bfd_preserve_restore also needs to handle an in-memory to file backed transition, seen in a testcase ILF object matching both pei-arm-little and pei-arm-wince-little. There the first match is saved in preserve_match, and restored at the end of the bfd_check_format_matches loop making the bfd in-memory. On finding more than one match the function wants to restore the bfd back to its original state with another bfd_preserve_restore call before exiting with a bfd_error_file_ambiguously_recognized error. It is also not correct to restore abfd->iostream unless the iovec changes. abfd->iostream is a FILE* when using cache_iovec, and if the file has been closed and reopened the iostream may have changed. * format.c (io_reinit): New function. (bfd_reinit, bfd_preserve_restore): Use it.
Diffstat (limited to 'gdb')
0 files changed, 0 insertions, 0 deletions