# EXPORT-NEXT: GLOBAL PROTECTED {{.*}} _start
# EXPORT-NEXT: GLOBAL DEFAULT {{.*}} defsym
+## --no-export-dynamic can cancel previous --export-dynamic.
+# RUN: ld.lld --fatal-warnings --defsym=defsym=_start %t.so %t.o -o - --export-dynamic --no-export-dynamic | cmp %t.out -
+
.weak undef_weak
.weak weak_default
## Warn unless the archive is excluded by --warn-backrefs-exclude
# RUN: ld.lld --fatal-warnings %t2.a %t1.o -o /dev/null
# RUN: ld.lld --warn-backrefs %t2.a %t1.o -o /dev/null 2>&1 | FileCheck %s
+# RUN: ld.lld --warn-backrefs --no-warn-backrefs %t2.a %t1.o -o /dev/null 2>&1 | count 0
# RUN: ld.lld --warn-backrefs %t2.a '-(' %t1.o '-)' -o /dev/null 2>&1 | FileCheck %s
# RUN: ld.lld --warn-backrefs --warn-backrefs-exclude='*3.a' %t2.a %t1.o -o /dev/null 2>&1 | FileCheck %s
# RUN: ld.lld --fatal-warnings --warn-backrefs --warn-backrefs-exclude='*2.a(*2.o)' %t2.a %t1.o -o /dev/null