Hide Forgot
Created attachment 1143380 [details] Proposed patch Description of problem: The function ld/ldlang.c:cmdline_add_object_only_section() assigns the variable ofilename to the result of bfd_get_filename(), but it does not copy the result. Thus once bfd_close has been called on the file, ofilename no longer points to valid memory. But, it is still used by cmdline_add_object_only_section as an argument to rename(). Version-Release number of selected component (if applicable): n/a. How reproducible: Run linker testsuite. Note failures of LTO 5 and LTO 3 tests. Additional info:
This BZ has already been fixed by another commit.