Closed Bug 674888 Opened 13 years ago Closed 13 years ago

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

Categories

(Firefox Build System :: General, defect)

ARM
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla8

People

(Reporter: glandium, Assigned: glandium)

References

(Depends on 1 open bug)

Details

(Whiteboard: [inbound])

Attachments

(1 file)

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: nobody → mh+mozilla
Attachment #550064 - Flags: review?(tglek)
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+
(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.
(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)
Filed bug 676198 for the test suite.
Depends on: 676198
http://hg.mozilla.org/mozilla-central/rev/5772d30e6894
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla8
Depends on: 677033
No longer depends on: 677033
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: