This is the mail archive of the binutils@sourceware.org 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: Generic object attributes patch


On Wed, Jun 27, 2007 at 07:47:02PM -0700, H. J. Lu wrote:
> On Wed, Jun 27, 2007 at 10:36:04PM -0400, Daniel Jacobowitz wrote:
> > On Wed, Jun 27, 2007 at 09:32:03AM -0700, H. J. Lu wrote:
> > > How much space are we talkng about? An entry in the program header
> > > only takes 56 byte for ELF64.  Why do you think none of ld.so of
> > > all ELF implementation will care about it? Kernel loader may also
> > > check the new program segment in the program header in executables.
> > > Since it is supposed to be a generic solution, we should cover all
> > > bases.
> > 
> > When someone has a use for it, we can add it.  I don't understand why
> > that's so complicated a suggestion.  I do not want to waste the RAM
> > across every binary on every system until there is at least some use
> > for it.
> 
> There are other ways to save much more than 56bytes per file. If
> you don't design it carefully from beginning, it may be a mess
> to add it on later.
> 

Most DSOs and executables have an entry in progam header:

  GNU_STACK      0x000000 0x00000000 0x00000000 0x00000 0x00000 RW  0x4

Only the flag field is used. We can make PT_GNU_ATTR an alias of
PT_GNU_STACK. If the offset field and the filesize field aren't zero,
they point to an attribute section. It should be backward
compatible with PT_GNU_STACK implementation in glibc and Linux
kernel since they only check the flag field.

So there is no extra progam header entry is needed.

H.J.


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