brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · a1c2e5d Raw
40 lines · plain
1// REQUIRES: x862// RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t.o3// RUN: ld.lld %t.o -o %t4// RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck %s5// RUN: ld.lld -pie %t.o -o %t26// RUN: llvm-objdump -d --no-show-raw-insn %t2 | FileCheck --check-prefix=PIE %s7 8.globl _start9_start:10  call __preinit_array_start11  call __preinit_array_end12  call __init_array_start13  call __init_array_end14  call __fini_array_start15  call __fini_array_end16 17/// Due to __init_array_start/__init_array_end, .init_array is retained.18 19// CHECK: Disassembly of section .text:20// CHECK-EMPTY:21// CHECK-NEXT:  <_start>:22// CHECK-NEXT:   201120:       callq    0x20000023// CHECK-NEXT:                 callq    0x20000024// CHECK-NEXT:                 callq    0x20000025// CHECK-NEXT:                 callq    0x20000026// CHECK-NEXT:                 callq    0x20000027// CHECK-NEXT:                 callq    0x20000028 29// In position-independent binaries, they resolve to .text too.30 31// PIE:      Disassembly of section .text:32// PIE-EMPTY:33// PIE-NEXT: <_start>:34// PIE-NEXT:     1210:       callq   0x035// PIE-NEXT:                 callq   0x036// PIE-NEXT:                 callq   0x037// PIE-NEXT:                 callq   0x038// PIE-NEXT:                 callq   0x039// PIE-NEXT:                 callq   0x040