| 1 |
# RUN: llvm-objdump -d -m --no-show-raw-insn --section="__TEXT,__stubs" %p/Inputs/symbolized-stubs.exe.macho-arm64_32 | FileCheck %s |
| 2 |
|
| 3 |
## Test that arm64_32 disassembly shows "literal pool symbol address" comments. |
| 4 |
|
| 5 |
# CHECK: Contents of (__TEXT,__stubs) section |
| 6 |
# CHECK-NEXT: adrp x16 |
| 7 |
# CHECK-NEXT: ldr w16, [x16] ; literal pool symbol address: _free |
| 8 |
# CHECK-NEXT: br x16 |
| 9 |
# CHECK-NEXT: adrp x16 |
| 10 |
# CHECK-NEXT: ldr w16, [x16, #0x4] ; literal pool symbol address: _malloc |
| 11 |
# CHECK-NEXT: br x16 |
| 12 |
|
| 13 |
## The test binary was generated with: |
| 14 |
## cat > test.c << 'EOF' |
| 15 |
## #include <stdlib.h> |
| 16 |
## int main(void) { |
| 17 |
## int *p = malloc(4); |
| 18 |
## free(p); |
| 19 |
## return 0; |
| 20 |
## } |
| 21 |
## EOF |
| 22 |
## xcrun -sdk watchos clang -arch arm64_32 test.c -o symbolized-stubs.exe.macho-arm64_32 |
| 23 |
## xcrun -sdk watchos strip -x symbolized-stubs.exe.macho-arm64_32 |