28 lines · plain
1# REQUIRES: systemz2# RUN: llvm-mc -filetype=obj -triple=s390x-unknown-linux %p/Inputs/systemz-init.s -o systemz-init.o3# RUN: llvm-mc -filetype=obj -triple=s390x-unknown-linux %s -o %t.o4# RUN: ld.lld -dynamic-linker /lib/ld64.so.1 %t.o systemz-init.o -o %t5# RUN: llvm-objdump -d --no-show-raw-insn -j .init %t | FileCheck %s6 7# glibc < 2.39 used to align .init and .fini code at a 4-byte boundary.8# When that happens, the linker must not pad the code with invalid9# instructions, e.g. null bytes.10 .section .init,"ax",@progbits11 brasl %r14, startup12 13# CHECK: <.init>:14# CHECK-NEXT: brasl %r14,15# CHECK-NEXT: nopr %r716# CHECK-NEXT: lg %r4, 272(%r15)17 18 .text19 .globl startup20 .p2align 421startup:22 br %r1423 24 .globl main25 .p2align 426main:27 br %r1428