[llvm] r196432 - Fix a bug in darwin's 32-bit X86 handling of evaluating fixups.

Rafael EspĂ­ndola rafael.espindola at gmail.com
Thu Dec 5 13:19:06 PST 2013


On 5 December 2013 16:04, Kevin Enderby <enderby at apple.com> wrote:
> Hi Rafael.
>
> I would like to use llvm-objdump to disassemble for the test case but given the nature of the bug, that the offset to the item to be relocated needs to be more than 24 bits to trigger the bug, it takes a long time to do the disassembly:
>
> $ time /Volumes/SandBox/build-llvm/Debug+Asserts/bin/llvm-objdump -disassemble /tmp/x.o | grep movl
>  1020f55:       c7 05 64 75 53 01 00 00 00 00                   movl    $0, 22246756
>
> real    0m19.777s
> user    0m19.555s
> sys     0m0.036s
>
> If llvm-objdump had an option like otool(1)'s  -p one could simply do:
>
> $ time otool -tv -p bug /tmp/x.o
> /tmp/x.o:
> (__TEXT,__text) section
> bug:
> 01020f55        movl    $0x0, 0x1537564
>
> real    0m0.690s
> user    0m0.004s
> sys     0m0.014s
>
> I talked to Jim Grosbach at lunch and he said it was a non-starter to have a test case that takes a long time to run.

I agree. Would you mind just creating a bug about the missing feature
in llvm-objdump and ccing me?

> So it took me a while to come up with something that was quick.  And I did add a fair bit of comments to the test case to try to explain what is happening.  I agree it is not the best and I too would like to have matched it up with disassembly and not the output of macho-dump.
>
> My thoughts,
> Kev
>
> P.S. This bug was a real pain to find given how large the test case was that I started with :)


I can imagine!

Thanks for fixing this.

Cheers,
Rafael




More information about the llvm-commits mailing list