[llvm-bugs] [Bug 42343] New: llvm::object::MachOUniversalBinary does not handle executables with hidden ARM64

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Jun 20 09:07:47 PDT 2019


https://bugs.llvm.org/show_bug.cgi?id=42343

            Bug ID: 42343
           Summary: llvm::object::MachOUniversalBinary does not handle
                    executables with hidden ARM64
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Keywords: missing-feature
          Severity: enhancement
          Priority: P
         Component: Object
          Assignee: unassignedbugs at nondot.org
          Reporter: anusha.basana at gmail.com
                CC: llvm-bugs at lists.llvm.org

Cctool lipo has a flag -hideARM64:
-hideARM64
    When  creating  a  universal  binary including both 32-bit and 64-bit ARM
files, this option will ask lipo to add the 64-bit files at the end and not
include them in the count of architectures present in the file.  The  files 
must  be executable  files  (Mach-O filetype MH_EXECUTE). This option has no
effect if neither 32-bit ARM nor 64-bit ARM files are present, and no other
files may be hidden in this way. This option only works  with  the  -create, 
-remove,  and -replace, commands, and is only intended for tools and workflows
testing a workaround on older systems.

This bug is relevant for the implementation of llvm-lipo -thin flag, where a
thin output file is created given a universal binary and a specified
architecture type. 

The hidden ARM64 slice is not included in the header,
MachOUniversalBinary::ObjectForArch::ObjectForArch(const MachOUniversalBinary
*Parent, uint32_t Index) will not work for an index that is "out of range"

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190620/b6ff65b8/attachment.html>


More information about the llvm-bugs mailing list