Closed
Bug 628232
Opened 14 years ago
Closed 14 years ago
Add thumb support for elfhack
Categories
(Firefox Build System :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla2.0b11
People
(Reporter: glandium, Assigned: glandium)
Details
Attachments
(2 files)
5.72 KB,
patch
|
taras.mozilla
:
review+
sdwilsh
:
approval2.0+
|
Details | Diff | Splinter Review |
801 bytes,
patch
|
taras.mozilla
:
review+
sdwilsh
:
approval2.0+
|
Details | Diff | Splinter Review |
Currently, elfhack doesn't support that the injected code is compiled as thumb. This is due to the pseudo linker considers the inject code entry point being 0x0, while it should be taken from the symbols table from the injected object (which would give a value of 0x1 when compiled as thumb).
Assignee | ||
Comment 1•14 years ago
|
||
This patch takes the actual value of the init symbol from the injected code object and uses it for DT_INIT instead of hardcoding 0, which was wrong when the injected is compiled as thumb.
Attachment #507099 -
Flags: review?(tglek)
Assignee | ||
Comment 2•14 years ago
|
||
This removes the hack that forced the injected code to never be built as thumb.
With both patches, thumb code is supported as long as we inject arm-noinit.o and not arm.o. In the arm.o case, there's a R_ARM_THM_CALL relocation created that elfhack doesn't handle. I just hope we don't have to handle these just yet. Try will tell.
Attachment #507102 -
Flags: review?(tglek)
Assignee | ||
Comment 3•14 years ago
|
||
(In reply to comment #2)
> Try will tell.
Try says it builds on maemo and android with these 2 patches only.
Comment 4•14 years ago
|
||
Comment on attachment 507099 [details] [diff] [review]
part 1 - Use the init symbol from elfhack injected code as an entry point instead of hardcoding 0
use stl find where you say // find in comments :)
Attachment #507099 -
Flags: review?(tglek) → review-
Updated•14 years ago
|
Attachment #507102 -
Flags: review?(tglek) → review+
Comment 5•14 years ago
|
||
Comment on attachment 507099 [details] [diff] [review]
part 1 - Use the init symbol from elfhack injected code as an entry point instead of hardcoding 0
mike says stl find is too bothersome
Attachment #507099 -
Flags: review- → review+
Assignee | ||
Updated•14 years ago
|
Attachment #507099 -
Flags: approval2.0?
Assignee | ||
Updated•14 years ago
|
Attachment #507102 -
Flags: approval2.0?
Assignee | ||
Comment 6•14 years ago
|
||
These patches add proper support for thumb for the elfhack injected code. This was successfully tested on try in ceae7158f7f6.
Assignee | ||
Comment 7•14 years ago
|
||
(In reply to comment #6)
> These patches add proper support for thumb for the elfhack injected code. This
> was successfully tested on try in ceae7158f7f6.
Said differently, this makes the entire binary thumb when building for thumb, instead of having a small bit still compiled as arm.
Updated•14 years ago
|
Attachment #507099 -
Flags: approval2.0? → approval2.0+
Updated•14 years ago
|
Attachment #507102 -
Flags: approval2.0? → approval2.0+
Assignee | ||
Comment 8•14 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/072b2d4fa117
http://hg.mozilla.org/mozilla-central/rev/d99da3128e4f
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla2.0b11
Updated•7 years ago
|
Product: Core → Firefox Build System
You need to log in
before you can comment on or make changes to this bug.
Description
•