[PATCH] [Object/ELF] Provide symbol helpers
Rafael Ávila de Espíndola
rafael.espindola at gmail.com
Fri Jun 5 06:44:03 PDT 2015
REPOSITORY
rL LLVM
================
Comment at: include/llvm/Object/ELF.h:1030
@@ +1029,3 @@
+bool ELFFile<ELFT>::isCommonSymbol(const Elf_Sym *Sym) const {
+ return Sym->getType() == llvm::ELF::STT_COMMON ||
+ Sym->st_shndx == llvm::ELF::SHN_COMMON ||
----------------
rafael wrote:
> You don't need the type, just she st_shndx.
Actually, sorry, you need the type.
On a .o the symbol is required to have SHN_COMMON, but that doesn't exist on a .so.
Since we want this to work for both what you have is probably the best.
http://reviews.llvm.org/D10264
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list