[llvm-bugs] [Bug 32254] New: invalid x86_64 Reference Kind

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Mar 13 11:32:48 PDT 2017


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

            Bug ID: 32254
           Summary: invalid x86_64 Reference Kind
           Product: lld
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: MachO
          Assignee: unassignedbugs at nondot.org
          Reporter: superjoe30 at gmail.com
                CC: llvm-bugs at lists.llvm.org

Created attachment 18088
  --> https://bugs.llvm.org/attachment.cgi?id=18088&action=edit
hello.ll

This is LLD 4.0.0 / clang 4.0.0:

The attached llvm IR code, when converted to an .o file and linked with the
following command, results in the following failure:

andy at Andrews-MacBook-Air:~/dev/zig/build$ ~/local/bin/clang -c hello.ll
andy at Andrews-MacBook-Air:~/dev/zig/build$ ~/local/bin/lld -flavor darwin
-demangle -dynamic -arch x86_64 -macosx_version_min 10.10.0 -pie -o hello
hello.o -lSystem
warning: -sdk_version is required when emitting min version load command. 
Setting sdk version to match provided min version
invalid x86_64 Reference Kind
UNREACHABLE executed at
/Users/andy/Downloads/lld-4.0.0rc4.src/lib/ReaderWriter/MachO/ArchHandler_x86_64.cpp:620!
0  lld                      0x000000010acc4d4c
llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 60
1  lld                      0x000000010acc52b9
PrintStackTraceSignalHandler(void*) + 25
2  lld                      0x000000010acc0ee9 llvm::sys::RunSignalHandlers() +
425
3  lld                      0x000000010acc5812 SignalHandler(int) + 354
4  libsystem_platform.dylib 0x00007fffbebeebba _sigtramp + 26
5  libsystem_platform.dylib 0x000000011db25291 _sigtramp + 1593009905
6  libsystem_c.dylib        0x00007fffbea75420 abort + 129
7  lld                      0x000000010abf43f0 void*
llvm::object_creator<llvm::sys::SmartMutex<false> >() + 0
8  lld                      0x000000010b293c8e
lld::mach_o::ArchHandler_x86_64::applyFixupFinal(lld::Reference const&,
unsigned char*, unsigned long long, unsigned long long, unsigned long long,
unsigned long long, std::__1::function<unsigned long long (lld::Atom const&)>)
+ 1470
9  lld                      0x000000010b29312f
lld::mach_o::ArchHandler_x86_64::generateAtomContent(lld::DefinedAtom const&,
bool, std::__1::function<unsigned long long (lld::Atom const&)>,
std::__1::function<unsigned long long (lld::Atom const&)>, unsigned long long,
llvm::MutableArrayRef<unsigned char>) + 943
10 lld                      0x000000010b3101b0 (anonymous
namespace)::Util::copySectionContent(lld::mach_o::normalized::NormalizedFile&)
+ 1904
11 lld                      0x000000010b306fa5
lld::mach_o::normalized::normalizedFromAtoms(lld::File const&,
lld::MachOLinkingContext const&) + 2053
12 lld                      0x000000010b38c5ab
lld::mach_o::MachOWriter::writeFile(lld::File const&, llvm::StringRef) + 107
13 lld                      0x000000010b3d80e0
lld::LinkingContext::writeFile(lld::File const&) const + 112
14 lld                      0x000000010acd5e08
lld::mach_o::link(llvm::ArrayRef<char const*>, llvm::raw_ostream&) + 3704
15 lld                      0x000000010ab742a2 main + 482
16 libdyld.dylib            0x00007fffbe9e1255 start + 1
Stack dump:
0.      Program arguments: /Users/andy/local/bin/lld -flavor darwin -demangle
-dynamic -arch x86_64 -macosx_version_min 10.10.0 -pie -o hello hello.o
-lSystem
Abort trap: 6

-- 
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/20170313/994173f6/attachment.html>


More information about the llvm-bugs mailing list