search for: getsymboloffset

Displaying 4 results from an estimated 4 matches for "getsymboloffset".

Did you mean: get_symbol_offset
2013 Jan 18
1
[LLVMdev] ELFObjectFile::getSymbolFileOffset
...for the current behavior. I know there have been some discussions in the past about the address/offset ambiguity in this interface but I couldn't find anything directly addressing this question. Looking at the revision history, it seems that the current implementation has been in place since getSymbolOffset was created (in lib/Object/ELFObjectFile.cpp, r139683) based on an earlier getSymbolAddress implementation and wasn't updated when other aspects of the function were corrected and the function was renamed getSymbolFileOffset(in lib/Object/ELFObjectFile.cpp, r145408) . Here's the change I...
2011 Oct 13
0
[LLVMdev] llvm-objdump related patch
...tSection will not handle extended section indices properly. Use the version that takes a const Elf_Sym*. This also fails when there is no section table, which is not required for executables or shared libraries. + Result = false; + return object_error::success; + } + + uint64_t Address; + getSymbolOffset(Symb, Address); + + if (sym->getType() == ELF::STT_FUNC Again, this will only work for functions. Symbols without this type can also be in a section. + && Address >= sec->sh_addr + && Address < (sec->sh_addr + sec->sh_size)) + Result = true; + return...
2011 Oct 12
2
[LLVMdev] llvm-objdump related patch
Michael, I have rework the patch according to your suggestion. And I have read binutil/objdump source code and found that it has a logic that if there's no symtab, it will use dynsym, which is missing in llvm-objdump. Songmao -------------- next part -------------- A non-text attachment was scrubbed... Name: 0002-Fix-the-address-calculation-for-llvm-objdump.patch Type: text/x-patch
2013 Sep 25
1
[LLVMdev] arm64 / iOS support
...32_t Offset = Target.getConstant(); + + if (const MCSymbolRefExpr *RefB = Target.getSymB()) { + const MCSymbol &SymbolB = RefB->getSymbol(); + MCSymbolData &SDB = Asm.getSymbolData(SymbolB); + IsPCRel = true; + + // Offset of the symbol in the section + int64_t a = Layout.getSymbolOffset(&SDB); + + // Offset of the relocation in the section + int64_t b = Layout.getFragmentOffset(Fragment) + Fixup.getOffset(); + Offset += b - a; + } + + if (IsPCRel && RelocType == MachO::ARM_RELOC_VANILLA) + Offset += 1 << Log2Size; + + // See <reloc.h>. + uin...