This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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]

Misaligned stack on 32-bit s390?


Andreas,

In sysdeps/s390/s390-32/dl-machine.h:

174         # Adjust the stack pointer to skip _dl_skip_args words.\n\
175         sll   %r1,2\n\
176         ar    %r15,%r1\n\

This misalign the stack.

The 32-bit ABI requires an 8-byte alignment.

If we skip over 4 bytes the stack is no longer aligned.

We're seeing crashes when running the dynamic loader manually
as the unaligned stack is passed to the IFUNC resolver which
uses an instruction that expects an aligned stack
e.g. "stfle   96(%r15)"

Any clever ideas on how to fix this without copying up a large
portion of the stack?

Cheers,
Carlos.


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