[committed] exec-stack warning for test which wants executable stacks
Hans-Peter Nilsson
hp@axis.com
Thu May 26 01:17:01 GMT 2022
> From: Jeff Law via Binutils <binutils@sourceware.org>
> Date: Mon, 25 Apr 2022 17:30:59 +0200
> On 4/25/2022 9:26 AM, Nick Clifton wrote:
> > Hi Jeff,
> >
> > Just FYI - I am also looking at adding in another warning. This
> > time for
> > when the linker creates a PT_LOAD segment which has all of the RWX
> > flags
> > set. At the moment my testing seems to show that it only causes
> > problems
> > when a custom linker script is used that defines its own program
> > headers
> > and does not provide separate headers for code and data.
> That also sounds quite reasonable. My biggest worry would be the
> embedded targets which have their own linker scripts -- but like the
> executable stack warning, I think you should go for it and we'll deal
> with the fallout.
(Looks like I'm first to be hit by the
--enable-warn-rwx-segments default, or the first one to
bother, lucky me.)
So, with my autotester for cris-elf not able to update
binutils on its own because of all the warnings in the gcc
test-suite (all code and data get a single LOAD header,
which naturally is RWX), let's discuss a method for a
binutils target to default turn off this
configure-time-default-on warning. I just don't think its
reasonable to require an extra configure option for the
intended default behavior for a target.
How about the usual method, a line in the ld emulparams
file for the target?
brgds, H-P
More information about the Gcc
mailing list