Skip to content

Commit

Permalink
powerpc/vmlinux.lds: Move _edata down
Browse files Browse the repository at this point in the history
Currently _edata does not include several data sections, this causes
the kernel's report of memory usage at boot to not match reality, and
also prevents kmemleak from working - because it scan between _sdata
and _edata for pointers to allocated memory.

This mirrors a similar change made recently to the x86 linker script.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
  • Loading branch information
Michael Ellerman authored and Benjamin Herrenschmidt committed Aug 20, 2009
1 parent a15098c commit 903444e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions arch/powerpc/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -245,10 +245,6 @@ SECTIONS
}
#endif

. = ALIGN(PAGE_SIZE);
_edata = .;
PROVIDE32 (edata = .);

/* The initial task and kernel stack */
#ifdef CONFIG_PPC32
. = ALIGN(8192);
Expand Down Expand Up @@ -282,6 +278,10 @@ SECTIONS
__nosave_end = .;
}

. = ALIGN(PAGE_SIZE);
_edata = .;
PROVIDE32 (edata = .);

/*
* And finally the bss
*/
Expand Down

0 comments on commit 903444e

Please sign in to comment.