[PATCH] xen: fix section usage in xen-head.S

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Sam Ravnborg
Date: Saturday, January 19, 2008 - 6:17 am

Failing to specify "ax" in the pushsection caused ld to generate
an additional section for .init.text appending a number.

A side effect of this was a section mismatch warning because modpost
did not recognize a .init.text section named .init.text.1:
WARNING: vmlinux.o(.text.head+0x247): Section mismatch: reference to .init.text.1:start_kernel (between 'is386' and 'check_x87')

Fix this by hardcoding the "ax" in the pushsection.
Thanks to Torlaf for reporting this.

Alan Modra @ binutils provided the hint that made me
able to locate the root cause of this warning. 

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Jeremy Fitzhardinge <jeremy@xensource.com>
Cc: Chris Wright <chrisw@sous-sol.org>
Cc: WANG Cong <xiyou.wangcong@gmail.com>
Cc: Toralf Förster <toralf.foerster@gmx.de>
---

diff --git a/arch/x86/xen/xen-head.S b/arch/x86/xen/xen-head.S
index f8d6937..b05e85d 100644
--- a/arch/x86/xen/xen-head.S
+++ b/arch/x86/xen/xen-head.S
@@ -7,7 +7,7 @@
 #include <asm/boot.h>
 #include <xen/interface/elfnote.h>
 
-.pushsection .init.text
+.pushsection .init.text, "ax"
 ENTRY(startup_xen)
 	movl %esi,xen_start_info
 	cld
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] xen: fix section usage in xen-head.S, Sam Ravnborg, (Sat Jan 19, 6:17 am)
Re: [updated PATCH] xen: fix section usage in xen-head.S a ..., Jeremy Fitzhardinge, (Sat Jan 19, 3:23 pm)