[llvm] r178676 - When dumping clear the arm/thumb flag for now.
Eric Christopher
echristo at gmail.com
Fri Apr 19 09:42:14 PDT 2013
Ha. Thanks for the catch. Either that or look for .ll files as well
since we've got the same testcase producing two .o files.
-eric
On Fri, Apr 19, 2013 at 5:43 AM, Rafael EspĂndola
<rafael.espindola at gmail.com> wrote:
> This test is never run since it is a .ll test in test/Object and the
> lit.local.config is:
>
> config.suffixes = ['.test']
>
> If it is a test for dumping, it might be better to just checkin the .o.
>
> On 3 April 2013 14:31, Eric Christopher <echristo at gmail.com> wrote:
>> Author: echristo
>> Date: Wed Apr 3 13:31:12 2013
>> New Revision: 178676
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=178676&view=rev
>> Log:
>> When dumping clear the arm/thumb flag for now.
>>
>> Patch by Nico Rieck!
>>
>> Added:
>> llvm/trunk/test/Object/ARM/
>> llvm/trunk/test/Object/ARM/symbol-addr.ll
>> Modified:
>> llvm/trunk/include/llvm/Object/ELF.h
>>
>> Modified: llvm/trunk/include/llvm/Object/ELF.h
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Object/ELF.h?rev=178676&r1=178675&r2=178676&view=diff
>> ==============================================================================
>> --- llvm/trunk/include/llvm/Object/ELF.h (original)
>> +++ llvm/trunk/include/llvm/Object/ELF.h Wed Apr 3 13:31:12 2013
>> @@ -1058,6 +1058,11 @@ error_code ELFObjectFile<ELFT>::getSymbo
>> 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;
>>
>> Added: llvm/trunk/test/Object/ARM/symbol-addr.ll
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Object/ARM/symbol-addr.ll?rev=178676&view=auto
>> ==============================================================================
>> --- llvm/trunk/test/Object/ARM/symbol-addr.ll (added)
>> +++ llvm/trunk/test/Object/ARM/symbol-addr.ll Wed Apr 3 13:31:12 2013
>> @@ -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
>> +}
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list