杨勇勇
2014-Jan-23 06:29 UTC
[LLVMdev] A potential bug in llvm-objdump saying "LLVM ERROR: Symb must point to a valid symbol."
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>
Rafael Espíndola
2014-Jan-25 17:02 UTC
[LLVMdev] A potential bug in llvm-objdump saying "LLVM ERROR: Symb must point to a valid symbol."
Could you open a bug in llvm.org/bugs and attached such elf file? On 23 January 2014 01:29, 杨勇勇 <triple.yang at gmail.com> wrote:> 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) > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >