https://sourceware.org/bugzilla/show_bug.cgi?id=24717
Mark Wielaard <mark at klomp dot org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mark at klomp dot org --- Comment #2 from Mark Wielaard <mark at klomp dot org> --- A main executable and a separate debug file have the exact same program headers. This is to make matching them together easier. It also helps to have to original program headers in the debug file for unstrip when the main executable file has been prelinked, so you can still recombine them. You cannot rely on the program headers in a .debug file since all allocated sections (except for SHT_NOTES) have been replaced by NOBITS. The reason this seems to work out for the .build_id NOTE is because it is always put at the front of the file, so no other sections are removed before it when put into a .debug file (and so the offset stays the same). If you want this to work for any other allocated NOTEs then the linker would have to sort them together at the front of the file (right after the .build-id NOTE, the .build-id NOTE should always be first, so it gets dumped with the ELF headers in a core file). But in general I would say that programs that rely on the program headers in a split .debug file are just broken. -- You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils