File: dyld-info.test

package info (click to toggle)
llvm-toolchain-16 1%3A16.0.6-15~deb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,634,792 kB
  • sloc: cpp: 6,179,261; ansic: 1,216,205; asm: 741,319; python: 196,614; objc: 75,325; f90: 49,640; lisp: 32,396; pascal: 12,286; sh: 9,394; perl: 7,442; ml: 5,494; awk: 3,523; makefile: 2,723; javascript: 1,206; xml: 886; fortran: 581; cs: 573
file content (31 lines) | stat: -rw-r--r-- 1,760 bytes parent folder | download | duplicates (12)
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
RUN: llvm-objdump --macho --dyld-info %p/Inputs/chained-fixups.macho-x86_64 | \
RUN:     FileCheck -DNAME=%p/Inputs/chained-fixups.macho-x86_64 %s
RUN: llvm-otool -dyld_info %p/Inputs/chained-fixups.macho-x86_64 | \
RUN:     FileCheck -DNAME=%p/Inputs/chained-fixups.macho-x86_64 %s

## See chained-fixups.test for how the test input was generated.
CHECK:      [[NAME]]:
CHECK-NEXT: dyld information:
CHECK-NEXT: segment      section address       pointer      type   addend dylib          symbol/vm address
CHECK-NEXT: __DATA_CONST __const 0x3E0   0x8010000000000001 bind   0x0    libdylib       _weakImport (weak import)
CHECK-NEXT: __DATA_CONST __const 0x3E8   0x8000000000000000 bind   0x0    flat-namespace _dynamicLookup
CHECK-NEXT: __DATA       __data  0x3F0   0x00200000000003F0 rebase                       0x3F0
CHECK-NEXT: __DATA       __data  0x400   0x8000000000000004 bind   0x0     weak          _weak
CHECK-NEXT: __DATA       __data  0x1410  0x8000000000000003 bind   0x0     weak          _weakLocal
CHECK-NEXT: __DATA       __data  0x3410  0x8010000000000002 bind   0x0     libdylib      _dylib
CHECK-NEXT: __DATA       __data  0x3418  0x800000002A000002 bind   0x2A    libdylib      _dylib


## TODO: Print opcode-based fixups/binds as well
## For now, test that execution doesn't fail if the input uses those.
RUN: llvm-objdump --macho --dyld-info %p/Inputs/bind.macho-x86_64
RUN: llvm-objdump --macho --dyld-info %p/Inputs/bind.macho-x86_64


## If both -chained_fixups and -dyld_info are passed, otool prints dyld_info
## output first. Match that.
RUN: llvm-otool -chained_fixups -dyld_info \
RUN:     %p/Inputs/chained-fixups.macho-x86_64 | \
RUN:     FileCheck --check-prefix=BOTH %s
BOTH: dyld information:
BOTH: chained fixups header