3 ms·
No binary object file "has a stack" since it's created ephemerally for the executable at runtime. However the linker checks all objects and determines if any o
by rwmj 11y ago
No binary object file "has a stack" since it's created ephemerally for the executable at runtime. However the linker checks all objects and determines if any of them contain code that requires an executable stack. For backwards compat reasons, that check will say "executable stack needed" for objects that don't contain the special section flag.
In other words, the check is a logical && operation across all the objects, and therefore somewhat fragile. It's for this reason that in RHEL we have a separate check for all the RPMs we ship to make sure that none of them contain executable stack binaries (well, except in some rather exceptional circumstances).
I think you can argue this is a bug in the linker command that creates the binary blob object.