[ELF][test] Add missing tests for --no-export-dynamic & --no-warn-backrefs
authorFangrui Song <i@maskray.me>
Sun, 20 Jun 2021 21:20:14 +0000 (14:20 -0700)
committerFangrui Song <i@maskray.me>
Sun, 20 Jun 2021 21:20:14 +0000 (14:20 -0700)
lld/test/ELF/export-symbols.s
lld/test/ELF/warn-backrefs.s

index 5b59ac5..93c93c9 100644 (file)
@@ -32,6 +32,9 @@
 # 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
index 9a43e97..b34f1d6 100644 (file)
@@ -18,6 +18,7 @@
 ## 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