File: fold-dwarf-lsda.s

package info (click to toggle)
swiftlang 6.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,519,992 kB
  • sloc: cpp: 9,107,863; ansic: 2,040,022; asm: 1,135,751; python: 296,500; objc: 82,456; f90: 60,502; lisp: 34,951; pascal: 19,946; sh: 18,133; perl: 7,482; ml: 4,937; javascript: 4,117; makefile: 3,840; awk: 3,535; xml: 914; fortran: 619; cs: 573; ruby: 573
file content (86 lines) | stat: -rw-r--r-- 2,579 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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# REQUIRES: x86
## Regression test for https://github.com/llvm/llvm-project/issues/63039

## Use an old version to ensure we do *not* have any compact-unwind.
# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-macos9 %s -o %t.o

## Pre-cond: smoke-check that there is really no compact-unwind entries - only dwarfs.
# RUN: llvm-objdump --macho --unwind-info --dwarf=frames %t.o | FileCheck %s --check-prefix=PRE
# PRE-NOT: Contents of __compact_unwind section:
# PRE-NOT: Entry at offset
# PRE: .eh_frame contents:
# PRE: {{[0-9a-f]+}} {{.*}} CIE
# PRE:   Format:                DWARF32
# PRE:   Version:               1

## Link should succeed (ie., not crashed due to bug in icf code).
# RUN: %lld -lSystem -lc++ --icf=all -arch x86_64 -arch x86_64 -platform_version macos 11.0 11.0 %t.o -o %t.out

## Post-cond: verify that the final binary has expected eh-frame contents.
# RUN: llvm-objdump --macho --syms --dwarf=frames %t.out | FileCheck %s --check-prefix=POST
# POST-LABEL: SYMBOL TABLE:
# POST: [[#%x,EXCEPT_ADDR:]] l   O __TEXT,__gcc_except_tab GCC_except_table0
# POST: [[#%x,EXCEPT_ADDR]]  l   O __TEXT,__gcc_except_tab GCC_except_table1
# POST: [[#%.16x,F0_ADDR:]]  g   F __TEXT,__text _f0
# POST: [[#%.16x,F1_ADDR:]]  g   F __TEXT,__text _f1
# POST: [[#%.16x,G_ADDR:]]   g   F __TEXT,__text _g

# POST-LABEL: .eh_frame contents:
# POST: {{.*}} FDE cie={{.+}} pc=[[#%x,G_ADDR]]...{{.+}}

# POST: {{.*}} FDE cie={{.+}} pc=[[#%x,F0_ADDR]]...{{.+}}
# POST: Format:       DWARF32 
# POST: LSDA Address: [[#%.16x,EXCEPT_ADDR]]

# POST: {{.*}} FDE cie={{.+}} pc=[[#%x,F1_ADDR]]...{{.+}}
# POST Format:       DWARF32 
# POST LSDA Address: [[#%.16x,EXCEPT_ADDR]]

	.section        __TEXT,__text,regular,pure_instructions
	.globl	_f0
_f0:
	.cfi_startproc
	.cfi_lsda 16, Lexception0
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	callq	_g
	retq
	.cfi_endproc
	
	.section	__TEXT,__gcc_except_tab
GCC_except_table0:
Lexception0:
	.byte	255
                                
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_f1
_f1:
	.cfi_startproc
	.cfi_lsda 16, Lexception1
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	callq	_g
	retq
	.cfi_endproc
	
	.section	__TEXT,__gcc_except_tab
GCC_except_table1:
Lexception1:
	.byte	255

	.section	__TEXT,__text,regular,pure_instructions
	.globl	_g
_g:               
	.cfi_startproc
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	.cfi_def_cfa_register %rbp	
	retq
	.cfi_endproc
	
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_main             
_main:                            
	retq

.subsections_via_symbols