Closed
Bug 772974
Opened 12 years ago
Closed 12 years ago
-z max-page-size doesn't have the expected effect when using gold
Categories
(Firefox Build System :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla20
People
(Reporter: glandium, Assigned: kats)
References
Details
Attachments
(2 files)
16.76 KB,
text/plain
|
Details | |
1.33 KB,
patch
|
glandium
:
review+
|
Details | Diff | Splinter Review |
-z max-page-size is used in bug 723939 and bug 772886 to have a working alignment on some armv6 devices, such that the linker doesn't fail. It however doesn't affect PT_LOAD's p_align when linking with gold.
Assignee | ||
Comment 1•12 years ago
|
||
I just want to make sure: this bug manifests as a linker error on startup, right? Or could there be more subtle manifestations of this bug? My local builds of ARMv6 fennec with gcc-4.6 and gold start up fine so I want to know if this bug is still an issue.
Reporter | ||
Comment 2•12 years ago
|
||
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #1) > I just want to make sure: this bug manifests as a linker error on startup, > right? Or could there be more subtle manifestations of this bug? My local > builds of ARMv6 fennec with gcc-4.6 and gold start up fine so I want to know > if this bug is still an issue. The problem is that the bug may show up pretty much randomly depending how things align in PT_LOADs, and how lucky you are with mmap. Can you attach the output for readelf -l *.so ?
Assignee | ||
Comment 3•12 years ago
|
||
Here's the output from readelf -l *.so. Is the problem here that the alignment of the LOAD sections is 0x1000 instead of 0x4000?
Assignee | ||
Comment 4•12 years ago
|
||
Also, if that is indeed the problem, the attached patch makes the LOAD alignment 0x4000 when building with NDK r8c/gcc-4.6/gold-1.10. The build seems to work fine on my device, but I don't know if it will have other side-effects that are not obvious.
Reporter | ||
Comment 5•12 years ago
|
||
I know i've tried common-page-size before settling on max-page-size, and i remember there were problems with it, although i don't remember what specifically. However, I'm not sure i tried both at the same time. Anyways, it would be better to double check the resulting binaries.
Assignee | ||
Comment 6•12 years ago
|
||
When I tried it, common-page-size by itself didn't fix the alignment. Only when I set both does the alignment change. I'll do more thorough testing once NDK r8c is rolled out and I can build this on try.
Assignee | ||
Comment 7•12 years ago
|
||
Comment on attachment 695508 [details] [diff] [review] Set common-page-size as well Review of attachment 695508 [details] [diff] [review]: ----------------------------------------------------------------- The try build at https://tbpl.mozilla.org/?tree=Try&rev=2c0744d1d581 with this patch (plus one to work around the SIGILL thing from bug 803601) work fine with gold and gcc-4.6. Any objections to landing this patch? I also verified the alignment on the LOAD segments is 0x4000 on the .so files in the try build.
Attachment #695508 -
Flags: review?(mh+mozilla)
Reporter | ||
Updated•12 years ago
|
Attachment #695508 -
Flags: review?(mh+mozilla) → review+
Assignee | ||
Comment 8•12 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/2aa360eb664c
Assignee: nobody → bugmail.mozilla
Comment 9•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/2aa360eb664c
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla20
Updated•6 years ago
|
Product: Core → Firefox Build System
You need to log in
before you can comment on or make changes to this bug.
Description
•