This is the mail archive of the libffi-discuss@sourceware.org mailing list for the libffi 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: [PATCH 00/13] Go closures, libffi, and the static chain


On Thu, Dec 11, 2014 at 10:06:23AM +0100, Dominik Vogt wrote:
> On s390x, the static chain register cannot be used for passing the
> Go closure pointer to a function:  According to the Abi, the
> dynamic linker is allowed to destroy the contents of r0 (static
> chain register) eventually causing a crash if libgo is linked
> dynamically.  The assumption that the static chain register can be
> used to pass information to a function is wrong for s390x.

I was worried about exactly the same "problem" on powerpc with r11
being used for the static chain and also destroyed in linkage stubs.
It turns out we don't traverse any linkage stubs.

See https://gcc.gnu.org/ml/gcc-patches/2014-11/msg00446.html.  

-- 
Alan Modra
Australia Development Lab, IBM


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