Skip to content

Commit

Permalink
[ELF,test] Improve "non-exported symbol" tests
Browse files Browse the repository at this point in the history
Test that the error is not triggered when we see the non-exported
definition first (#86777).
  • Loading branch information
MaskRay committed Mar 30, 2024
1 parent e9e4ab8 commit 09403a6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lld/test/ELF/allow-shlib-undefined.s
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,14 @@

## Test some cases when a relocatable object file provides a non-exported definition.
# RUN: not ld.lld main.o a.so def-hidden.o -o /dev/null 2>&1 | FileCheck %s --check-prefix=NONEXPORTED
## TODO
# RUN: ld.lld main.o def-hidden.o a.so -o /dev/null
# RUN: not ld.lld main.o a.so def-hidden.o -shared --no-allow-shlib-undefined -o /dev/null 2>&1 | FileCheck %s --check-prefix=NONEXPORTED
# RUN: ld.lld main.o a.so def-hidden.o --allow-shlib-undefined --fatal-warnings -o /dev/null
## Test a relocatable object file definition that is converted to STB_LOCAL.
# RUN: not ld.lld main.o a.so def-hidden.o --version-script=local.ver -o /dev/null 2>&1 | FileCheck %s --check-prefix=NONEXPORTED
## TODO
# RUN: ld.lld main.o def-hidden.o a.so --version-script=local.ver -o /dev/null

## The section containing the definition is discarded, and we report an error.
# RUN: not ld.lld --gc-sections main.o a.so def-hidden.o -o /dev/null 2>&1 | FileCheck %s
Expand Down

0 comments on commit 09403a6

Please sign in to comment.