elfhack doesn't support an ARM .init in a Thumb build

RESOLVED FIXED in Firefox 24

Status

defect
RESOLVED FIXED
6 years ago
Last year

People

(Reporter: glandium, Assigned: glandium)

Tracking

Trunk
mozilla25
ARM
Linux

Firefox Tracking Flags

(firefox24 fixed, firefox25 fixed)

Details

Attachments

(1 attachment)

Somehow, the Debian toolchain on the armhf port emits an ARM .init, while building defaults to Thumb (Ironically, all that ARM code does is jump to some Thumb code...). The elfhack injected code is Thumb, and it doesn't support calling that ARM code properly, which leads to random failure during library loading, due to that ARM code being executed as Thumb.
Comment on attachment 782470 [details] [diff] [review]
Turn BL into BLX when doing thumb call relocations and the target is ARM

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

r=me.  I assume you've tested this, so I didn't go over the encoding bits with a fine-toothed comb.
Attachment #782470 - Flags: review?(nfroyd) → review+
https://hg.mozilla.org/mozilla-central/rev/09fa1683d16a
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla25
Comment on attachment 782470 [details] [diff] [review]
Turn BL into BLX when doing thumb call relocations and the target is ARM

[Approval Request Comment]
User impact if declined: Broken builds on the Debian armhf port. It would be nice if this could land in the next ESR for linux distros.
Testing completed (on m-c, etc.): Landed yesterday.
Risk to taking this patch (and alternatives if risky): It effectively doesn't change much on our arm builds (besides a couple instructions in the elfhack injected code, which don't change anything in its behavior), which don't have to do ARM-Thumb interwork at the elfhack level.
String or IDL/UUID changes made by this patch:
Attachment #782470 - Flags: approval-mozilla-aurora?
Comment on attachment 782470 [details] [diff] [review]
Turn BL into BLX when doing thumb call relocations and the target is ARM

Low risk, helps support linux users on next ESR, approving.
Attachment #782470 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.