[llvm] r258627 - [Bitcode] Insert the darwin wrapper at the beginning of a file when the

Pete Cooper via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 26 09:22:48 PST 2016



Sent from my iPhone

> On Jan 26, 2016, at 9:18 AM, Rafael EspĂ­ndola via llvm-commits <llvm-commits at lists.llvm.org> wrote:
> 
>> On 26 January 2016 at 09:10, Akira Hatanaka <ahatanaka at apple.com> wrote:
>> 
>>> On Jan 26, 2016, at 9:06 AM, Rafael EspĂ­ndola <rafael.espindola at gmail.com> wrote:
>>> 
>>> On 23 January 2016 at 08:02, Akira Hatanaka via llvm-commits
>>> <llvm-commits at lists.llvm.org> wrote:
>>>> Author: ahatanak
>>>> Date: Sat Jan 23 10:02:10 2016
>>>> New Revision: 258627
>>>> 
>>>> URL: http://llvm.org/viewvc/llvm-project?rev=258627&view=rev
>>>> Log:
>>>> [Bitcode] Insert the darwin wrapper at the beginning of a file when the
>>>> target is macho.
>>>> 
>>>> It looks like the check for macho was accidentally dropped in r132959.
>>>> 
>>>> I don't have a test case, but I'll add one if anyone knows how this can
>>>> be tested.
>>> 
>>> 
>>> llvm-as should do it, no?
>>> 
>>> In a .ll with just
>>> 
>>> target triple = "x86_64-apple-macosx"
>>> 
>>> I get a .bc that starts with "de c0 17 0b" (bitcode in LE) and with
>>> 
>>> target triple = "x86_64-pc-linux"
>>> 
>>> I get a .bc that starts with "42 43 c0 de" (BC code).
>> 
>> Can I use hexdump to print the header? Or are there other llvm tools to do that?
> 
> It might be an issue on windows. I am not sure. You might be able to
> use python or "head -c" to get the first bytes.
I think it would also be fine to teach the llvm-bcanalyzer to emit this, even if it's behind a flag to do so.

Cheers
Pete
> 
> Cheers,
> Rafael
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits


More information about the llvm-commits mailing list