]> xenbits.xensource.com Git - people/andrewcoop/xen.git/commit
work around Clang generating .data.rel.ro section for init-only files
authorAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 25 Feb 2016 12:01:01 +0000 (13:01 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 25 Feb 2016 12:01:01 +0000 (13:01 +0100)
commit00d5d5ce23e6bfe0a3b0bdddd44d68d661af7da5
tree091d5576b8941f6b87947ffab31bda2247eef429
parentb0c0ce90eec53a031c83ad70c3181bfb92ec8b7d
work around Clang generating .data.rel.ro section for init-only files

Clang-3.8 generates several .data.rel.ro sections when compiling Xen.  As
these contain no global symbols, they should be .data.rel.ro.local.  This
breaks the SPECIAL_DATA_SECTIONS check when converting the transition units to
being init-only.

For alternatives.c, explicitly move the nops arrays into __initconst.  For efi
boot.c, manually create the optimisation performed by Clang by collapsing the
switch statement into a lookup table.  The double use of const is required to
avoid breaking the ARM build by creating a section type conflict with
fdt_guid.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
xen/arch/arm/xen.lds.S
xen/arch/x86/alternative.c
xen/arch/x86/xen.lds.S
xen/common/efi/boot.c
xen/include/xen/init.h