libffi support for z/OS and xlc compiler?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

libffi support for z/OS and xlc compiler?

Alan Lehotsky-4
I implemented a minimal ability to dynamically call DLLs on z/OS using xlc, but it’s far from able to handle the full C ABI for passing  returning things like structs by value or mixing floats and doubles.  It would seem that libffi would be a more capable environment, but there doesn’t seem to be a supported z/OS port - just the OS390 UNIX ports.

Anybody know if the OS390 ABI is compatible with the z/OS ABI?  I tried a google search to see if there was any comparison documentation, but didn’t get any obvious hits.
And has anybody tried using libffi on z/OS?

— Al
Reply | Threaded
Open this post in threaded view
|

Re: libffi support for z/OS and xlc compiler?

Anthony Green-5

Hi Alan - it's been a long time!

Alan Lehotsky <[hidden email]> writes:

> Anybody know if the OS390 ABI is compatible with the z/OS ABI?  I tried a google search to see if there was any comparison documentation, but didn’t get any obvious hits.
> And has anybody tried using libffi on z/OS?

A quick google search tells me that an intern at IBM ported libffi to
z/OS in 2015: https://shayonc.github.io/ 
You could try reaching out to them.

AG

Reply | Threaded
Open this post in threaded view
|

Re: libffi support for z/OS and xlc compiler?

Devin Nakamura
In reply to this post by Alan Lehotsky-4
[hidden email] wrote on 2019-07-02 11:00:43 AM:

> From: Anthony Green <[hidden email]>
> To: Alan Lehotsky <[hidden email]>
> Cc: [hidden email], [hidden email]
> Date: 2019-07-02 11:01 AM
> Subject: [EXTERNAL] Re: libffi support for z/OS and xlc compiler?
> Sent by: [hidden email]
>
>
> Hi Alan - it's been a long time!
>
> Alan Lehotsky <[hidden email]> writes:
>
> > Anybody know if the OS390 ABI is compatible with the z/OS ABI?  I
> tried a google search to see if there was any comparison
> documentation, but didn’t get any obvious hits.
> > And has anybody tried using libffi on z/OS?
Not sure what you mean. AFAIK OS390 == z/OS. If you mean linux 390,
then no, they are not abi compatible
>
> A quick google search tells me that an intern at IBM ported libffi to
> z/OS in 2015
I can do you one better. I am ended up rewriting the z/os port and am
currently the one maintaining it. There a quite a few limitations (I
only bothered implementing as much as we needed)
What exactly did you need it for? I'd be happy to help. (I've been
meaning to upstream the changes, but there have always been more
urgent matters on my plate)

Standard disclaimer: my opinions are my own, and in no way do I
represent IBM, etc. etc.