PATCH: Map GNU attributes section to PT_GNU_ATTR (aka PT_GNU_STACK) segment
Daniel Jacobowitz
drow@false.org
Thu Aug 16 13:07:00 GMT 2007
On Thu, Aug 16, 2007 at 05:54:55AM -0700, H.J. Lu wrote:
> GNU_ATTR 0x008004 0x00000000 0x00000000 0x0002c 0x00000 RW 0x1
>
> Section to Segment mapping:
> Segment Sections...
> 00 .text
> 01 .ARM.attributes
> [hjl@gnu-6 attr-1]$
>
> Run-time loader can access the attribute section by checking offset
> and filesize without making it SEC_ALLOC.
Because you now have a non-allocated section that you want the runtime
loader to look at. There's no guarantee that it is mapped in memory
anywhere after mapping the PT_LOAD segments. Forcing the runtime
loader to make an extra mmap to get at the attributes basically
ensures that glibc's loader won't do so - that's at least one extra
syscall for every loaded object.
How are you planning to use this in the loader, and have you discussed
it with the glibc maintainers at all?
--
Daniel Jacobowitz
CodeSourcery
More information about the Binutils
mailing list