forked from OSchip/llvm-project
llvm-readobj: handle import libraries with -coff-exports
`link -dump -exports` lists exported symbols from import libraries as well as normal dlls. Ensure that we can handle import libraries as well in llvm-readobj. llvm-svn: 279069
This commit is contained in:
parent
7d37b221a2
commit
3780b3a9eb
Binary file not shown.
|
@ -0,0 +1,22 @@
|
|||
RUN: llvm-readobj -coff-exports %p/Inputs/library.lib | FileCheck %s
|
||||
|
||||
CHECK: File: library.dll
|
||||
CHECK: Format: COFF-import-file
|
||||
CHECK: Type: const
|
||||
CHECK: Symbol: __imp__constant
|
||||
|
||||
CHECK: File: library.dll
|
||||
CHECK: Format: COFF-import-file
|
||||
CHECK: Type: data
|
||||
CHECK: Symbol: __imp__data
|
||||
|
||||
CHECK: File: library.dll
|
||||
CHECK: Format: COFF-import-file
|
||||
CHECK: Type: code
|
||||
CHECK: Symbol: __imp__function
|
||||
|
||||
CHECK: File: library.dll
|
||||
CHECK: Format: COFF-import-file
|
||||
CHECK: Type: code
|
||||
CHECK: Symbol: __imp__ordinal
|
||||
|
|
@ -460,6 +460,8 @@ static void dumpArchive(const Archive *Arc) {
|
|||
}
|
||||
if (ObjectFile *Obj = dyn_cast<ObjectFile>(&*ChildOrErr.get()))
|
||||
dumpObject(Obj);
|
||||
else if (COFFImportFile *Imp = dyn_cast<COFFImportFile>(&*ChildOrErr.get()))
|
||||
dumpCOFFImportFile(Imp);
|
||||
else
|
||||
reportError(Arc->getFileName(), readobj_error::unrecognized_file_format);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue