push a null symbol as a terminator for /alternatename weak symbol chain

This commit is contained in:
Nikita Smith
2025-08-17 16:10:13 -07:00
committed by Nikita Smith
parent 04d2877b40
commit a3582332ee
2 changed files with 5 additions and 1 deletions
+4 -1
View File
@@ -462,7 +462,10 @@ lnk_make_null_obj(Arena *arena)
{
COFF_ObjWriter *obj_writer = coff_obj_writer_alloc(0,COFF_MachineType_Unknown);
// make import stub
// push null symbol
coff_obj_writer_push_symbol_abs(obj_writer, str8_lit(LNK_NULL_SYMBOL), 0, COFF_SymStorageClass_External);
// push import stub
{
COFF_ObjSymbol *tag = coff_obj_writer_push_symbol_abs(obj_writer, str8_lit("RAD_IMPORT_STUB_NULL"), 0, COFF_SymStorageClass_Static);
coff_obj_writer_push_symbol_weak(obj_writer, str8_lit(LNK_IMPORT_STUB), COFF_WeakExt_AntiDependency, tag);
+1
View File
@@ -6,6 +6,7 @@
// --- Link --------------------------------------------------------------------
#define LNK_IMPORT_STUB "*** RAD_IMPORT_STUB ***"
#define LNK_NULL_SYMBOL "*** RAD_NULL_SYMBOL ***"
#define LNK_SECTION_FLAG_IS_LIVE (1 << 0)
typedef struct LNK_LinkContext