[lld] r279726 - [ELF] - Implemented --oformat binary option.

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 2 02:09:10 PDT 2016


>> --- lld/trunk/test/ELF/oformat-binary.s (added)
>> +++ lld/trunk/test/ELF/oformat-binary.s Thu Aug 25 04:05:47 2016
>> @@ -0,0 +1,28 @@
>> +# REQUIRES: x86
>> +# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
>> +
>> +# RUN: ld.lld -o %t.out %t --oformat binary
>> +# RUN: hexdump -C %t.out | FileCheck %s
>> +# CHECK: 00000000 90 11 22 00 00 00 00 00
>> +# CHECK-NOT: 00000010
>> +
>> +## Check case when linkerscript is used.
>> +# RUN: echo "SECTIONS { . = 0x1000; }" > %t.script
>> +# RUN: ld.lld -o %t2.out --script %t.script %t --oformat binary
>> +# RUN: hexdump -C %t2.out | FileCheck %s
>
>Hi,
>
>'hexdump -C' should be replaced with 'llvm-objdump -s' to avoid adding a
>dependency on an external tool
>
>-Tom

Hi Tom !

--oformat binary testcase is about checking feature of raw binary ouput.
So llvm-objdump -s gives me "The file was not recognized as a valid object file" here.
Not sure if there is something elve is llvm tools that can help here ?

George.


More information about the llvm-commits mailing list