]> xenbits.xensource.com Git - people/royger/xen.git/commit
x86/boot: create *.lnk files with linker script
authorDaniel Kiper <daniel.kiper@oracle.com>
Thu, 25 Aug 2016 12:00:57 +0000 (14:00 +0200)
committerJan Beulich <jbeulich@suse.com>
Thu, 25 Aug 2016 12:00:57 +0000 (14:00 +0200)
commit93c0c0287ad55884411c62de15ad6dbd5d5cb353
treef8ced925ecf7219277eb6dc2f9e81b59334dfaa7
parent223b03d1a6996386e238338a029e4b61532605cc
x86/boot: create *.lnk files with linker script

Newer GCC (e.g. gcc version 5.1.1 20150618 (Red Hat 5.1.1-4) (GCC)) does
some code optimizations by creating data sections (e.g. jump addresses
for C switch/case are calculated using data in .rodata section). This
thing is not accepted by *.lnk build recipe which requires that only .text
section lives in output. Potentially we can inhibit this GCC behavior by
using special options, e.g. -fno-tree-switch-conversion. However, this
does not guarantee that in the future new similar optimizations or anything
else which creates not accepted sections will not break our build recipes
again. I do not mention that probably this is not good idea to just disable
random optimizations. So, take over full control on *.lnk linking process
by using linker script and merge all text and data sections into one
.text section.

Additionally, remove .got.plt section which is not used in our final code.

Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/boot/build32.lds [new file with mode: 0644]
xen/arch/x86/boot/build32.mk