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

RESOLVED FIXED in Firefox 24

Status

Firefox Build System
General
RESOLVED FIXED
5 years ago
5 months ago

People

(Reporter: glandium, Assigned: glandium)

Tracking

Trunk
mozilla25
ARM
Linux

Firefox Tracking Flags

(firefox24 fixed, firefox25 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
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.
(Assignee)

Comment 1

5 years ago
Created attachment 782470 [details] [diff] [review]
Turn BL into BLX when doing thumb call relocations and the target is ARM
Attachment #782470 - Flags: review?(nfroyd)
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
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla25
(Assignee)

Comment 5

5 years ago
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+
https://hg.mozilla.org/releases/mozilla-aurora/rev/3ce0ad78ed7d
status-firefox24: --- → fixed
status-firefox25: --- → fixed

Updated

5 months ago
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.