Closed
Bug 681716
Opened 13 years ago
Closed 13 years ago
Sort out glue linking situation on iOS
Categories
(Core :: XPCOM, defect)
Tracking
()
RESOLVED
FIXED
mozilla9
People
(Reporter: ted, Assigned: ted)
Details
(Whiteboard: [iOS] fixed-in-bs)
Attachments
(1 file, 2 obsolete files)
651 bytes,
patch
|
benjamin
:
review+
|
Details | Diff | Splinter Review |
I currently have this patch in my iOS patch queue. The APIs that nsGlueLinkingOSX relies on are not available on iOS, and the online documentation says their use is "discouraged" and recommends using dlopen[1]. OS X has had dlopen since 10.3, so we can use it there without any problems. The downside of this exact patch is that we'll lose the preloading work that glandium wrote. We can either a) rewrite nsGlueLinkingOSX to use dlopen (probably not hard), or b) merge the OS X preloading code into nsGlueLinkingDlOpen.cpp and hg rm nsGlueLinkingOSX.cpp http://developer.apple.com/library/mac/#documentation/DeveloperTools/Reference/MachOReference/Reference/reference.html
Assignee | ||
Updated•13 years ago
|
Assignee: nobody → ted.mielczarek
Status: NEW → ASSIGNED
Assignee | ||
Comment 1•13 years ago
|
||
This patch, that I forgot to attach.
Assignee | ||
Updated•13 years ago
|
Whiteboard: [iOS]
Assignee | ||
Comment 2•13 years ago
|
||
Right, and this is the actual patch (I forgot to qrefresh).
Attachment #555475 -
Attachment is obsolete: true
Comment 3•13 years ago
|
||
(In reply to Ted Mielczarek [:ted, :luser] from comment #0) > I currently have this patch in my iOS patch queue. The APIs that > nsGlueLinkingOSX relies on are not available on iOS, and the online > documentation says their use is "discouraged" and recommends using > dlopen[1]. OS X has had dlopen since 10.3, so we can use it there without > any problems. The downside of this exact patch is that we'll lose the > preloading work that glandium wrote. We can either a) rewrite > nsGlueLinkingOSX to use dlopen (probably not hard), or b) merge the OS X > preloading code int nsGlueLinkingDlOpen.cpp and hg rm nsGlueLinkingOSX.cpp I'd go for the latter. You may want to avoid preloading on iOS, though.
Comment 4•13 years ago
|
||
I don't think that dlopen works the same way that the MachO APIs do, which is why I had to use these. In particular, the flag NSADDIMAGE_OPTION_MATCH_FILENAME_BY_INSTALLNAME was crucial to the correct functioning of the glue with binary components, given the weirdnesses of install names on Darwin. Of course, we could just say that binary components are not supported at all on iOS, in which case "whatever works" is fine: but that won't fly for desktop builds.
Assignee | ||
Comment 5•13 years ago
|
||
Note that the NS*Image* APIs have been deprecated as of OS X 10.5, so there's no guarantee they'll continue to work in the future. Also, I dug into the dyld source, and it looks like dlopen always passes that "match filename by installname" flag as true: http://opensource.apple.com/source/dyld/dyld-132.13/src/dyldAPIs.cpp (Search for "void* dlopen", then scroll down and you'll see "context.matchByInstallName = true;".) That's the dyld in 10.6.8, but I looked at an older version and it was the same.
Assignee | ||
Comment 6•13 years ago
|
||
In lieu of sorting that all out, here's a patch that just makes us use the dlopen glue on iOS, while continuing to use the OS X glue on desktop OS X.
Assignee | ||
Updated•13 years ago
|
Attachment #555483 -
Attachment is obsolete: true
Assignee | ||
Updated•13 years ago
|
Attachment #555738 -
Flags: review?(benjamin)
Updated•13 years ago
|
Attachment #555738 -
Flags: review?(benjamin) → review+
Assignee | ||
Comment 7•13 years ago
|
||
http://hg.mozilla.org/projects/build-system/rev/ccc8a52f68b0
Whiteboard: [iOS] → [iOS] fixed-in-bs
http://hg.mozilla.org/mozilla-central/rev/ccc8a52f68b0
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla9
You need to log in
before you can comment on or make changes to this bug.
Description
•