-Bsymbolic breaks PMF comparison under ARM
will.newton at linaro.org
Fri Jan 10 14:50:48 UTC 2014
On 10 January 2014 08:32, Giuseppe D'Angelo <giuseppe.dangelo at kdab.com> wrote:
> the attached program changes the output from "true" to "false" when the
> -Bsymbolic / -Bsymbolic-functions options are passed to GCC. This happens on
> ARM -- on x86-64 output is always "true".
> The program involves a comparison, within a shared library, of a PMF defined
> inside the shared library itself with the same PMF passed by the
> At this stage I still don't know if it's a GCC problem, a ld.so problem, ABI
> constraints, undefined behaviour, or whatnot; but any help is appreciated.
> Compile with:
>> g++ -fPIC -shared -Wall -o libshared.so -Wl,-Bsymbolic shared.cpp
>> g++ -fPIE -Wall -o main main.cpp -L. -lshared
> (The long story is that Qt 5 is taking PMFs in its public API, and the
> comparison failing inside of Qt shared libraries is breaking code on ARM, as
> -Bsymbolic is set by default there.)
Thanks for the report and testcase.
The attached patch to ld may help. I am not yet sure whether or not it
is the correct approach but if it works for you that would be
Toolchain Working Group, Linaro
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 2415 bytes
Desc: not available
More information about the linaro-toolchain