mirror of
https://github.com/RPCSX/llvm.git
synced 2025-03-06 11:59:54 +00:00
Follow aliases when determining if a symbol is thumb.
This fixes pr19484. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206917 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8dd58d1f02
commit
8c8fae7268
@ -492,7 +492,6 @@ uint64_t ELFObjectWriter::SymbolValue(MCSymbolData &OrigData,
|
|||||||
return Data->getCommonAlignment();
|
return Data->getCommonAlignment();
|
||||||
|
|
||||||
const MCSymbol *Symbol = &Data->getSymbol();
|
const MCSymbol *Symbol = &Data->getSymbol();
|
||||||
bool IsThumbFunc = OrigData.getFlags() & ELF_Other_ThumbFunc;
|
|
||||||
|
|
||||||
uint64_t Res = 0;
|
uint64_t Res = 0;
|
||||||
if (Symbol->isVariable()) {
|
if (Symbol->isVariable()) {
|
||||||
@ -514,7 +513,7 @@ uint64_t ELFObjectWriter::SymbolValue(MCSymbolData &OrigData,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IsThumbFunc)
|
if (Data && Data->getFlags() & ELF_Other_ThumbFunc)
|
||||||
Res |= 1;
|
Res |= 1;
|
||||||
|
|
||||||
if (!Symbol || !Symbol->isInSection())
|
if (!Symbol || !Symbol->isInSection())
|
||||||
|
@ -11,7 +11,17 @@
|
|||||||
foo:
|
foo:
|
||||||
bx lr
|
bx lr
|
||||||
|
|
||||||
@@ make sure foo is thumb function: bit 0 = 1 (st_value)
|
.global bar
|
||||||
|
bar = foo
|
||||||
|
|
||||||
|
@@ make sure foo and bar are thumb function: bit 0 = 1 (st_value)
|
||||||
|
@CHECK: Symbol {
|
||||||
|
@CHECK: Name: bar
|
||||||
|
@CHECK-NEXT: Value: 0x1
|
||||||
|
@CHECK-NEXT: Size: 0
|
||||||
|
@CHECK-NEXT: Binding: Global
|
||||||
|
@CHECK-NEXT: Type: Function
|
||||||
|
|
||||||
@CHECK: Symbol {
|
@CHECK: Symbol {
|
||||||
@CHECK: Name: foo
|
@CHECK: Name: foo
|
||||||
@CHECK-NEXT: Value: 0x1
|
@CHECK-NEXT: Value: 0x1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user