public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* GCC 103863, We need a warning for loss of no-exec stacks
@ 2021-12-30  2:23 Jeffrey Walton
  2021-12-30  2:27 ` Andrew Pinski
  2021-12-31 18:27 ` Hans-Peter Nilsson
  0 siblings, 2 replies; 5+ messages in thread
From: Jeffrey Walton @ 2021-12-30  2:23 UTC (permalink / raw)
  To: Binutils

Would anyone like to comment on this GCC feature request:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103863 .

The reason I'm bringing it here is, AP suggested a warning should be
in the linker (which combines object files), and not the compiler
(which creates object files).

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: GCC 103863, We need a warning for loss of no-exec stacks
  2021-12-30  2:23 GCC 103863, We need a warning for loss of no-exec stacks Jeffrey Walton
@ 2021-12-30  2:27 ` Andrew Pinski
  2021-12-30  2:40   ` Jeffrey Walton
  2021-12-31 18:27 ` Hans-Peter Nilsson
  1 sibling, 1 reply; 5+ messages in thread
From: Andrew Pinski @ 2021-12-30  2:27 UTC (permalink / raw)
  To: noloader; +Cc: Binutils

On Wed, Dec 29, 2021 at 6:25 PM Jeffrey Walton via Binutils
<binutils@sourceware.org> wrote:
>
> Would anyone like to comment on this GCC feature request:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103863 .
>
> The reason I'm bringing it here is, AP suggested a warning should be
> in the linker (which combines object files), and not the compiler
> (which creates object files).

GCC does not create the object files from assembly code either (since
it is the case you are worried about really) :). It is the assembler
(gas) which is still part of binutils.

Thanks,
Andrew

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: GCC 103863, We need a warning for loss of no-exec stacks
  2021-12-30  2:27 ` Andrew Pinski
@ 2021-12-30  2:40   ` Jeffrey Walton
  2021-12-30  6:50     ` Alan Modra
  0 siblings, 1 reply; 5+ messages in thread
From: Jeffrey Walton @ 2021-12-30  2:40 UTC (permalink / raw)
  To: Andrew Pinski; +Cc: Binutils

On Wed, Dec 29, 2021 at 9:27 PM Andrew Pinski <pinskia@gmail.com> wrote:
>
> On Wed, Dec 29, 2021 at 6:25 PM Jeffrey Walton via Binutils
> <binutils@sourceware.org> wrote:
> >
> > Would anyone like to comment on this GCC feature request:
> > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103863 .
> >
> > The reason I'm bringing it here is, AP suggested a warning should be
> > in the linker (which combines object files), and not the compiler
> > (which creates object files).
>
> GCC does not create the object files from assembly code either (since
> it is the case you are worried about really) :). It is the assembler
> (gas) which is still part of binutils.

Thanks Andrew.

In the case of ASM files, that's true. But GCC is often the driver.
People interact with GCC, not GAS. Since GCC is the compiler driver
and supervises the build, GCC seems like a natural place to enable a
warning for users.

I think the linker would be a good place, too. I think the more
chances you give someone to catch a mistake, the better.

Jeff

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: GCC 103863, We need a warning for loss of no-exec stacks
  2021-12-30  2:40   ` Jeffrey Walton
@ 2021-12-30  6:50     ` Alan Modra
  0 siblings, 0 replies; 5+ messages in thread
From: Alan Modra @ 2021-12-30  6:50 UTC (permalink / raw)
  To: noloader; +Cc: Andrew Pinski, Binutils

I suggest that you, Jeffrey, implement this feature if you feel "we
need it".  That's the way open source works!  Good luck!

-- 
Alan Modra
Australia Development Lab, IBM

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: GCC 103863, We need a warning for loss of no-exec stacks
  2021-12-30  2:23 GCC 103863, We need a warning for loss of no-exec stacks Jeffrey Walton
  2021-12-30  2:27 ` Andrew Pinski
@ 2021-12-31 18:27 ` Hans-Peter Nilsson
  1 sibling, 0 replies; 5+ messages in thread
From: Hans-Peter Nilsson @ 2021-12-31 18:27 UTC (permalink / raw)
  To: noloader; +Cc: Binutils

On Wed, 29 Dec 2021, Jeffrey Walton via Binutils wrote:

> Would anyone like to comment on this GCC feature request:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103863 .
>
> The reason I'm bringing it here is, AP suggested a warning should be
> in the linker (which combines object files), and not the compiler
> (which creates object files).

When you implement that warning, be advised that targets have
different defaults; some require a marking to enable executable
stack, some to disable it.  Grep for DEFAULT_STACK_PERMS in
glibc and observe presence of PF_X for different targets.

This is complicated by gcc target-specific
NEED_INDICATE_EXEC_STACK macro possibly being out of sync.

It was some time before I did more than (as now) grep for these
things so there may be additional factors, like a global
override.

brgds, H-P

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-12-31 18:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-30  2:23 GCC 103863, We need a warning for loss of no-exec stacks Jeffrey Walton
2021-12-30  2:27 ` Andrew Pinski
2021-12-30  2:40   ` Jeffrey Walton
2021-12-30  6:50     ` Alan Modra
2021-12-31 18:27 ` Hans-Peter Nilsson

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).