Subject: Re: Adding a start-of-data marker to loadelf
To: Martin Husemann <martin@duskware.de>
From: Jason Thorpe <thorpej@shagadelic.org>
List: tech-kern
Date: 06/04/2007 09:52:31
On Jun 4, 2007, at 9:46 AM, Martin Husemann wrote:
> Hi folks,
>
> I found myself in the need to figure out the final VA of the start
> of the
> data segment after loading a kernel with loadfile. There seemed to
> be no
> easy way ready to use, so I added a new marker, MARK_DATA, and
> filled it
> with the first data address loaded.
>
> It works for me, but I'm not sure if I didn't miss some other easy way
> to get this info.
Looks perfectly reasonable to me, although you could also have your
ldscript insert a symbol at the beginning of the data segment and then
just get the address of that.
>
>
> Martin
> <loadelf.patch>
-- thorpej