As Theo and I noticed yesterday:
$ readelf -a /usr/lib/libc.a
readelf: Error: /usr/lib/libc.a: invalid archive string table offset 0
Turns out that on mips64 binutils creates IRIX-style "64-bit" archives
which allegedly can be larger than 4GB. The difference is apparently
in the archive map where offsets are 64-bit instead of 32-bit. Since
readelf simply skips over the map and reads the archive members
sequentially all we have to do is recognize "/SYM64/" as a valid
header and skip over it.
ok?
Index: readelf.c
===================================================================
RCS file: /cvs/src/gnu/usr.bin/binutils-2.17/binutils/readelf.c,v
retrieving revision 1.6
diff -u -p -r1.6 readelf.c
--- readelf.c 25 May 2015 14:56:27 -0000 1.6
+++ readelf.c 28 Aug 2015 09:55:35 -0000
@@ -9121,7 +9121,8 @@ process_archive (char *file_name, FILE *
return 1;
}
- if (memcmp (arhdr.ar_name, "/ ", 16) == 0)
+ if (memcmp (arhdr.ar_name, "/ ", 16) == 0
+ || memcmp (arhdr.ar_name, "/SYM64/ ", 16) == 0)
{
/* This is the archive symbol table. Skip it.
FIXME: We should have an option to dump it. */