[llvm-dev] What should IRObjectFile expose?

Rafael EspĂ­ndola via llvm-dev llvm-dev at lists.llvm.org
Wed Apr 6 06:19:51 PDT 2016


> Thanks Rafael, that all makes sense. I think the first step would be to add
> some logic to IRObjectFile to have it compute a symbol table that's good
> enough to handle cases like this. Later we can perhaps consider moving some
> of that logic to somewhere like the bitcode writer and make IRObjectFile
> rely on that symbol table.

To fix the bug, probably.

But one question: For the time being, can you work around the bug by
making the symbol global? If I modify your test case to include

module asm ".global foo"

llvm-nm will print


---------------- T _start
                 U foo
---------------- T foo

Which looks silly, but will work since the linker will resolve "U foo"
to "T foo".

Cheers,
Rafael


More information about the llvm-dev mailing list