llvm.org GIT mirror llvm / 195f8d2
Merging r356982: ------------------------------------------------------------------------ r356982 | mstorsjo | 2019-03-26 02:02:44 -0700 (Tue, 26 Mar 2019) | 12 lines [llvm-dlltool] Set a proper machine type for weak symbol object files This makes GNU binutils not reject the libraries outright. GNU ld handles weak externals slightly differently though, so it can't use them for aliases in import libraries, but this makes GNU ld able to use the rest of the import libraries. LLD accepted object files with machine type 0 aka IMAGE_FILE_MACHINE_UNKNOWN. Differential Revision: https://reviews.llvm.org/D59742 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_80@360750 91177308-0d34-0410-b5e6-96231b3b80d8 Tom Stellard 3 months ago
2 changed file(s) with 4 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
495495
496496 // COFF Header
497497 coff_file_header Header{
498 u16(0),
498 u16(Machine),
499499 u16(NumberOfSections),
500500 u32(0),
501501 u32(sizeof(Header) + (NumberOfSections * sizeof(coff_section))),
0 ; RUN: llvm-dlltool -m i386:x86-64 --input-def %s --output-lib %t.a
11 ; RUN: llvm-nm %t.a | FileCheck %s
2 ; RUN: llvm-readobj %t.a | FileCheck -check-prefix=ARCH %s
23
34 LIBRARY test.dll
45 EXPORTS
2526 ; CHECK-NEXT: W __imp_ImpLibName2
2627 ; CHECK: T ImpLibName3
2728 ; CHECK-NEXT: T __imp_ImpLibName3
29
30 ; ARCH-NOT: unknown arch