mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-17 06:46:36 +00:00

Before this, LLD sets OrdinalBase to 0, which deviates from usual practices. This technically would allow LLD to export a symbol using ordinal 0, however LLD never use export ordinal 0, which results in binaries with export tables always having an empty export at ordinal 0. This change makes LLD set OrdinalBase to 1 and not create the empty export with ordinal 0, which makes its behaviour more in line with both the MSVC linker and the GNU linker. Reviewed By: mstorsjo Differential Revision: https://reviews.llvm.org/D134140
20 lines
397 B
ArmAsm
20 lines
397 B
ArmAsm
// REQUIRES: x86
|
|
// RUN: llvm-mc -filetype=obj -triple=i686-win32-gnu %s -o %t.o
|
|
|
|
// RUN: lld-link -lldmingw -dll -out:%t.dll %t.o -noentry -exclude-symbols:sym2,unknownsym -exclude-symbols:unknownsym,sym3
|
|
// RUN: llvm-readobj --coff-exports %t.dll | FileCheck --implicit-check-not=Name: %s
|
|
|
|
// CHECK: Name: sym1
|
|
|
|
.global _sym1
|
|
_sym1:
|
|
ret
|
|
|
|
.global _sym2
|
|
_sym2:
|
|
ret
|
|
|
|
.global _sym3
|
|
_sym3:
|
|
ret
|