Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
x86/build32: Discard all orphaned sections
Linkers may put orphaned sections ahead of .text, which breaks the calling requirements. A concrete example is Ubuntu's GCC-9 default of enabling -fcf-protection which causes us to try and execute .note.gnu.properties during Xen's boot. Put .got.plt in its own section as it specifically needs preserving from the linkers point of view, and discard everything else. This will hopefully be more robust to other unexpected toolchain properties. Fixes boot from an Ubuntu build of Xen. Reported-by: Jason Andryuk <[email protected]> Signed-off-by: Andrew Cooper <[email protected]> Tested-by: Jason Andryuk <[email protected]> Acked-by: Jan Beulich <[email protected]>
- Loading branch information