elfhack fails with "Moving section would require overlapping segments" when there is PT_INTERP info

RESOLVED FIXED in mozilla8

Status

()

Core
Build Config
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: glandium, Assigned: glandium)

Tracking

(Depends on: 1 bug)

Trunk
mozilla8
ARM
Android
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [inbound])

Attachments

(1 attachment)

(Assignee)

Description

6 years ago
When building with a custom NDK with gcc 4.6 and binutils 2.21.53 gold, shared libraries end up with a PT_INTERP segment and the corresponding .interp section. That section follows the ELF headers, and the ElfSection::isRelocatable() function for that section doesn't return true. As the ELF headers need to be grown for elfhack to operate, failing to move .interp means elfhack can't do its job.

Unfortunately, there is no specifig flag or section type to identify .interp sections.
(Assignee)

Updated

6 years ago
Assignee: nobody → mh+mozilla
(Assignee)

Comment 1

6 years ago
Created attachment 550064 [details] [diff] [review]
Allow elfhack to move .interp sections
Attachment #550064 - Flags: review?(tglek)

Comment 2

6 years ago
Comment on attachment 550064 [details] [diff] [review]
Allow elfhack to move .interp sections

r+, but this kind of feature should be testcased
Attachment #550064 - Flags: review?(tglek) → review+
(Assignee)

Comment 3

6 years ago
(In reply to comment #2)
> Comment on attachment 550064 [details] [diff] [review] [diff] [details] [review]
> Allow elfhack to move .interp sections
> 
> r+, but this kind of feature should be testcased

Actually, it's already testcased, in that the existing test is failing when the linker was creating the PT_INTERP segment. The only problem is that the testcase is not done when cross-compiling, and that's bug 675898.
(Assignee)

Comment 4

6 years ago
(I do agree, however, that we need a real test suite tracking these linker specific issues, but doing so requires generating lib files, not linking them)
(Assignee)

Comment 5

6 years ago
http://hg.mozilla.org/users/mh_glandium.org/elfhack/rev/814dd30c6adb
http://hg.mozilla.org/integration/mozilla-inbound/rev/5772d30e6894
Whiteboard: [inbound]
(Assignee)

Comment 6

6 years ago
Filed bug 676198 for the test suite.
(Assignee)

Updated

6 years ago
Depends on: 676198
http://hg.mozilla.org/mozilla-central/rev/5772d30e6894
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla8

Updated

6 years ago
Depends on: 677033

Updated

6 years ago
No longer depends on: 677033
You need to log in before you can comment on or make changes to this bug.