public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Hans-Peter Nilsson <hp@axis.com>
To: <binutils@sourceware.org>
Cc: Jeff Law <jeffreyalaw@gmail.com>, <nickc@redhat.com>,
	<mliska@suse.cz>, <gcc@gcc.gnu.org>
Subject: Re: [committed] exec-stack warning for test which wants executable stacks
Date: Thu, 26 May 2022 03:17:01 +0200	[thread overview]
Message-ID: <20220526011701.1D73B2045A@pchp3.se.axis.com> (raw)
In-Reply-To: <d4c5ff7e-8c09-6e9d-f7fb-95b740461e42@gmail.com> (message from Jeff Law via Binutils on Mon, 25 Apr 2022 17:30:59 +0200)

> 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

  reply	other threads:[~2022-05-26  1:17 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-24 17:42 Jeff Law
2022-04-25 12:56 ` Martin Liška
2022-04-25 14:37   ` Jeff Law
2022-04-25 14:42     ` Nick Clifton
2022-04-25 14:59       ` Jeff Law
2022-04-25 15:26         ` Nick Clifton
2022-04-25 15:30           ` Jeff Law
2022-05-26  1:17             ` Hans-Peter Nilsson [this message]
2022-05-26 23:17               ` Hans-Peter Nilsson
2022-04-26 13:54     ` Jeff Law

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220526011701.1D73B2045A@pchp3.se.axis.com \
    --to=hp@axis.com \
    --cc=binutils@sourceware.org \
    --cc=gcc@gcc.gnu.org \
    --cc=jeffreyalaw@gmail.com \
    --cc=mliska@suse.cz \
    --cc=nickc@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).