This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix PR libffi/60073
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: Alan Modra <amodra at gmail dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 14 Feb 2014 11:32:44 +0100
- Subject: Re: Fix PR libffi/60073
- Authentication-results: sourceware.org; auth=none
- References: <8194381 dot ZP0W66Vpab at polaris> <20140214095504 dot GS3386 at bubble dot grove dot modra dot org>
> Eric, sorry to rain on your parade, but you're making the same mistake
> I did at first when adding powerpc64le support to libffi. libffi is
> built as a shared library. You can't add a field to ffi_cif like this
> and uncondionally write to it: An application linked against an older
> version of libffi will only allocate the old size ffi_cif. Your new
> shared library will trash some random location in the old user app..
OK, I didn't realize that libffi was built as a shared library. That seems a
little strange and inconvenient for a glue library.
> I worked around this problem on powerpc by defining new enum ffi_abi
> values so that you can recognize an old app.
I see, thanks for the heads up and the hint!
--
Eric Botcazou