On Wed, 24 Jul 2002, Johannes Stezenbach wrote:
> I found that the cause for this is that _stext (defined in head.S) is in
> .text.init instead of .text, so it's past _etext.
> I suggest the patch below to fix the bad formatting, but I'm
> not shure about _stext. Should kernel_entry be placed into the .text
> section, or should _stext = _ftext in ld.script?
I think the intent is to skip initial parts of .text, specifically the
exception handlers (if linked at KSEG0). kernel_entry is in .text.init
deliberately, as it's not needed except early in the boot process. I
propose the following change. Does it work for you?
> Another nit (I don't have ejtag, so I don't care much):
> head.S: Assembler messages:
> head.S:102: Warning: Macro instruction expanded into multiple instructions
> in a branch delay slot
> Maybe someone has spare nop to put there.
The warning is spurious, but there seems no way to shut up gas in this
condition. Thus an extra "nop" looks like the right workaround.
I'll check your patch at run-time later -- I've noticed that the current
output is less than satisfying.
+ Maciej W. Rozycki, Technical University of Gdansk, Poland +
+ e-mail: firstname.lastname@example.org, PGP key available +
diff -up --recursive --new-file
2002-06-04 03:04:12.000000000 +0000
+++ linux-mips-2.4.19-rc1-20020719/arch/mips/kernel/head.S 2002-07-25
@@ -35,6 +35,10 @@
+ /* The following two symbols are used for kernel profiling. */
/* Cache Error */
@@ -144,9 +148,6 @@ ejtag_return:
NESTED(kernel_entry, 16, sp)
- /* The following two symbols are used for kernel profiling. */
* Stack for kernel and init, current variable