cleanup PT_GNU_STACK size handling

Alan Modra amodra@gmail.com
Mon Oct 22 02:04:00 GMT 2012


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



More information about the Binutils mailing list