This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Creating .note sections


Ceri Storey <cez at necrofish dot org dot uk> writes:

> On Thu, Apr 24, 2003 at 10:19:35AM -0700, Ian Lance Taylor wrote:
> > That's interesting.  I assume that the section has a fixed size.  That
> Pretty much.
> 
> > [...] 
> 
> Thanks all, but I've decided that libelf is a better solution, if rather
> more low level. I'm just concentrating on getting it working, for the
> moment :)

The problem with adding the section after the executable has been
linked is that you want the section to go into a loadable segment, but
the linker didn't make space for it.  You're going to have to refiddle
the loadable segments, which means that you're going to have to move
sections around in virtual memory space and also in the file itsefl.
It may be that libelf will take care of all that for you; I haven't
used it.

This issue is why I recommended creating an empty loadable section of
the right size, so the linker puts it in a loadable segment for you
and you don't have to fuss with adjusting the segments.

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]