Closed Bug 358559 Opened 14 years ago Closed 14 years ago

R_386_PC32 relocations in when building on FC6


(Core :: XPCOM, defect)

Not set





(Reporter: dbaron, Assigned: dbaron)



(Keywords: fixed1.8.0.9, fixed1.8.1.1)


(1 file, 1 obsolete file)

When building on Fedora Core 6 (where our system wrappers stuff works, and
where the big gcc visibility bug is fixed), SELinux prevents me from starting
due to the bad type of relocations in and  This
bug covers the problem in

I don't understand this problem yet, so if you do, feel free to take it, but I'm planning to debug it later today.

The problem is a single relocation (as shown by objdump -R
0000de67 R_386_PC32        __cxa_pure_virtual

There are plenty of other relocations for __cxa_pure_virtual of the healthier R_386_32 sort, but there's this lonely one relocation that prevents my default build from running with all the SELinux protection enabled.
For what it's worth, objdump -sdR shows the relocation in question as being in the midst of code compiled from toolkit/xre/nsAppRunner.cpp .  It's in:

0000de60 <__pure_virtual>:
    de60:       55                      push   %ebp
    de61:       89 e5                   mov    %esp,%ebp
    de63:       83 ec 08                sub    $0x8,%esp
    de66:       e8 fc ff ff ff          call   de67 <__pure_virtual+0x7>
                        de67: R_386_PC32        __cxa_pure_virtual
    de6b:       c9                      leave  
    de6c:       c3                      ret    
    de6d:       90                      nop    
    de6e:       66 90                   xchg   %ax,%ax

which immediately follows the definition of _ZN12nsXULAppInfo9GetVendorER19nsACString_internal (which is the last of a bunch of the nsXULAppInfo methods that are in the binary in reverse order from their order in the source).  Following it are lots of things that would normally be inlined (this is a -g -O2 -fno-inline build).
Attached patch patch (obsolete) — Splinter Review
Attachment #243936 - Flags: review?(benjamin)
Ah, we have a system wrapper for pk11func.h but not for pk11pub.h .
Flags: blocking1.8.1.1?
Flags: blocking1.8.0.9?
Flags: blocking1.9?
Comment on attachment 243936 [details] [diff] [review]

What were these symbols for? Can they be removed yet?
Attachment #243936 - Flags: review?(benjamin) → review+
They're from bug 154206 -- and I'd sort of expect they're still needed.
And I realize I should land the same patch in xpfe/bootstrap, since this code still lives there too...
Checked in to trunk.
Closed: 14 years ago
Resolution: --- → FIXED
Attached patch patch landedSplinter Review
This is just the previous patch doubled, and what I landed just now.
Attachment #243936 - Attachment is obsolete: true
Attachment #243987 - Flags: review?(benjamin)
Comment on attachment 243987 [details] [diff] [review]
patch landed

This is a low risk patch that will, along with the patches to bug 358558 and bug 358565:
 * allow Linux distros to take advantage of performance  optimizations (prelinking) and security improvements (SELinux)
 * make it easier for developers to build on new distributions like Fedora Core 6
Attachment #243987 - Flags: approval1.8.1.1?
Attachment #243987 - Flags: approval1.8.0.9?
Comment on attachment 243987 [details] [diff] [review]
patch landed

FWIW, we could probably have used HAVE_VISIBILITY_ATTRIBUTE instead of doing -DWRAP_SYSTEM_INCLUDES.
Attachment #243987 - Flags: review?(benjamin) → review+
Flags: blocking1.8.1.1?
Flags: blocking1.8.1.1-
Flags: blocking1.8.0.9?
Flags: blocking1.8.0.9-
Comment on attachment 243987 [details] [diff] [review]
patch landed

approved for 1.8/1.8.0 branches, a=dveditz for drivers
Attachment #243987 - Flags: approval1.8.1.1?
Attachment #243987 - Flags: approval1.8.1.1+
Attachment #243987 - Flags: approval1.8.0.9?
Attachment #243987 - Flags: approval1.8.0.9+
Fix checked in to MOZILLA_1_8_0_BRANCH and MOZILLA_1_8_BRANCH.
You need to log in before you can comment on or make changes to this bug.