Closed Bug 359001 Opened 19 years ago Closed 19 years ago

R_386_PC32 relocations in libimglib2.so when building on FC6 with --with-system-png

Categories

(Core :: Graphics: ImageLib, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: stephen.moehle, Assigned: dbaron)

References

Details

(Keywords: fixed1.8.0.9, fixed1.8.1.1)

Attachments

(1 obsolete file)

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a1) Gecko/20061028 Firefox/3.0a1 Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a1) Gecko/20061028 Firefox/3.0a1 This is a follow on of sorts to bug 358559. When building a trunk Firefox or Thunderbird on FC6 with --with-system-png, libimglib2.so has R_386_PC32 relocations that prevent the app from loading under SELinux in enforcing mode. The relocations are all from libpng and are for about 40 png_xxx routines. Adding png.h to config/system-headers fixes the problem. Reproducible: Always
Attached patch Add png.h to system-headers (obsolete) — Splinter Review
If adding png.h to system-headers is safe to do when --with-system-png is not specified, then this patch fixes the problem.
Just as with the other bug, we should only add the PNG headers to the wrapper list conditionally.
Status: UNCONFIRMED → NEW
Ever confirmed: true
... although for a very different reason. Here, when we use our own libpng, we statically link it into the only library that accesses it. When we use our own zlib, on the other hand, we compile it into its own shared library, but we define ZLIB_EXTERN to have the correct visibility annotations.
Comment on attachment 244283 [details] [diff] [review] Add png.h to system-headers I attached a revised patch to bug 359000.
Attachment #244283 - Attachment is obsolete: true
(BTW, I'm glad you filed these two bugs, since I'd never have noticed, and then I'd have encouraged the distributors to use this -- and they wouldn't have been able to.)
> zlib, on the other hand, we compile it into its own shared library, but we > define ZLIB_EXTERN to have the correct visibility annotations. Except for libxul, where it is linked statically and not exported.
Er, right: #elif defined(HAVE_VISIBILITY_ATTRIBUTE) && !defined(MOZ_ENABLE_LIBXUL) #define ZEXTERN __attribute__((visibility ("default"))) extern #endif
Assignee: nobody → dbaron
Fixed by trunk checkin of bug 359000. Thanks for pointing this out.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Bug 359000 checked in to 1.8 and 1.8.0 branches.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: