[LLVMdev] llvm-ar does not generates symbol table for contained bitcode files

Jason Holajter jholajter at arxan.com
Thu Sep 19 08:59:38 PDT 2013


The behavior of llvm-ar appears to have changed such that the archive symbol table no longer contains symbols contained within bitcode modules in the archive. This behavior appears to have been changed with revision 184083 when the internal implementation of llvm-ar was changed from lib/Archive/Archive.cpp to lib/object/Archive.cpp. This seems to occur because ObjectFile::createObjectFile() does not support creating objects of bitcode type and thus llvm-ar cannot read them to retrieve the symbol information.

Is there a plan to add support back to llvm-ar to generate symbol table information when archiving bitcode files?


Steps to reproduce:
Create repro.c with the following contents:
const char* symbol = "Hello, World!";

Create archive containing llvm bitcode files (no symbol table created):
clang -emit-llvm -c -o repro.bc repro.c
llvm-ar rs repro.a repro.bc

Create archive containing object files (symbol table is created):
clang -c -o repro.o repro.c
llvm-ar rs repro.a repro.o

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

More information about the llvm-dev mailing list