[LLVMdev] A potential bug in llvm-objdump saying "LLVM ERROR: Symb must point to a valid symbol."

杨勇勇 triple.yang at gmail.com
Wed Jan 22 22:29:58 PST 2014


Hi, all, recently I met a problem "LLVM ERROR: Symb must point to a valid
symbol." This error occurs when a elf file produced by linker contains only
one fake symbol.

I checked with debugger and found this error locates at
ELFObjectFile::validateSymbol() in include/llvm/Object/ELF.h and origins
from DisassembleObject() in tools/llvm-objdump/llvm-objdump.cpp at line
230. Prameter si is assigned with Obj->begin_symbols() by value
{a = 1 /* symbol index */, b = 1 /* section index */}.

To conquer my problem, I changed it to {a = 0 /* symbol index */, b = 1 /*
section index */}, and it works now.

Any suggestion?

Best regards.

-- 
杨勇勇 (Yang Yong-Yong)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140123/b2cd9ac5/attachment.html>


More information about the llvm-dev mailing list