blob: bcebfbac2f2463a2095cac8c019e4b9c7925d478 [file] [log] [blame]
RUN: lld -flavor old-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 old-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)