Skip to contentSkip to conversation

x86-64/EFI: discard .comment.* sections

PATCH New Jan Beulich 1 participant 1 message Jul 8, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86-64/EFI: discard .comment.* sections

The SuSE version of gcc produces a non-standard section named .comment.SUSE.OPTs, but the PE32+ handling in binutils can't really deal with any section to be placed at virtual address zero (and not needing to be loaded). Even if binutils did, at least the UEFI implementation in EDK 1.06 doesn't look at the section characteristics at all, and hence would attempt to load such a section, and fail or corrupt other data.

xen/arch/x86/xen.lds.S +1 -0
@@ -163,6 +163,7 @@ SECTIONS
        *(.eh_frame)
 #ifdef EFI
        *(.comment)
+       *(.comment.*)
 #endif
   }
 

The SuSE version of gcc produces a non-standard section named .comment.SUSE.OPTs, but the PE32+ handling in binutils can't really deal with any section to be placed at virtual address zero (and not needing to be loaded). Even if binutils did, at least the UEFI implementation in EDK 1.06 doesn't look at the section characteristics at all, and hence would attempt to load such a section, and fail or corrupt other data.

xen/arch/x86/xen.lds.S +1 -0
@@ -163,6 +163,7 @@ SECTIONS
        *(.eh_frame)
 #ifdef EFI
        *(.comment)
+       *(.comment.*)
 #endif
   }
 

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel