This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
FRV and Blackfin PT_GNU_STACK
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: binutils at sourceware dot org, Dave Brolley <brolley at redhat dot com>, Alexandre Oliva <aoliva at redhat dot com>, Jie Zhang <jie dot zhang at analog dot com>, Bernd Schmidt <bernd dot schmidt at analog dot com>
- Date: Tue, 20 Jun 2006 01:29:36 +0930
- Subject: FRV and Blackfin PT_GNU_STACK
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