brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · 8395dfb Raw
36 lines · plain
1# REQUIRES: x862# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %s -o %t.o3 4# RUN: %lld %t.o -lSystem -o %t.out5# RUN: llvm-readobj --syms %t.out | FileCheck %s6 7## ld64 has a "TEMP work around until <rdar://problem/7702923> goes in"8## that promotes PrivateExtern ReferencedDynamically symbols in dylibs to9## normal Externs. lld does not do this.10# RUN: %lld -dylib %t.o -o %t.dylib11# RUN: llvm-readobj --syms %t.dylib | FileCheck %s12 13# CHECK:         Name: ___crashreporter_info__14# CHECK-NEXT:    PrivateExtern15# CHECK-NEXT:    Type: Section (0xE)16# CHECK-NEXT:    Section: __common17# CHECK-NEXT:    RefType: UndefinedNonLazy (0x0)18# CHECK-NEXT:    Flags [ (0x10)19# CHECK-NEXT:      ReferencedDynamically (0x10)20# CHECK-NEXT:    ]21 22## Reduced from lib/Support/PrettyStackTrace.cpp23.section __TEXT,__text,regular,pure_instructions24 25.globl _main26_main:27  ret28 29## .private_extern matches what PrettyStackTrace.cpp does, but it makes30## the ReferencedDynamically pointless: https://reviews.llvm.org/D27683#276372931.private_extern ___crashreporter_info__32.globl ___crashreporter_info__33.desc ___crashreporter_info__,1634.zerofill __DATA,__common,___crashreporter_info__,8,335.subsections_via_symbols36