FRV and Blackfin PT_GNU_STACK
Alan Modra
amodra@bigpond.net.au
Mon Jun 19 16:58:00 GMT 2006
When testing SIZEOF_HEADERS relaxation, I noticed that a fix in
http://sources.redhat.com/ml/binutils/2006-05/msg00318.html for PT_NOTE
p_memsz broke PT_GNU_STACK p_memsz for frv and bfin. To get this field
set, these ports create an output .stack section with the desired stack
size (and alignment) and tack it on to the PT_GNU_STACK header using
elf_backend_modify_segment_map. It's very much a hack, since you're not
supposed to create sections like this in the output bfd. One
consequence is that the .stack section header doesn't get its type
correct (you'd expect NOBITS) or size set (which is fortunate in a way,
because otherwise you'd end up with a large useless PROGBITS section in
the object file).
The question I have is this: Do you want a .stack section in the output
file? Or should this section really be attached as an input section
that extends the .bss output section? Or do without the section
entirely and just magically tweak PT_GNU_STACK?
--
Alan Modra
IBM OzLabs - Linux Technology Centre
More information about the Binutils
mailing list