This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: cleanup PT_GNU_STACK size handling
- From: Alan Modra <amodra at gmail dot com>
- To: Nathan Sidwell <nathan_sidwell at mentor dot com>
- Cc: binutils <binutils at sourceware dot org>
- Date: Mon, 22 Oct 2012 12:34:28 +1030
- Subject: Re: cleanup PT_GNU_STACK size handling
- References: <507D7311.10101@mentor.com>
On Tue, Oct 16, 2012 at 03:45:37PM +0100, Nathan Sidwell wrote:
> + /* For default_execstack to trigger without an explicit
> + stack size, there must be an input note section. */
Nope. The default triggers on the *absence* of a note section. Also,
why scan object files when given an explicit -z execstack? I find
your "clean up" here quite the opposite. The rest of the patch looks
OK, except for this copied code in bfd_elf_stack_segment_size which
probably ought to also check for bfd_link_hash_defweak
> + if (h && h->root.type == bfd_link_hash_defined && h->def_regular
> + && (h->type == STT_NOTYPE || h->type == STT_OBJECT))
and bfd_link_hash_undefweak here too
> + /* Provide the legacy symbol, if it is referenced. */
> + if (h && h->root.type == bfd_link_hash_undefined)
--
Alan Modra
Australia Development Lab, IBM