* a question about trampolines and non-exec stacks
@ 2002-08-29 11:01 Marc Espie
2002-08-29 11:35 ` Marc Espie
2002-08-29 16:21 ` Richard Henderson
0 siblings, 2 replies; 3+ messages in thread
From: Marc Espie @ 2002-08-29 11:01 UTC (permalink / raw)
To: gcc
OpenBSD moved to a non-exec stacks on a few arches recently...
as a result, trampolines no longer work.
Looking through gcc's code, I see a few instances of trampoline code
that does more or less the right thing.
- I like m68k's FINALIZE_TRAMPOLINE code. Any issue in adding the
same hook to other arches, e.g., i386 ?
- I'm a bit lost as to TRAMPOLINE_SIZE... Is it supposed to be exact,
or should it be conservative ? At a guess, if I add some emit_library_call
to make the stack executable around the area, I believe the trampoline size
ought to be adjusted upwards, right ?
- where to stick a make_stack_executable function ?
I see that nextstep has some explicit code in libgcc2.c, whereas
solaris2 goes through TRANSFER_FROM_TRAMPOLINE... but it looks to me like
either solaris2 is wrong or the description of TRANSFER_FROM_TRAMPOLINE is.
Looking further, basically, things either go through the nextstep model
(FINALIZE_TRAMPOLINE code) or through some TRANSFER_FROM_TRAMPOLINE code
that calls a make_stack_executable function... I think the
FINALIZE_TRAMPOLINE approach is cleaner.
What should I do ?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: a question about trampolines and non-exec stacks
2002-08-29 11:01 a question about trampolines and non-exec stacks Marc Espie
@ 2002-08-29 11:35 ` Marc Espie
2002-08-29 16:21 ` Richard Henderson
1 sibling, 0 replies; 3+ messages in thread
From: Marc Espie @ 2002-08-29 11:35 UTC (permalink / raw)
To: gcc
In article < 20020829180142.GA6209@tetto.liafa.jussieu.fr > you write:
>- I'm a bit lost as to TRAMPOLINE_SIZE... Is it supposed to be exact,
>or should it be conservative ? At a guess, if I add some emit_library_call
>to make the stack executable around the area, I believe the trampoline size
>ought to be adjusted upwards, right ?
I'm confused. It's obvious the trampoline generating code is not included
in TRAMPOLINE_SIZE. The other point stands, though.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: a question about trampolines and non-exec stacks
2002-08-29 11:01 a question about trampolines and non-exec stacks Marc Espie
2002-08-29 11:35 ` Marc Espie
@ 2002-08-29 16:21 ` Richard Henderson
1 sibling, 0 replies; 3+ messages in thread
From: Richard Henderson @ 2002-08-29 16:21 UTC (permalink / raw)
To: Marc Espie; +Cc: gcc
On Thu, Aug 29, 2002 at 08:01:42PM +0200, Marc Espie wrote:
> - I like m68k's FINALIZE_TRAMPOLINE code. Any issue in adding the
> same hook to other arches, e.g., i386 ?
Shouldn't be.
> - I'm a bit lost as to TRAMPOLINE_SIZE... Is it supposed to be exact,
> or should it be conservative?
AFAIK, it can be either.
> - where to stick a make_stack_executable function ?
TRANSFER_FROM_TRAMPOLINE.
r~
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-08-29 16:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-29 11:01 a question about trampolines and non-exec stacks Marc Espie
2002-08-29 11:35 ` Marc Espie
2002-08-29 16:21 ` Richard Henderson
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).