summaryrefslogtreecommitdiffstats
path: root/lld/test/darwin/hello-world.objtxt
blob: bb1148437504c7388ce254ffccba1834ceea1efb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# RUN: lld-core -platform darwin -stubs-pass %s -o %t && llvm-nm %t | FileCheck %s

#
# Test that hello-world can be linked into a mach-o executable
#

---
atoms:
    - name:              _main
      type:              code
      scope:             global
      content:           [ 55, 48, 89, E5, 48, 8D, 3D, 00, 00, 00, 00, 
                           E8, 00, 00, 00, 00, 31, C0, 5D, C3 ]
      fixups:
      - offset:          7
        kind:            pcrel32
        target:          LC1
      - offset:          12
        kind:            call32
        target:          _printf

    - ref-name:          LC1
      scope:             hidden
      type:              c-string
      content:           [ 68, 65, 6C, 6C, 6F, 0A, 00 ]

    - name:              _printf
      definition:        shared-library
      load-name:         /usr/lib/libSystem.B.dylib

...

# CHECK:	{{[0-9a-f]+}} s _main
# CHECK:	00000000 u _printf
# CHECK:	00000000 u dyld_stub_binder
OpenPOWER on IntegriCloud