peter.smith added a comment.

In https://reviews.llvm.org/D45240#1267846, @stefson wrote:

> hey there, I've run into problems with stripping static-libs on arm when 
> using llvm/clang-7. Could you imagine this patch being at fault?
>
>   strip: armv7a-unknown-linux-gnueabihf-strip --strip-unneeded -R .comment -R 
> .GCC.command.line -R .note.gnu.gold-version
>       lib/libbz2.so.1.0.6
>       usr/bin/bzip2recover
>       bin/bzip2
>       usr/lib/libbz2.a
>    armv7a-unknown-linux-gnueabihf-strip: 
> /var/tmp/portage/app-arch/bzip2-1.0.6-r10/image/usr/lib/stImUpsE/bzlib.o: 
> Failed to find link section for section 11
>    armv7a-unknown-linux-gnueabihf-strip: 
> /var/tmp/portage/app-arch/bzip2-1.0.6-r10/image/usr/lib/stImUpsE/bzlib.o: 
> Failed to find link section for section 11


It doesn't seem that likely to me. The error you are seeing looks like a broken 
object file, the patch here will affect the type of features a target might use 
during code generation but it shouldn't affect strip.

I suggest dumping the ELF file with readelf or objdump and look at the section 
output for section 11. Some sections have a special meaning for the sh_link 
field (http://www.sco.com/developers/gabi/latest/ch4.sheader.html#sh_link) it 
looks like strip is complaining that either a section is missing a sh_link 
field that it should have or it has an invalid index.

It will also be worth seeing if the objects in that library have been processed 
by any other tool such as objcpy to see if it has introduced an error.


Repository:
  rL LLVM

https://reviews.llvm.org/D45240



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to