Last Comment Bug 674888 - elfhack fails with "Moving section would require overlapping segments" when there is PT_INTERP info
: elfhack fails with "Moving section would require overlapping segments" when t...
Status: RESOLVED FIXED
[inbound]
:
Product: Core
Classification: Components
Component: Build Config (show other bugs)
: Trunk
: ARM Android
: -- normal (vote)
: mozilla8
Assigned To: Mike Hommey [:glandium]
:
Mentors:
Depends on: 676198
Blocks:
  Show dependency treegraph
 
Reported: 2011-07-28 06:21 PDT by Mike Hommey [:glandium]
Modified: 2011-08-06 20:46 PDT (History)
1 user (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Allow elfhack to move .interp sections (4.77 KB, patch)
2011-08-02 06:50 PDT, Mike Hommey [:glandium]
taras.mozilla: review+
Details | Diff | Splinter Review

Description Mike Hommey [:glandium] 2011-07-28 06:21:15 PDT
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.
Comment 1 Mike Hommey [:glandium] 2011-08-02 06:50:41 PDT
Created attachment 550064 [details] [diff] [review]
Allow elfhack to move .interp sections
Comment 2 (dormant account) 2011-08-02 19:43:24 PDT
Comment on attachment 550064 [details] [diff] [review]
Allow elfhack to move .interp sections

r+, but this kind of feature should be testcased
Comment 3 Mike Hommey [:glandium] 2011-08-02 23:20:53 PDT
(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.
Comment 4 Mike Hommey [:glandium] 2011-08-03 01:25:56 PDT
(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)
Comment 6 Mike Hommey [:glandium] 2011-08-03 01:33:18 PDT
Filed bug 676198 for the test suite.
Comment 7 Marco Bonardo [::mak] 2011-08-04 02:51:26 PDT
http://hg.mozilla.org/mozilla-central/rev/5772d30e6894

Note You need to log in before you can comment on or make changes to this bug.