2013-04-05 02:59:24 +08:00
|
|
|
# RUN: lld -flavor darwin -arch x86_64 -macosx_version_min 10.8 %s -o %t && \
|
|
|
|
# RUN: llvm-nm %t | FileCheck %s
|
2012-04-07 09:31:00 +08:00
|
|
|
#
|
|
|
|
# Test that hello-world can be linked into a mach-o executable
|
|
|
|
#
|
|
|
|
|
|
|
|
---
|
2013-01-05 10:22:35 +08:00
|
|
|
defined-atoms:
|
2012-04-07 09:31:00 +08:00
|
|
|
- name: _main
|
|
|
|
type: code
|
|
|
|
scope: global
|
2013-01-05 10:22:35 +08:00
|
|
|
content: [ 55, 48, 89, E5, 48, 8D, 3D, 00,
|
|
|
|
00, 00, 00, E8, 00, 00, 00, 00,
|
|
|
|
31, C0, 5D, C3 ]
|
2013-01-09 05:12:13 +08:00
|
|
|
references:
|
2012-04-07 09:31:00 +08:00
|
|
|
- offset: 7
|
2013-04-05 02:59:24 +08:00
|
|
|
kind: ripRel32
|
2012-04-07 09:31:00 +08:00
|
|
|
target: LC1
|
|
|
|
- offset: 12
|
2013-04-05 02:59:24 +08:00
|
|
|
kind: branch32
|
2012-04-07 09:31:00 +08:00
|
|
|
target: _printf
|
|
|
|
|
|
|
|
- ref-name: LC1
|
|
|
|
type: c-string
|
2013-01-15 08:17:57 +08:00
|
|
|
merge: by-content
|
2012-04-07 09:31:00 +08:00
|
|
|
content: [ 68, 65, 6C, 6C, 6F, 0A, 00 ]
|
|
|
|
|
2013-01-05 10:22:35 +08:00
|
|
|
shared-library-atoms:
|
2012-04-07 09:31:00 +08:00
|
|
|
- name: _printf
|
|
|
|
load-name: /usr/lib/libSystem.B.dylib
|
|
|
|
|
|
|
|
...
|
|
|
|
|
|
|
|
# CHECK: {{[0-9a-f]+}} s _main
|
|
|
|
# CHECK: 00000000 u _printf
|
|
|
|
# CHECK: 00000000 u dyld_stub_binder
|