This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: __sync_sychronize on ARM
- From: Ramana Radhakrishnan <ramana dot gcc at googlemail dot com>
- To: Jon Masters <jonathan at jonmasters dot org>
- Cc: gcc at gcc dot gnu dot org, jcm at jonmasters dot org
- Date: Mon, 30 Jan 2012 08:50:43 +0000
- Subject: Re: __sync_sychronize on ARM
- References: <1327906601.2138.13.camel@sherlock.bos.jonmasters.org>
On Mon, Jan 30, 2012 at 6:56 AM, Jon Masters <jonathan@jonmasters.org> wrote:
> The __sync_synchronize "legacy" sync function is intended to be used to
> perform an expensive data memory barrier operation. It is defined within
> libgcc in such a way that I *believe* means that, on most architectures,
> it is replaced with an inline assembly code emitted that performs a sync
> operation. On ARM, and some other architectures with mixed ISAs wherein
> there may not be a sync function nor one way to do this, this function
> (__sync_synchronize) can be a real function call. In that case, it might
> cause inline assembly generation, or e.g. call a kernel VDSO helper.
On ARM we don't have a kernel VDSO , sync_synchronize for older versions of
the architecture ( anything prior to armv6k) should result in a call
to sync_synchronize
in libgcc.a which should take care of calling the kernel helper function.
Therefore I'm assuming this is a breakage you face when building for armv5te
>
> The icu package contains a direct call to __sync_sychronize, especially
> in the iotest test cases. I believe that this compiles fine on x86
> because there is no function call. However, on ARM, the code fails to
> link because the __sync_synchronize function is HIDDEN and not exported
> (or so goes my understanding - is that correct?).
No, the HIDDEN shouldn't cause a link failure in this case - you
should be able to pull this
in when you link against the static libgcc where this should be defined.
I don't know what your linker command line is so maybe that's a place
to start investigating from.
cheers
Ramana