brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.4 KiB · 740f971 Raw
86 lines · plain
1; REQUIRES: aarch642; RUN: rm -rf %t && split-file %s %t3 4; RUN: sed "s/<ALIGN>/0/g" %t/align.s.template > %t/align-1.s5; RUN: sed "s/<ALIGN>/1/g" %t/align.s.template > %t/align-2.s6; RUN: sed "s/<ALIGN>/2/g" %t/align.s.template > %t/align-4.s7 8; RUN: llvm-mc -filetype=obj -triple=arm64-apple-darwin %t/first.s -o %t/first.o9; RUN: llvm-mc -filetype=obj -triple=arm64-apple-darwin %t/align-1.s -o %t/align-1.o10; RUN: llvm-mc -filetype=obj -triple=arm64-apple-darwin %t/align-2.s -o %t/align-2.o11; RUN: llvm-mc -filetype=obj -triple=arm64-apple-darwin %t/align-4.s -o %t/align-4.o12 13; RUN: %lld -dylib -arch arm64 --tail-merge-strings %t/first.o %t/align-1.o -o %t/align-114; RUN: llvm-objdump --macho --section="__TEXT,__cstring" --syms %t/align-1 | FileCheck %s --check-prefixes=CHECK,ALIGN115 16; RUN: %lld -dylib -arch arm64 --tail-merge-strings %t/first.o %t/align-2.o -o %t/align-217; RUN: llvm-objdump --macho --section="__TEXT,__cstring" --syms %t/align-2 | FileCheck %s --check-prefixes=CHECK,ALIGN218 19; RUN: %lld -dylib -arch arm64 --tail-merge-strings %t/first.o %t/align-4.o -o %t/align-420; RUN: llvm-objdump --macho --section="__TEXT,__cstring" --syms %t/align-4 | FileCheck %s --check-prefixes=CHECK,ALIGN421 22; CHECK: Contents of (__TEXT,__cstring) section23; CHECK: [[#%.16x,START:]] get awkward offset{{$}}24 25; ALIGN1: [[#%.16x,START+19]] myotherlongstr{{$}}26; ALIGN1: [[#%.16x,START+19+15]] otherstr{{$}}27 28; ALIGN2: [[#%.16x,START+20]] myotherlongstr{{$}}29; ALIGN2: [[#%.16x,START+20+16]] longstr{{$}}30; ALIGN2: [[#%.16x,START+20+16+8]] otherstr{{$}}31; ALIGN2: [[#%.16x,START+20+16+8+10]] str{{$}}32 33; ALIGN4: [[#%.16x,START+20]] myotherlongstr{{$}}34; ALIGN4: [[#%.16x,START+20+16]] otherlongstr{{$}}35; ALIGN4: [[#%.16x,START+20+16+16]] longstr{{$}}36; ALIGN4: [[#%.16x,START+20+16+16+8]] otherstr{{$}}37; ALIGN4: [[#%.16x,START+20+16+16+8+12]] str{{$}}38 39; CHECK: SYMBOL TABLE:40 41; ALIGN1: [[#%.16x,START+19]] l     O __TEXT,__cstring _myotherlongstr42; ALIGN1: [[#%.16x,START+21]] l     O __TEXT,__cstring _otherlongstr43; ALIGN1: [[#%.16x,START+26]] l     O __TEXT,__cstring _longstr44; ALIGN1: [[#%.16x,START+34]] l     O __TEXT,__cstring _otherstr45; ALIGN1: [[#%.16x,START+39]] l     O __TEXT,__cstring _str46 47; ALIGN2: [[#%.16x,START+20]] l     O __TEXT,__cstring _myotherlongstr48; ALIGN2: [[#%.16x,START+20+2]] l     O __TEXT,__cstring _otherlongstr49; ALIGN2: [[#%.16x,START+20+16]] l     O __TEXT,__cstring _longstr50; ALIGN2: [[#%.16x,START+20+16+8]] l     O __TEXT,__cstring _otherstr51; ALIGN2: [[#%.16x,START+20+16+8+10]] l     O __TEXT,__cstring _str52 53; ALIGN4: [[#%.16x,START+20]] l     O __TEXT,__cstring _myotherlongstr54; ALIGN4: [[#%.16x,START+20+16]] l     O __TEXT,__cstring _otherlongstr55; ALIGN4: [[#%.16x,START+20+16+16]] l     O __TEXT,__cstring _longstr56; ALIGN4: [[#%.16x,START+20+16+16+8]] l     O __TEXT,__cstring _otherstr57; ALIGN4: [[#%.16x,START+20+16+16+8+12]] l     O __TEXT,__cstring _str58 59;--- first.s60.cstring61.p2align 262.asciz "get awkward offset"  ; length = 1963 64;--- align.s.template65.cstring66 67.p2align <ALIGN>68  _myotherlongstr:69.asciz "myotherlongstr"      ; length = 1570 71.p2align <ALIGN>72  _otherlongstr:73.asciz   "otherlongstr"      ; length = 13, tail offset = 274 75.p2align <ALIGN>76  _longstr:77.asciz        "longstr"      ; length = 8, tail offset = 778 79.p2align <ALIGN>80  _otherstr:81.asciz       "otherstr"      ; length = 982 83.p2align <ALIGN>84  _str:85.asciz            "str"      ; length = 4, tail offset = 586