You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
820 B
38 lines
820 B
# REQUIRES: x86
|
|
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-win32 %s -o %t1.obj
|
|
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-win32 %S/Inputs/icf-safe.s -o %t2.obj
|
|
# RUN: lld-link /dll /noentry /out:%t.dll /verbose /opt:noref,icf %t1.obj %t2.obj 2>&1 | FileCheck %s
|
|
# RUN: lld-link /dll /noentry /out:%t.dll /verbose /opt:noref,icf /export:g3 /export:g4 %t1.obj %t2.obj 2>&1 | FileCheck --check-prefix=EXPORT %s
|
|
|
|
# CHECK-NOT: Selected
|
|
# CHECK: Selected g3
|
|
# CHECK-NEXT: Removed g4
|
|
# CHECK-NOT: Removed
|
|
# CHECK-NOT: Selected
|
|
|
|
# EXPORT-NOT: Selected
|
|
|
|
.section .rdata,"dr",one_only,g1
|
|
.globl g1
|
|
g1:
|
|
.byte 1
|
|
|
|
.section .rdata,"dr",one_only,g2
|
|
.globl g2
|
|
g2:
|
|
.byte 1
|
|
|
|
.section .rdata,"dr",one_only,g3
|
|
.globl g3
|
|
g3:
|
|
.byte 2
|
|
|
|
.section .rdata,"dr",one_only,g4
|
|
.globl g4
|
|
g4:
|
|
.byte 2
|
|
|
|
.addrsig
|
|
.addrsig_sym g1
|
|
.addrsig_sym g2
|