public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libffi/28036] New: libffi executable stack (missing .note.GNU-stack on .o files)
@ 2006-06-15 4:40 nigelenki at comcast dot net
2006-06-15 5:29 ` [Bug libffi/28036] " pinskia at gcc dot gnu dot org
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: nigelenki at comcast dot net @ 2006-06-15 4:40 UTC (permalink / raw)
To: gcc-bugs
I noticed (on ubuntu) that libgcj had an executable stack; tracing this back, I
found that libffi also had an executable stack, and why. pinskia informs me
that libffi gets linked into libgcj so that solves that!
SCANELF:
bluefox@icebox:/tmp/x$ scanelf -qeRt /usr/lib
RWX --- --- /usr/lib/libgcj.so.7.0.0
I built gcc and ran a scanelf on the source tree to find out what was up and
located a few .o files missing .note.GNU-stack
SCANELF:
bluefox@icebox:/tmp/x$ scanelf -qeRt .
RWX --- --- ./gcj-4.1-4.1.0/build/i486-linux-gnu/libffi/.libs/libffi.so.4.0.1
!WX --- --- ./gcj-4.1-4.1.0/build/i486-linux-gnu/libffi/src/x86/sysv.o
!WX --- --- ./gcj-4.1-4.1.0/build/i486-linux-gnu/libffi/src/x86/unix64.o
!WX --- --- ./gcj-4.1-4.1.0/build/i486-linux-gnu/libffi/src/x86/.libs/sysv.o
!WX --- ---
./gcj-4.1-4.1.0/build/i486-linux-gnu/libffi/src/x86/.libs/unix64.o
sysv.o and unix64.o, find them:
FIND:
bluefox@icebox:/tmp/x$ find . -name sysv.S
./gcj-4.1-4.1.0/src/libffi/src/sh/sysv.S
./gcj-4.1-4.1.0/src/libffi/src/cris/sysv.S
./gcj-4.1-4.1.0/src/libffi/src/s390/sysv.S
./gcj-4.1-4.1.0/src/libffi/src/x86/sysv.S
./gcj-4.1-4.1.0/src/libffi/src/m68k/sysv.S
./gcj-4.1-4.1.0/src/libffi/src/sh64/sysv.S
./gcj-4.1-4.1.0/src/libffi/src/m32r/sysv.S
./gcj-4.1-4.1.0/src/libffi/src/arm/sysv.S
./gcj-4.1-4.1.0/src/libffi/src/powerpc/sysv.S
Let's peek in x86:
bluefox@icebox:/tmp/x$ ls gcj-4.1-4.1.0/src/libffi/src/x86/
ffi64.c ffi.c ffitarget.h sysv.S unix64.S win32.S
win32.S can probably be ignored, however...
bluefox@icebox:/tmp/x$ grep -Hnr ".note.GNU-stack" gcj-4.1-4.1.0/src/libffi/
bluefox@icebox:/tmp/x$
The others probably need this block at the end (yanked from [1]):
#ifdef __ELF__
.section .note.GNU-stack,"",%progbits
#endif
No idea if this will clear the executable stack, haven't tested; but it'll
supply a proper .note.GNU-stack segment where it really should be at least.
[1] http://www.gentoo.org/proj/en/hardened/gnu-stack.xml
--
Summary: libffi executable stack (missing .note.GNU-stack on .o
files)
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libffi
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: nigelenki at comcast dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28036
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libffi/28036] libffi executable stack (missing .note.GNU-stack on .o files)
2006-06-15 4:40 [Bug libffi/28036] New: libffi executable stack (missing .note.GNU-stack on .o files) nigelenki at comcast dot net
@ 2006-06-15 5:29 ` pinskia at gcc dot gnu dot org
2006-06-15 11:31 ` aph at gcc dot gnu dot org
2006-12-13 15:58 ` debian-gcc at lists dot debian dot org
2 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-06-15 5:29 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2006-06-15 04:39 -------
Confirmed.
Or
#ifdef __ELF__
.section .note.GNU-stack,""
#endif
which is yanked from config/alpha/qrnnd.asm in GCC.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2006-06-15 04:39:54
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28036
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libffi/28036] libffi executable stack (missing .note.GNU-stack on .o files)
2006-06-15 4:40 [Bug libffi/28036] New: libffi executable stack (missing .note.GNU-stack on .o files) nigelenki at comcast dot net
2006-06-15 5:29 ` [Bug libffi/28036] " pinskia at gcc dot gnu dot org
@ 2006-06-15 11:31 ` aph at gcc dot gnu dot org
2006-12-13 15:58 ` debian-gcc at lists dot debian dot org
2 siblings, 0 replies; 7+ messages in thread
From: aph at gcc dot gnu dot org @ 2006-06-15 11:31 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from aph at gcc dot gnu dot org 2006-06-15 11:23 -------
gcj creates all its trampolines on the heap, so exec stack shouldn't be needed.
--
aph at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |aph at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28036
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libffi/28036] libffi executable stack (missing .note.GNU-stack on .o files)
2006-06-15 4:40 [Bug libffi/28036] New: libffi executable stack (missing .note.GNU-stack on .o files) nigelenki at comcast dot net
2006-06-15 5:29 ` [Bug libffi/28036] " pinskia at gcc dot gnu dot org
2006-06-15 11:31 ` aph at gcc dot gnu dot org
@ 2006-12-13 15:58 ` debian-gcc at lists dot debian dot org
2 siblings, 0 replies; 7+ messages in thread
From: debian-gcc at lists dot debian dot org @ 2006-12-13 15:58 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from debian-gcc at lists dot debian dot org 2006-12-13 15:58 -------
patch posted at
http://gcc.gnu.org/ml/gcc-patches/2006-12/msg00948.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28036
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libffi/28036] libffi executable stack (missing .note.GNU-stack on .o files)
[not found] <bug-28036-4@http.gcc.gnu.org/bugzilla/>
2021-09-15 9:12 ` pinskia at gcc dot gnu.org
2021-09-15 9:16 ` pinskia at gcc dot gnu.org
@ 2021-09-15 9:23 ` schwab@linux-m68k.org
2 siblings, 0 replies; 7+ messages in thread
From: schwab@linux-m68k.org @ 2021-09-15 9:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=28036
--- Comment #10 from Andreas Schwab <schwab@linux-m68k.org> ---
Note that riscv and nios2 are noexec-stack by default, thus do not need a stack
note.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libffi/28036] libffi executable stack (missing .note.GNU-stack on .o files)
[not found] <bug-28036-4@http.gcc.gnu.org/bugzilla/>
2021-09-15 9:12 ` pinskia at gcc dot gnu.org
@ 2021-09-15 9:16 ` pinskia at gcc dot gnu.org
2021-09-15 9:23 ` schwab@linux-m68k.org
2 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-09-15 9:16 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=28036
--- Comment #9 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #8)
> These are the ones without the note still:
> src/bfin/sysv.S
> src/cris/sysv.S
> src/m32r/sysv.S
> src/metag/sysv.S
> src/microblaze/sysv.S
> src/nios2/sysv.S
> src/or1k/sysv.S
> src/riscv/sysv.S
> src/xtensa/sysv.S
None of these have been fixed upstream though.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libffi/28036] libffi executable stack (missing .note.GNU-stack on .o files)
[not found] <bug-28036-4@http.gcc.gnu.org/bugzilla/>
@ 2021-09-15 9:12 ` pinskia at gcc dot gnu.org
2021-09-15 9:16 ` pinskia at gcc dot gnu.org
2021-09-15 9:23 ` schwab@linux-m68k.org
2 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-09-15 9:12 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=28036
--- Comment #8 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
These are the ones without the note still:
src/bfin/sysv.S
src/cris/sysv.S
src/m32r/sysv.S
src/metag/sysv.S
src/microblaze/sysv.S
src/nios2/sysv.S
src/or1k/sysv.S
src/riscv/sysv.S
src/xtensa/sysv.S
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2021-09-15 9:23 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-15 4:40 [Bug libffi/28036] New: libffi executable stack (missing .note.GNU-stack on .o files) nigelenki at comcast dot net
2006-06-15 5:29 ` [Bug libffi/28036] " pinskia at gcc dot gnu dot org
2006-06-15 11:31 ` aph at gcc dot gnu dot org
2006-12-13 15:58 ` debian-gcc at lists dot debian dot org
[not found] <bug-28036-4@http.gcc.gnu.org/bugzilla/>
2021-09-15 9:12 ` pinskia at gcc dot gnu.org
2021-09-15 9:16 ` pinskia at gcc dot gnu.org
2021-09-15 9:23 ` schwab@linux-m68k.org
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).