As reported here: https://sourceware.org/pipermail/binutils/2024-August/136267.html When linking binaries with --rosegment enabled the .note.build-id section is moved away from the ELF headers. This causes problems for GDB since it relies upon the fact that when the kernel creates core dumps it includes the first page of the executable's memory map. A page which used to include the .note.build-id section. With this information GDB is able to further process the core file.
Fixed by commit bf6d7087de0a7351fd1dfd5f41522a7f4f576180
(In reply to Nick Clifton from comment #1) > Fixed by commit bf6d7087de0a7351fd1dfd5f41522a7f4f576180 Since this commit isn't backported to 2.43 branch, should we apply https://sourceware.org/pipermail/binutils/2024-September/136865.html to fix -z separate-code on 2.43 branch?
Hi H.J. That makes sense. Please go ahead and apply the patch to the branch. Cheers Nick