readelf: Error: /usr/lib/libc.a: failed to skip archive symbol table

Sean Bruno sbruno at ignoranthack.me
Sun Mar 23 18:30:42 UTC 2014


On Thu, 2014-03-20 at 10:42 -0700, Sean Bruno wrote:
> I've built a 32bit mips world/chroot.  If I use sson's qemu tree and his
> kmod/binmissctl, I can enter the environment.  
> 
> Right now, I'm investigating why static compilation fails inside the
> environment, which probably means I'm the first person to *ever* use the
> tool chain natively on mips32.
> 
> Dynamic linking works just fine, but if I attempt to link -static, I get
> a failure.  readelf and other tools seem to be unable to parse the .a
> files, but .so files are just fine.
> 
> This is all inside the qemu-mips environment, if I examine the files on
> my amd64 machine, I never see these errors.  I suspect some kind of
> arch/endian issue, but it eludes me at the moment.  Ideas?
> 
> # uname -a
> FreeBSD powernoodle.corp.yahoo.com 11.0-CURRENT FreeBSD 11.0-CURRENT #11
> r263173: Sat Mar 15 13:31:08 JST 2014
> sbruno at powernoodle:/usr/obj/usr/src/sys/POWERNOODLE  mips
> 
> 
> # readelf -a /usr/lib/libz.a
> readelf: Error: /usr/lib/libz.a: failed to skip archive symbol table
> 


This problem seems to be caused by a endian issue in qemu-mips.  Ed
Maste found the culprit and I've applied it here:

https://github.com/seanbruno/qemu/commit/05ee8495804599b52a88eb36b13ea9c06b3207cd

Which is my combined tracking branch for qemu and sson's bsd-user
branch.

I'm currently tracking an "illegal instruction" on exit issue that seems
to happen on application exit causing a crash.

sean
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20140323/c75ca399/attachment.sig>


More information about the freebsd-hackers mailing list