mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
sets bit 0 of the function address of thumb function in .symtab
("T is 1 if the target symbol S has type STT_FUNC and the symbol addresses a Thumb instruction ;it is 0 otherwise." from "ELF for the ARM Architecture" 4.7.1.2) Patch by Koan-Sin Tan! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131406 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -193,8 +193,13 @@ uint64_t ELFObjectWriter::SymbolValue(MCSymbolData &Data,
|
||||
if (!Symbol.isInSection())
|
||||
return 0;
|
||||
|
||||
if (Data.getFragment())
|
||||
return Layout.getSymbolOffset(&Data);
|
||||
|
||||
if (Data.getFragment()) {
|
||||
if (Data.getFlags() & ELF_Other_ThumbFunc)
|
||||
return Layout.getSymbolOffset(&Data)+1;
|
||||
else
|
||||
return Layout.getSymbolOffset(&Data);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user