llvm-project/lld/test/elf/as-needed.test

16 lines
754 B
Plaintext

RUN: lld -flavor gnu -target x86_64-linux %p/Inputs/use-shared.x86-64 \
RUN: --as-needed %p/Inputs/shared.so-x86-64 %p/Inputs/libifunc.x86-64.so \
RUN: -o %t1 -e main --allow-shlib-undefined
RUN: llvm-readobj -dynamic-table %t1 | FileCheck %s -check-prefix AS_NEEDED
AS_NEEDED: NEEDED SharedLibrary (shared.so-x86-64)
AS_NEEDED-NOT: NEEDED SharedLibrary (libifunc.x86-64.so)
RUN: lld -flavor gnu -target x86_64-linux %p/Inputs/use-shared.x86-64 \
RUN: %p/Inputs/shared.so-x86-64 %p/Inputs/libifunc.x86-64.so \
RUN: -o %t2 -e main --allow-shlib-undefined
RUN: llvm-readobj -dynamic-table %t2 | FileCheck %s -check-prefix NO_AS_NEEDED
NO_AS_NEEDED: NEEDED SharedLibrary (shared.so-x86-64)
NO_AS_NEEDED: NEEDED SharedLibrary (libifunc.x86-64.so)