This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Questions about trampolines


Marc Espie wrote:

I don't want to dive into the glibc mess, thanks god, but if the dynamic
linker is implemented like dynamic linkers I know, it means any binary
using a dynamic linker that uses trampolines will lose any kind of stack
protection on some badly designed architectures, like say, i386...

Again, be careful to distinguish between use of nested functions (which does not require trampolines), and taking pointers to such functions (which does require trampolines). Normal use of nested functions without taking pointers is entirely compatible with protecting the stack.

I would say that the use of trampolines should be pretty severely deprecated
in C, and I would think that as an intermediate stage, that code that takes
the address of a nested function should get a big warning that this may be
incompatible with protected stacks, and may be inefficient.




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]