mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-28 14:10:41 +00:00
When dumping clear the arm/thumb flag for now.
Patch by Nico Rieck! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178676 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5417223f98
commit
eac49f668a
@ -1058,6 +1058,11 @@ error_code ELFObjectFile<ELFT>::getSymbolAddress(DataRefImpl Symb,
|
||||
IsRelocatable = true;
|
||||
}
|
||||
Result = symb->st_value;
|
||||
|
||||
// Clear the ARM/Thumb indicator flag.
|
||||
if (Header->e_machine == ELF::EM_ARM)
|
||||
Result &= ~1;
|
||||
|
||||
if (IsRelocatable && Section != 0)
|
||||
Result += Section->sh_addr;
|
||||
return object_error::success;
|
||||
|
12
test/Object/ARM/symbol-addr.ll
Normal file
12
test/Object/ARM/symbol-addr.ll
Normal file
@ -0,0 +1,12 @@
|
||||
; RUN: llc %s -mtriple=arm-unknown-unknown -filetype=obj -o - \
|
||||
; RUN: | llvm-objdump -t - | FileCheck %s
|
||||
; RUN: llc %s -mtriple=thumb-unknown-unknown -filetype=obj -o - \
|
||||
; RUN: | llvm-objdump -t - | FileCheck %s
|
||||
|
||||
; Check that the symbol address does not include the ARM/Thumb instruction
|
||||
; indicator bit.
|
||||
; CHECK: 00000000 g F .text {{[0-9]+}} test
|
||||
|
||||
define i32 @test() {
|
||||
ret i32 1
|
||||
}
|
Loading…
Reference in New Issue
Block a user