Closed Bug 716825 Opened 9 years ago Closed 9 years ago

Don't load system libraries with their full path

Categories

(Firefox for Android :: General, defect, P3)

ARM
Android
defect

Tracking

()

RESOLVED FIXED
Firefox 12
Tracking Status
firefox11 --- fixed
fennec 11+ ---

People

(Reporter: glandium, Assigned: glandium)

References

Details

Attachments

(2 files)

One of the assumptions of the new linker (bug 683127) is that dlopen()ing a file by giving a full path is not used for system libraries. As dlopen() is only diverted for libraries the new linker loads itself, this makes things work for system libraries that dlopen with a full path, but it happens that contrary to what we do on desktop linux, it turns out we are dlopening with full paths for system libraries on android. There's really no reason that force us to do so, but it breaks the new linker assumptions.
Pushed to try. See rationale in comment 0. I also changed libEGL.so and libGLESv2.so on desktop linux, because they are not necessarily in /usr/lib (on debian they are in a multiarch directory), and they are actually not named libEGL.so and libGLESv2.so except in -devel packages.
http://tbpl.mozilla.org/?tree=Try&rev=f977c50be911

(will add some more people for review of the non gfx parts)
Attachment #587408 - Flags: review?(bjacob)
Attachment #587408 - Flags: review?(blassey.bugs)
Comment on attachment 587408 [details] [diff] [review]
Avoid loading system libraries with their full path

For dom/wifi parts.
Attachment #587408 - Flags: review?(gal)
Comment on attachment 587408 [details] [diff] [review]
Avoid loading system libraries with their full path

Review of attachment 587408 [details] [diff] [review]:
-----------------------------------------------------------------

r=me on the gfx parts
Attachment #587408 - Flags: review?(bjacob) → review+
Attachment #587408 - Flags: review?(blassey.bugs) → review+
Assignee: nobody → mh+mozilla
Attachment #587408 - Flags: review?(gal) → review+
tracking-fennec: --- → 11+
Priority: -- → P3
https://hg.mozilla.org/mozilla-central/rev/065691d7581c
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Whiteboard: [inbound]
Target Milestone: --- → Firefox 12
why with full path removal, library names where changed?
basically on Maemo/N9, it fail to load libEGL.so.1, because that simply does not exists
Depends on: 719253
(In reply to Oleg Romashin (:romaxa) from comment #6)
> why with full path removal, library names where changed?
> basically on Maemo/N9, it fail to load libEGL.so.1, because that simply does
> not exists

See comment 1. We could probably try .so.1 *and* .so on non-android.
[Approval Request Comment]
This is a dependency of bug 683127.
For tier-1 platforms, this is mostly a no-op. Libraries are opened with dlopen and will be searched in the paths that were hardcoded previously. Except it will also now work when the libraries are in different system library paths.
It however causes bug 719253 on maemo.
Attachment #591509 - Flags: review+
Attachment #591509 - Flags: approval-mozilla-aurora?
Comment on attachment 591509 [details] [diff] [review]
Avoid loading system libraries with their full path - for aurora

[Triage Comment]
Mobile only - approved for Aurora.
Attachment #591509 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
since this is android only we don't see a need to reivew, removing flag
You need to log in before you can comment on or make changes to this bug.