[PATCH] LoongArch: Set defaults to exec stack 0.
Andreas Schwab
schwab@suse.de
Mon Jul 25 08:35:09 GMT 2022
On Jul 25 2022, Xi Ruoyao wrote:
> The doc of elf_backend_default_execstack says:
>
> /* True if an object file lacking a .note.GNU-stack section
> should be assumed to be requesting exec stack. At least one
> other file in the link needs to have a .note.GNU-stack section
> for a PT_GNU_STACK segment to be created. */
>
> So I think it only controls the default behavior of bfd library and is
> not related to the kernel?
The kernel always controls the ultimate decision.
It also means that if no input file has a GNU-stack note, no
PT_GNU_STACK segment is created for the output, in which case the kernel
default (which is PF_X for loongarch) applies.
The value of DEFAULT_STACK_PERMS in glibc must also agree with the
kernel.
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
More information about the Binutils
mailing list