SRI-CSL / whole-program-llvm

A toolkit for building whole-program LLVM bitcode files
MIT License
73 stars 11 forks source link

Does anyone use .bca files anymore? #12

Closed ianamason closed 8 years ago

ianamason commented 8 years ago

So I build a musl libc.a and extract-bc it, and I get

libc.a.bca

when what I really wanted was

libc.a.bc

now I can easily make this beast my doing

extract-bc -m libc.a

and hacking the manifest into a llvm-link command, but it might be more useful to have extract-bc do this as the default.

Hence the question. I'll tag a few people who may now the answer @delcypher @mdimjasevic @BenjaminSchubert @travitch @BrunoDutertre

mdimjasevic commented 8 years ago

Hi @ianamason,

I am not too much familiar with LLVM IR and various related formats, including the bitcode archive format.

These days I mostly work with KLEE, which uses LLVM IR. It does have an option to load stuff from a .bca file. However, I haven't used that feature so far, but I'll see once I start playing more with analyzing Debian packages.

ianamason commented 8 years ago

Thanks @mdimjasevic, I guess I will just add a flag for the time being.

travitch commented 8 years ago

I'm not familiar with the bca format either, unfortunately.

ianamason commented 8 years ago

I was hoping the Klee folks @delcypher might have an opinion...

BenjaminSchubert commented 8 years ago

On my side I'm only using .bc files also, sorry.

delcypher commented 8 years ago

@ianamason I used this feature a long time ago but I haven't used it for a while. IIRC the bca format is just like a .a archive file but it contains bitcode files rather than object files. When I last looked at this though I don't think there was a symbol table in the archive though so it required manually opening each object file to simulate what a linker would normally do with a static archive.

If it's really getting your way I suggest changing the default.

ianamason commented 8 years ago

Thanks @delcypher, I have a theory that the bca's were more useful back when llvm-ld roamed the planet. So I will at least add a flag to extract a bc module from an archive.

ianamason commented 8 years ago

OK so there is a switch now in the PIP package. Yes wllvm is now a PIP package.

pip install wllvm