* Attempt at addressing head*.S for modpost warnings
@ 2007-07-25 6:49 Kumar Gala
2007-07-31 1:50 ` Stephen Rothwell
0 siblings, 1 reply; 3+ messages in thread
From: Kumar Gala @ 2007-07-25 6:49 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: linuxppc-dev, Paul Mackerras
Stephen,
Paul said you were looking into this issue as well. Wanted to post what I
did on ppc32/e500 as a start for you to look at. I think the other ppc32
head*.S can follow the same pattern if we like this. However, wasn't sure
how to do _ENTRY() for ppc64.
- k
diff --git a/arch/powerpc/kernel/head_fsl_booke.S b/arch/powerpc/kernel/head_fsl_booke.S
index 1f155d3..d83cbbb 100644
--- a/arch/powerpc/kernel/head_fsl_booke.S
+++ b/arch/powerpc/kernel/head_fsl_booke.S
@@ -52,9 +52,9 @@
* r7 - End of kernel command line string
*
*/
- .text
-_GLOBAL(_stext)
-_GLOBAL(_start)
+ .section .text.head, "ax"
+_ENTRY(_stext);
+_ENTRY(_start);
/*
* Reserve a word at a fixed location to store the address
* of abatron_pteptrs
diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S
index 0c45855..823a8cb 100644
--- a/arch/powerpc/kernel/vmlinux.lds.S
+++ b/arch/powerpc/kernel/vmlinux.lds.S
@@ -34,6 +34,8 @@ SECTIONS
/* Text and gots */
.text : {
+ ALIGN_FUNCTION();
+ *(.text.head)
_text = .;
TEXT_TEXT
SCHED_TEXT
diff --git a/include/asm-powerpc/ppc_asm.h b/include/asm-powerpc/ppc_asm.h
index fa083d8..7ec22d2 100644
--- a/include/asm-powerpc/ppc_asm.h
+++ b/include/asm-powerpc/ppc_asm.h
@@ -183,6 +183,11 @@ GLUE(.,name):
#else /* 32-bit */
+#define _ENTRY(n) \
+ .stabs __stringify(n:F-1),N_FUN,0,0,n;\
+ .globl n; \
+n:
+
#define _GLOBAL(n) \
.text; \
.stabs __stringify(n:F-1),N_FUN,0,0,n;\
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: Attempt at addressing head*.S for modpost warnings
2007-07-25 6:49 Attempt at addressing head*.S for modpost warnings Kumar Gala
@ 2007-07-31 1:50 ` Stephen Rothwell
2007-07-31 4:29 ` Kumar Gala
0 siblings, 1 reply; 3+ messages in thread
From: Stephen Rothwell @ 2007-07-31 1:50 UTC (permalink / raw)
To: Kumar Gala; +Cc: linuxppc-dev, Paul Mackerras
[-- Attachment #1: Type: text/plain, Size: 948 bytes --]
Hi Kumar,
[sorry for the slow reply]
On Wed, 25 Jul 2007 01:49:04 -0500 (CDT) Kumar Gala <galak@kernel.crashing.org> wrote:
>
> Paul said you were looking into this issue as well. Wanted to post what I
> did on ppc32/e500 as a start for you to look at. I think the other ppc32
> head*.S can follow the same pattern if we like this. However, wasn't sure
> how to do _ENTRY() for ppc64.
What I have done so far is to put some peices of the asm code into
the .text.init.refok section (see the _INIT_STATIC macro in asm/ppc_asm.h
in the current kernel). I was hoping to separate some of the asm into a
new file (init_64.S) that would contain this and other code in
the .init.text section. That is currently not working (ld crashed on
me :-)).
Even if you create a .text.head, you will need to teach modpost about it.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Attempt at addressing head*.S for modpost warnings
2007-07-31 1:50 ` Stephen Rothwell
@ 2007-07-31 4:29 ` Kumar Gala
0 siblings, 0 replies; 3+ messages in thread
From: Kumar Gala @ 2007-07-31 4:29 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: linuxppc-dev, Paul Mackerras
On Jul 30, 2007, at 8:50 PM, Stephen Rothwell wrote:
> Hi Kumar,
>
> [sorry for the slow reply]
>
> On Wed, 25 Jul 2007 01:49:04 -0500 (CDT) Kumar Gala
> <galak@kernel.crashing.org> wrote:
>>
>> Paul said you were looking into this issue as well. Wanted to
>> post what I
>> did on ppc32/e500 as a start for you to look at. I think the
>> other ppc32
>> head*.S can follow the same pattern if we like this. However,
>> wasn't sure
>> how to do _ENTRY() for ppc64.
>
> What I have done so far is to put some peices of the asm code into
> the .text.init.refok section (see the _INIT_STATIC macro in asm/
> ppc_asm.h
> in the current kernel). I was hoping to separate some of the asm
> into a
> new file (init_64.S) that would contain this and other code in
> the .init.text section. That is currently not working (ld crashed on
> me :-)).
>
> Even if you create a .text.head, you will need to teach modpost
> about it.
Modpost is already aware of .text.head. Its used on x86 and a few
other archs today.
- k
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-07-31 4:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-25 6:49 Attempt at addressing head*.S for modpost warnings Kumar Gala
2007-07-31 1:50 ` Stephen Rothwell
2007-07-31 4:29 ` Kumar Gala
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).