mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 03:02:36 +01:00
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
9d01e3d349
commit
1cd17d17bc
BIN
test/tools/llvm-readobj/Inputs/library.lib
Executable file
BIN
test/tools/llvm-readobj/Inputs/library.lib
Executable file
Binary file not shown.
22
test/tools/llvm-readobj/coff-exports-implib.test
Normal file
22
test/tools/llvm-readobj/coff-exports-implib.test
Normal file
@ -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
Block a user