brintos

brintos / llvm-project-archived public Read only

0
0
Text · 10.0 KiB · 7cf75fa Raw
211 lines · plain
1# REQUIRES: aarch642# RUN: llvm-mc -filetype=obj -triple=arm64-apple-macos %s -o %t.o3# RUN: not %lld -arch arm64 %t.o -o /dev/null 2>&1 | FileCheck %s4 5# CHECK: undefined symbol: _undef6# CHECK-NEXT: >>> referenced by test.c:37# CHECK-NEXT: >>>               {{.*}}.o:(symbol _main+0x0)8# CHECK-NEXT: >>> referenced by test.c:29# CHECK-NEXT  >>>               {{.*}}.o:(symbol _ptr+0x0)10 11## This is the output of `clang -g2 -O2 -fdebug-compilation-dir=. -fno-ident` called on the following file, with the12## Apple DWARF tables removed:13##14## int undef();15## int (*ptr)() = &undef;16## int main() { return undef(); };17 18 19	.section	__TEXT,__text,regular,pure_instructions20	.build_version macos, 12, 0	sdk_version 13, 021	.file	1 "." "test.c"22	.globl	_main                           ; -- Begin function main23	.p2align	224_main:                                  ; @main25Lfunc_begin0:26	.loc	1 3 0                           ; test.c:3:027	.cfi_startproc28; %bb.0:29	.loc	1 3 21 prologue_end             ; test.c:3:2130	b	_undef31Ltmp0:32Lfunc_end0:33	.cfi_endproc34                                        ; -- End function35	.section	__DATA,__data36	.globl	_ptr                            ; @ptr37	.p2align	338_ptr:39	.quad	_undef40 41	.section	__DWARF,__debug_abbrev,regular,debug42Lsection_abbrev:43	.byte	1                               ; Abbreviation Code44	.byte	17                              ; DW_TAG_compile_unit45	.byte	1                               ; DW_CHILDREN_yes46	.byte	37                              ; DW_AT_producer47	.byte	14                              ; DW_FORM_strp48	.byte	19                              ; DW_AT_language49	.byte	5                               ; DW_FORM_data250	.byte	3                               ; DW_AT_name51	.byte	14                              ; DW_FORM_strp52	.ascii	"\202|"                         ; DW_AT_LLVM_sysroot53	.byte	14                              ; DW_FORM_strp54	.ascii	"\357\177"                      ; DW_AT_APPLE_sdk55	.byte	14                              ; DW_FORM_strp56	.byte	16                              ; DW_AT_stmt_list57	.byte	23                              ; DW_FORM_sec_offset58	.byte	27                              ; DW_AT_comp_dir59	.byte	14                              ; DW_FORM_strp60	.ascii	"\341\177"                      ; DW_AT_APPLE_optimized61	.byte	25                              ; DW_FORM_flag_present62	.byte	17                              ; DW_AT_low_pc63	.byte	1                               ; DW_FORM_addr64	.byte	18                              ; DW_AT_high_pc65	.byte	6                               ; DW_FORM_data466	.byte	0                               ; EOM(1)67	.byte	0                               ; EOM(2)68	.byte	2                               ; Abbreviation Code69	.byte	52                              ; DW_TAG_variable70	.byte	0                               ; DW_CHILDREN_no71	.byte	3                               ; DW_AT_name72	.byte	14                              ; DW_FORM_strp73	.byte	73                              ; DW_AT_type74	.byte	19                              ; DW_FORM_ref475	.byte	63                              ; DW_AT_external76	.byte	25                              ; DW_FORM_flag_present77	.byte	58                              ; DW_AT_decl_file78	.byte	11                              ; DW_FORM_data179	.byte	59                              ; DW_AT_decl_line80	.byte	11                              ; DW_FORM_data181	.byte	2                               ; DW_AT_location82	.byte	24                              ; DW_FORM_exprloc83	.byte	0                               ; EOM(1)84	.byte	0                               ; EOM(2)85	.byte	3                               ; Abbreviation Code86	.byte	15                              ; DW_TAG_pointer_type87	.byte	0                               ; DW_CHILDREN_no88	.byte	73                              ; DW_AT_type89	.byte	19                              ; DW_FORM_ref490	.byte	0                               ; EOM(1)91	.byte	0                               ; EOM(2)92	.byte	4                               ; Abbreviation Code93	.byte	21                              ; DW_TAG_subroutine_type94	.byte	1                               ; DW_CHILDREN_yes95	.byte	73                              ; DW_AT_type96	.byte	19                              ; DW_FORM_ref497	.byte	0                               ; EOM(1)98	.byte	0                               ; EOM(2)99	.byte	5                               ; Abbreviation Code100	.byte	24                              ; DW_TAG_unspecified_parameters101	.byte	0                               ; DW_CHILDREN_no102	.byte	0                               ; EOM(1)103	.byte	0                               ; EOM(2)104	.byte	6                               ; Abbreviation Code105	.byte	36                              ; DW_TAG_base_type106	.byte	0                               ; DW_CHILDREN_no107	.byte	3                               ; DW_AT_name108	.byte	14                              ; DW_FORM_strp109	.byte	62                              ; DW_AT_encoding110	.byte	11                              ; DW_FORM_data1111	.byte	11                              ; DW_AT_byte_size112	.byte	11                              ; DW_FORM_data1113	.byte	0                               ; EOM(1)114	.byte	0                               ; EOM(2)115	.byte	7                               ; Abbreviation Code116	.byte	46                              ; DW_TAG_subprogram117	.byte	0                               ; DW_CHILDREN_no118	.byte	17                              ; DW_AT_low_pc119	.byte	1                               ; DW_FORM_addr120	.byte	18                              ; DW_AT_high_pc121	.byte	6                               ; DW_FORM_data4122	.ascii	"\347\177"                      ; DW_AT_APPLE_omit_frame_ptr123	.byte	25                              ; DW_FORM_flag_present124	.byte	64                              ; DW_AT_frame_base125	.byte	24                              ; DW_FORM_exprloc126	.byte	3                               ; DW_AT_name127	.byte	14                              ; DW_FORM_strp128	.byte	58                              ; DW_AT_decl_file129	.byte	11                              ; DW_FORM_data1130	.byte	59                              ; DW_AT_decl_line131	.byte	11                              ; DW_FORM_data1132	.byte	73                              ; DW_AT_type133	.byte	19                              ; DW_FORM_ref4134	.byte	63                              ; DW_AT_external135	.byte	25                              ; DW_FORM_flag_present136	.ascii	"\341\177"                      ; DW_AT_APPLE_optimized137	.byte	25                              ; DW_FORM_flag_present138	.byte	0                               ; EOM(1)139	.byte	0                               ; EOM(2)140	.byte	0                               ; EOM(3)141	.section	__DWARF,__debug_info,regular,debug142Lsection_info:143Lcu_begin0:144.set Lset0, Ldebug_info_end0-Ldebug_info_start0 ; Length of Unit145	.long	Lset0146Ldebug_info_start0:147	.short	4                               ; DWARF version number148.set Lset1, Lsection_abbrev-Lsection_abbrev ; Offset Into Abbrev. Section149	.long	Lset1150	.byte	8                               ; Address Size (in bytes)151	.byte	1                               ; Abbrev [1] 0xb:0x69 DW_TAG_compile_unit152	.long	0                               ; DW_AT_producer153	.short	12                              ; DW_AT_language154	.long	1                               ; DW_AT_name155	.long	8                               ; DW_AT_LLVM_sysroot156	.long	60                              ; DW_AT_APPLE_sdk157.set Lset2, Lline_table_start0-Lsection_line ; DW_AT_stmt_list158	.long	Lset2159	.long	71                              ; DW_AT_comp_dir160                                        ; DW_AT_APPLE_optimized161	.quad	Lfunc_begin0                    ; DW_AT_low_pc162.set Lset3, Lfunc_end0-Lfunc_begin0     ; DW_AT_high_pc163	.long	Lset3164	.byte	2                               ; Abbrev [2] 0x32:0x15 DW_TAG_variable165	.long	73                              ; DW_AT_name166	.long	71                              ; DW_AT_type167                                        ; DW_AT_external168	.byte	1                               ; DW_AT_decl_file169	.byte	2                               ; DW_AT_decl_line170	.byte	9                               ; DW_AT_location171	.byte	3172	.quad	_ptr173	.byte	3                               ; Abbrev [3] 0x47:0x5 DW_TAG_pointer_type174	.long	76                              ; DW_AT_type175	.byte	4                               ; Abbrev [4] 0x4c:0x7 DW_TAG_subroutine_type176	.long	83                              ; DW_AT_type177	.byte	5                               ; Abbrev [5] 0x51:0x1 DW_TAG_unspecified_parameters178	.byte	0                               ; End Of Children Mark179	.byte	6                               ; Abbrev [6] 0x53:0x7 DW_TAG_base_type180	.long	77                              ; DW_AT_name181	.byte	5                               ; DW_AT_encoding182	.byte	4                               ; DW_AT_byte_size183	.byte	7                               ; Abbrev [7] 0x5a:0x19 DW_TAG_subprogram184	.quad	Lfunc_begin0                    ; DW_AT_low_pc185.set Lset4, Lfunc_end0-Lfunc_begin0     ; DW_AT_high_pc186	.long	Lset4187                                        ; DW_AT_APPLE_omit_frame_ptr188	.byte	1                               ; DW_AT_frame_base189	.byte	111190	.long	81                              ; DW_AT_name191	.byte	1                               ; DW_AT_decl_file192	.byte	3                               ; DW_AT_decl_line193	.long	83                              ; DW_AT_type194                                        ; DW_AT_external195                                        ; DW_AT_APPLE_optimized196	.byte	0                               ; End Of Children Mark197Ldebug_info_end0:198	.section	__DWARF,__debug_str,regular,debug199Linfo_string:200	.byte	0                               ; string offset=0201	.asciz	"test.c"                        ; string offset=1202	.asciz	"/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk" ; string offset=8203	.asciz	"MacOSX.sdk"                    ; string offset=60204	.asciz	"."                             ; string offset=71205	.asciz	"ptr"                           ; string offset=73206	.asciz	"int"                           ; string offset=77207	.asciz	"main"                          ; string offset=81208	.section	__DWARF,__debug_line,regular,debug209Lsection_line:210Lline_table_start0:211