Files
clang-p2996/llvm/test/tools/llvm-readobj/XCOFF/needed-libs.test
Esme-Yi b21ed75e10 [llvm-readobj][XCOFF] Add support for --needed-libs option.
Summary: This patch is trying to add support for llvm-readobj
--needed-libs option under XCOFF.
For XCOFF, the needed libraries can be found from the Import
File ID Name Table of the Loader Section.
Currently, I am using binary inputs in the test since yaml2obj
does not yet support for writing the Loader Section and the
import file table.

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D106643
2021-08-26 07:17:06 +00:00

30 lines
796 B
Plaintext

## In this test we check the --needed-libs option.
# RUN: llvm-readobj --needed-libs %p/Inputs/needed-libs-32.o \
# RUN: %p/Inputs/needed-libs-64.o %p/Inputs/needed-libs-empty.o |\
# RUN: FileCheck %s --strict-whitespace --match-full-lines
## Check 32-bit.
# CHECK:NeededLibraries [
# CHECK-NEXT: BASE MEMBER
# CHECK-NEXT: libc.a shr.o
# CHECK-NEXT: libpthreads.a shr_xpg5.o
# CHECK-NEXT: libabcdefghijk.a
# CHECK-NEXT:]
## Check 64-bit.
# CHECK:NeededLibraries [
# CHECK-NEXT: BASE MEMBER
# CHECK-NEXT: libc.a shr_64.o
# CHECK-NEXT: libpthreads.a shr_xpg5_64.o
# CHECK-NEXT: libabcdefghijk64.a
# CHECK-NEXT:]
## Check no lib.
# CHECK:NeededLibraries [
# CHECK-NEXT: BASE MEMBER
# CHECK-NEXT:]