Open llvmbot opened 7 years ago
We now have a workaround in lld so that lld reads each file's symbol table if an archive file has no symbol table. That seems to be working well. So I guess this is now low priority? Or, is there any other tool that has to read an archive file symbol table which contain bitcode files?
Somewhat orthogonal, but if it is easy to read symbol tables from LLVM bitcode files, does it make sense to write a patch to GNU binutils so that their ar command can create symbol tables for our bitcode files?
There are other sets of binary utilities in use too, including ELF Tool Chain used by FreeBSD. It would be nice to have a BSD/MIT-licensed patch to ELF Tool Chain's ar to parse bitcode files.
https://sourceforge.net/p/elftoolchain/code/HEAD/tree/trunk/ar/
I think if the symbol table part of the file format is stable, we should do that.
Somewhat orthogonal, but if it is easy to read symbol tables from LLVM bitcode files, does it make sense to write a patch to GNU binutils so that their ar command can create symbol tables for our bitcode files?
It might be possible to add a minimal bfd for that, yes.
I am not sure how stable the format is for now.
Somewhat orthogonal, but if it is easy to read symbol tables from LLVM bitcode files, does it make sense to write a patch to GNU binutils so that their ar command can create symbol tables for our bitcode files?
Extended Description
These two utilities are very big for what they are:
% size bin/llvm-nm bin/llvm-ar text data bss dec hex filename 11438972 3805936 128664 15373572 ea9504 bin/llvm-nm 11374922 3806224 121520 15302666 e9800a bin/llvm-ar
The main problem is that they support bitcode files. Until recently to find all the symbols in the bitcode they had to parse it and then parse any file level inline assembly.
This should not be necessary anymore now that bicode files have a symbol table.