[PATCH v2] ld: Turn on --error-execstack/--error-rwx-segments
H.J. Lu
hjl.tools@gmail.com
Mon Jan 29 12:59:39 GMT 2024
On Sun, Jan 28, 2024 at 11:33 PM Jan Beulich <jbeulich@suse.com> wrote:
>
> On 28.01.2024 16:04, H.J. Lu wrote:
> > If there is no objection, I will check it tomorrow.
>
> I'm surprised here: Shouldn't a non-trivial (small != trivial) change
> like this require active approval? At the very least I can only once
> again mention that waiting for just a single day is too little, imo.
>
My patch changes a "warning":
[hjl@gnu-cfl-3 ld]$ touch x.s
[hjl@gnu-cfl-3 ld]$ gcc -c x.s
[hjl@gnu-cfl-3 ld]$ ld -shared -z stack-size=0x123400 --fatal-warnings
--warn-execstack --no-error-execstack x.o
ld: warning: x.o: missing .note.GNU-stack section implies executable stack
ld: NOTE: This behaviour is deprecated and will be removed in a future
version of the linker
[hjl@gnu-cfl-3 ld]$ echo $?
1
[hjl@gnu-cfl-3 ld]$
to an error:
[hjl@gnu-cfl-3 ld]$ ./ld-new -shared -z stack-size=0x123400
--fatal-warnings --warn-execstack --no-error-execstack x.o
./ld-new: error: x.o: is triggering the generation of an executable
stack because it does not have a .note.GNU-stack section
./ld-new: failed to set dynamic section sizes: file format not recognized
[hjl@gnu-cfl-3 ld]$
I view it as trivial since it only corrects the incorrect linker
message.
--
H.J.
More information about the Binutils
mailing list