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.
Created attachment 550064 [details] [diff] [review] Allow elfhack to move .interp sections
Comment on attachment 550064 [details] [diff] [review] Allow elfhack to move .interp sections r+, but this kind of feature should be testcased
(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.