[LLVMdev] Using thin archives when building llvm

Kevin Enderby enderby at apple.com
Thu Jul 23 16:37:57 PDT 2015


> On Jul 23, 2015, at 4:03 PM, Rafael EspĂ­ndola <rafael.espindola at gmail.com> wrote:
> 
> .
> >
> >
> > Even if the string table is in in-order in practice, you have to search for NUL characters byte-by-byte unless it's really guaranteed to be in-order, no?
> >
> 
> No. Let's say we are at symbol N and want to find its size. Each symbol in the bsd format is represented with a pair of offsets. One to the member and one to the string table.
> 
> We should be able to compute the symbol name size as the difference from the current symbol string table offset and the next symbol string table offset.
> 
This is making an assumption that the string table is in the same order as the ranlib structs.  While the llvm-ar tool does this it is not guaranteed by the format.  One could imagine an ar(1) tool when there are multiple archive members defining the same symbol the string table entry for the symbol name is reused to save space.
> Cheers, Rafael
> 
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150723/b6d97e8b/attachment.html>


More information about the llvm-dev mailing list