Skip to contentSkip to conversation

i386: Specify section flags while creating new sections

PATCH New Vivek Goyal 1 participant 1 message Jan 3, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 4/4 i386: Specify section flags while creating new sections

o Older binutils (older than 2.6.15) require explicit flags to be set for section. (if a section has been defined using "section" directive). Otherwise a section which should have been allocatable and executable (AX) will not have properties as per intention.

o I had put a patch in -mm which will break the things if used with older binutils. Hence this is the fix on top of that patch.

http://kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.20-rc2/2.6.20-rc2-mm1/broken-out/i386-move-startup_32-in-texthead-section.patch

---

 arch/i386/kernel/head.S |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
arch/i386/kernel/head.S renamed from arch/i386/kernel/head.S~i386-modify-section-directive-for-older-binutils +3 -3
diff -puN arch/i386/kernel/head.S~i386-modify-section-directive-for-older-binutils arch/i386/kernel/head.S
@@ -53,7 +53,7 @@
  * any particular GDT layout, because we load our own as soon as we
  * can.
  */
-.section .text.head
+.section .text.head,"ax",@progbits
 ENTRY(startup_32)
 
 #ifdef CONFIG_PARAVIRT
@@ -155,9 +155,9 @@ page_pde_offset = (__PAGE_OFFSET >> 20);
  */
 
 #ifdef CONFIG_HOTPLUG_CPU
-.section .text
+.section .text,"ax",@progbits
 #else
-.section .init.text
+.section .init.text,"ax",@progbits
 #endif
 
 #ifdef CONFIG_SMP

_