Comment 55 for bug 417009

Revision history for this message
Michael Casadevall (mcasadevall) wrote :

I've been doing research on this problem, and making some notes here on my work debugging this. I'm somewhat limited that I'm working off jocote and dyfet's imx51 boards, but I've made some progress.

Reading an interview (http://www.openoffice.org/editorial/peter_naulls.html) with the Peter Nallus who did the initial OOo port to ARM, a few sentence jump out at me, specifically:

"In the end, I was able to write some static assembler that performed the same job, although did rely a bit on specific (but unlikely to change) layout of ARM instructions by the compiler." - Given the breakage is cased by gcc 4.4 and disappears with gcc 4.3, this suggests that the problem may be with OOo over the toolchain.

However, while setting up to do debugging builds, I noticed the following output from configure:
checking if gcc is -fvisibility-inlines-hidden safe with STL headers... yes
checking if gcc has a visibility bug with class-level attributes (GCC bug 26905)... yes
configure: WARNING: Your gcc is not -fvisibility=hidden safe. Disabling visibility

The GCC bug referenced: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26905 was fixed in 4.2, so its unclear to me if this is a bug in GCC on ARM, a bug in OOo test code, or something else; I'm not familiar enough with GCC C++ visibility to determine if the bug is actually occurring. This test fails in jaunty however where it builds a successful uno library so it might be an unrelated anomaly.

If my understanding is correct changing the visibility of the function will affect how that is called (direct call versus through the PLT) and if it shows up in the PLT at all. If the disability of visibility in the compiler affects the PLT, then it may be throwing off this snipit of ARM assemby code:

        add r1, sp, #16 @ r1 points to this and params
        bl cpp_vtable_call(PLT)

Can a toolchain expert look at the test case, and determine if we have a bug with visibilities? I'll continue to see if the problem is on the OOo side or not, but if we can determine the issue with visibilities on ARM, it might lead us closer to solving the root cause of the problem.