[llvm] r243096 - [dsymutil] Implement support for universal mach-o object files.

İsmail Dönmez ismail at donmez.ws
Fri Jul 24 08:03:44 PDT 2015


On Fri, Jul 24, 2015 at 5:48 PM, Frédéric Riss <friss at apple.com> wrote:
>
> On Jul 24, 2015, at 3:36 AM, İsmail Dönmez <ismail at donmez.ws> wrote:
>
>
> Hi,
>
> On Fri, Jul 24, 2015 at 9:41 AM, Frederic Riss <friss at apple.com> wrote:
>
> Author: friss
> Date: Fri Jul 24 01:41:11 2015
> New Revision: 243096
>
> URL: http://llvm.org/viewvc/llvm-project?rev=243096&view=rev
>
> Log:
> [dsymutil] Implement support for universal mach-o object files.
>
> This patch allows llvm-dsymutil to read universal (aka fat) macho object
> files and archives. The patch touches nearly everything in the BinaryHolder,
> but it is fairly mechinical: the methods that returned MemoryBufferRefs or
> ObjectFiles now return a vector of those, and the high-level access function
> takes a triple argument to select the architecture.
>
> There is no support yet for handling fat executables and thus no support for
> writing fat object files.
>
> Added:
>    llvm/trunk/test/tools/dsymutil/ARM/
>    llvm/trunk/test/tools/dsymutil/ARM/fat-arch-not-found.test
>    llvm/trunk/test/tools/dsymutil/ARM/lit.local.cfg
>    llvm/trunk/test/tools/dsymutil/Inputs/fat-test.c
>    llvm/trunk/test/tools/dsymutil/Inputs/fat-test.o
>    llvm/trunk/test/tools/dsymutil/Inputs/libfat-test.a
>    llvm/trunk/test/tools/dsymutil/X86/fat-archive-input-i386.test
>    llvm/trunk/test/tools/dsymutil/X86/fat-object-input-x86_64.test
>    llvm/trunk/test/tools/dsymutil/X86/fat-object-input-x86_64h.test
> Modified:
>    llvm/trunk/tools/dsymutil/BinaryHolder.cpp
>    llvm/trunk/tools/dsymutil/BinaryHolder.h
>    llvm/trunk/tools/dsymutil/DebugMap.cpp
>    llvm/trunk/tools/dsymutil/DwarfLinker.cpp
>    llvm/trunk/tools/dsymutil/MachODebugMapParser.cpp
>
> Added: llvm/trunk/test/tools/dsymutil/ARM/fat-arch-not-found.test
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/dsymutil/ARM/fat-arch-not-found.test?rev=243096&view=auto
>
> ==============================================================================
> --- llvm/trunk/test/tools/dsymutil/ARM/fat-arch-not-found.test (added)
> +++ llvm/trunk/test/tools/dsymutil/ARM/fat-arch-not-found.test Fri Jul 24
> 01:41:11 2015
> @@ -0,0 +1,13 @@
> +# REQUIRES: object-emission
> +# RUN: llvm-dsymutil -oso-prepend-path=%p/../Inputs -y %s -o - 2>&1 |
> FileCheck %s
> +
> +---
> +triple:          'armv7-apple-darwin'
> +objects:
> +  - filename: libfat-test.a(fat-test.o)
> +    symbols:
> +      - { sym: _armv7_var, objAddr: 0x0, binAddr: 0x1000, size: 0x4 }
> +...
> +
> +# CHECK: libfat-test.a(fat-test.o): No object file for requested
> architecture
> +
>
>
> This test fails on my Linux x64 bot:
>
> ******************** TEST 'LLVM ::
> tools/dsymutil/ARM/fat-arch-not-found.test' FAILED
> ********************
> Script:
> --
> /home/abuild/rpmbuild/BUILD/llvm/stage2/./bin/llvm-dsymutil
> -oso-prepend-path=/home/abuild/rpmbuild/BUILD/llvm/test/tools/dsymutil/ARM/../Inputs
> -y
> /home/abuild/rpmbuild/BUILD/llvm/test/tools/dsymutil/ARM/fat-arch-not-found.test
> -o - 2>&1 | /home/abuild/rpmbuild/BUILD/llvm/stage2/./bin/FileCheck
> /home/abuild/rpmbuild/BUILD/llvm/test/tools/dsymutil/ARM/fat-arch-not-found.test
> --
> Exit Code: 1
>
> Command Output (stderr):
> --
> /home/abuild/rpmbuild/BUILD/llvm/test/tools/dsymutil/ARM/fat-arch-not-found.test:12:10:
> error: expected string not found in input
> # CHECK: libfat-test.a(fat-test.o): No object file for requested
> architecture
>          ^
> <stdin>:1:1: note: scanning from here
> while processing dwarf streamer init:
> ^
>
>
> This was fixed by r243106, right?

Yes, thanks.




More information about the llvm-commits mailing list