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

Demikhovsky, Elena elena.demikhovsky at intel.com
Tue Jan 14 06:29:20 PST 2014


I'm not using ar, so for me it is ok, I need only to see all tests pass. 
But I think that for those who use llvm-ar, the extracted files will be unreadable.

-  Elena


-----Original Message-----
From: Rafael EspĂ­ndola [mailto:rafael.espindola at gmail.com] 
Sent: Tuesday, January 14, 2014 16:24
To: Demikhovsky, Elena
Cc: llvm-commits at cs.uiuc.edu
Subject: Re: [llvm] r186934 - Add an initial implementation of archive symbol table generation.

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
---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.




More information about the llvm-commits mailing list