[llvm] r186934 - Add an initial implementation of archive symbol table generation.

Rafael EspĂ­ndola rafael.espindola at gmail.com
Tue Jan 14 06:24:26 PST 2014


On 14 January 2014 05:02, Demikhovsky, Elena
<elena.demikhovsky at intel.com> wrote:
> Hi Rafael,
>
> Gnu ar works:
>
> ar r /home/work/LLVM_org/trunk/build/test/ExecutionEngine/MCJIT/Output/load-object-a.ll.tmp.cachedir3/load-object.a /home/work/LLVM_org/trunk/build/test/ExecutionEngine/MCJIT/Output/load-object-a.ll.tmp.cachedir2/multi-module-b.o
> ar: creating /home/work/LLVM_org/trunk/build/test/ExecutionEngine/MCJIT/Output/load-object-a.ll.tmp.cachedir3/load-object.a
>
> ar tfv /home/work/LLVM_org/trunk/build/test/ExecutionEngine/MCJIT/Output/load-object-a.ll.tmp.cachedir3/load-object.a
> rw-rw---- XXXXXXXX/125   1272 Jan 14 14:25 2014 multi-module-b.o
>
> XXXXXXXX is a 8-digit UID (I do not print it since it may be classified as internal info)
>
> You can create a new user with a long uid and test the tool.

I assume that is because the GID is short. I tested creating a user
with UID 1234567 and GID 1001. This is what I got by creating an
archive with gnu ar:

$ ls -ln foo
-rw-rw-r--. 1 1234567 1001 0 Jan 14 09:16 foo

$ ar tv foo.a
rw-rw-r-- 1234561001/1001      0 Jan 14 09:16 2014 foo

Not that the 7 is missing and GID got mangled with the UID. In fact,
the content of the archive is

foo/            1389708989  1234561001  100664  0

Would it be OK for you if llvm-ar simply kept the 6 most significant
digits of the UID? The uid is not used at all during linking.

Cheers,
Rafael



More information about the llvm-commits mailing list