Don't lookup an object symbol name in the module.
authorRafael Espindola <rafael.espindola@gmail.com>
Tue, 9 Dec 2014 16:13:59 +0000 (16:13 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Tue, 9 Dec 2014 16:13:59 +0000 (16:13 +0000)
commit4f20ed1c3683c02e9507e8f49d2c95adc2fb47c6
tree8cc4b1f1298352c452556537ea511f40d91ac551
parentde0cdb08909b3aaa571722c7cfae56455e812e76
Don't lookup an object symbol name in the module.

Instead, walk the obj symbol list in parallel to find the GV. This shouldn't
change anything on ELF where global symbols are not mangled, but it is a step
toward supporting other object formats.

Gold itself is ELF only, but bfd ld supports COFF and the logic in the gold
plugin could be reused on lld.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223780 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Object/IRObjectFile.h
lib/Object/IRObjectFile.cpp
tools/gold/gold-plugin.cpp