[PATCH] ld: harmonize the value of --enable-warn-execstack=no option

Alan Modra amodra@gmail.com
Fri May 20 10:16:10 GMT 2022


On Fri, May 20, 2022 at 09:07:06AM +0200, Clément Chigot wrote:
> However, the testsuite changes look mandatory to me.
> As of now, the results are different dependending on the
> configure options being passed.

Yes, you may well be correct.  I'm going to leave this to Nick.
Incidentally, the reason why I didn't fix the arm/aarch64 regressions
is that if

  link_info.separate_code = DEFAULT_LD_Z_SEPARATE_CODE;
  link_info.warn_execstack = DEFAULT_LD_WARN_EXECSTACK;
  link_info.no_warn_rwx_segments = ! DEFAULT_LD_WARN_RWX_SEGMENTS;
  link_info.default_execstack = DEFAULT_LD_EXECSTACK;

is added to armelf.em:before_parse then we get

FAIL: PR ld/29072 (ignore absent .note.GNU-stack)

The reason being that arm is listed in ld/testsuite/ld-elf/elf.exp
target_defaults_to_execstack but doesn't have
elf_backend_default_execstack set.

> If the warnings are disabled, ld/29072 will always fail.
> If the warnings are forced, stack exec will fail too.
> 
> I agree that forcing --warn-execstack might not be the
> right approach.
> Maybe disabling the problematic tests and creating
> new ones: tests that are run only when a given
> configure option is set, would be better. That way
> we can also check that the behavior of each configure
> choice is preserved.
> 
> Clément

-- 
Alan Modra
Australia Development Lab, IBM


More information about the Binutils mailing list