[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <alpine.DEB.1.10.0909080930580.28351@dr-wily.mit.edu>
Date: Tue, 8 Sep 2009 10:36:33 -0400 (EDT)
From: Tim Abbott <tabbott@...lice.com>
To: Greg Ungerer <gerg@...pgear.com>
cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Sam Ravnborg <sam@...nborg.org>,
Greg Ungerer <gerg@...inux.org>
Subject: Re: [PATCH] m68knommu: Clean up linker script using new linker script
macros.
On Tue, 8 Sep 2009, Greg Ungerer wrote:
> But now the bss section doesn't looked properly aligned (at
> least it is not on a page boundary any longer after the init.data):
>
> Sections:
> Idx Name Size VMA LMA File off Algn
> 0 .text 00124ab8 40020000 40020000 00002000 2**4
> CONTENTS, ALLOC, LOAD, READONLY, CODE
> 1 .data 00011540 40144ac0 40144ac0 00126ac0 2**4
> CONTENTS, ALLOC, LOAD, DATA
> 2 .init.text 0000a96c 40156000 40156000 00138000 2**2
> CONTENTS, ALLOC, LOAD, READONLY, CODE
> 3 .init.data 00000b7c 4016096c 4016096c 0014296c 2**2
> CONTENTS, ALLOC, LOAD, DATA
> 4 .bss 0000a9e8 401614f0 401614f0 001434e8 2**4
> ALLOC
> 5 .comment 00001c8c 00000000 00000000 001434e8 2**0
> CONTENTS, READONLY
>
> Seems kind of odd because:
>
> 40156000 A __init_begin
> 40162000 A __init_end
> 401614f0 B _sbss
Yes, that is quite odd.
> The resulting kernels don't boot.
Right, presumably a big chunk of the .sbss code is being freed since _sbss
is before __init_end.
I'm guessing the issue here is that the __init_begin and __init_end
markers are now not actually in a section (and thus don't have a memory
region marker attached). Does the following patch cause _sbss to not
overlap the init region?
-Tim Abbott
diff --git a/arch/m68knommu/kernel/vmlinux.lds.S b/arch/m68knommu/kernel/vmlinux.lds.S
index c380040..81b54cb 100644
--- a/arch/m68knommu/kernel/vmlinux.lds.S
+++ b/arch/m68knommu/kernel/vmlinux.lds.S
@@ -154,12 +154,16 @@ SECTIONS {
_edata = . ;
} > DATA
- . = ALIGN(PAGE_SIZE);
- __init_begin = .;
+ .init_begin : {
+ . = ALIGN(PAGE_SIZE);
+ __init_begin = .;
+ } > INIT
INIT_TEXT_SECTION(PAGE_SIZE) > INIT
INIT_DATA_SECTION(16) > INIT
- . = ALIGN(PAGE_SIZE);
- __init_end = .;
+ .init_end : {
+ . = ALIGN(PAGE_SIZE);
+ __init_end = .;
+ } > INIT
/DISCARD/ : {
EXIT_TEXT
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists