From 217b761c9b57019bbd2072d2c73cbb3400997b76 Mon Sep 17 00:00:00 2001 From: Nikita Smith Date: Thu, 16 Apr 2026 16:43:04 -0700 Subject: [PATCH] build GSI and PSI before DBI --- src/linker/pdb_ext/pdb_builder.c | 6 +++--- src/torture/torture_radlink.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/linker/pdb_ext/pdb_builder.c b/src/linker/pdb_ext/pdb_builder.c index 782fb53c..56cb02c5 100644 --- a/src/linker/pdb_ext/pdb_builder.c +++ b/src/linker/pdb_ext/pdb_builder.c @@ -3150,9 +3150,6 @@ pdb_build(TP_Context *tp, TP_Arena *pool_temp, PDB_Context *pdb, CV_StringHashTa pdb_type_server_build(tp, ipi, strtab, pdb->msf, PDB_FixedStream_Ipi); } - dbi_build(tp, pdb->dbi, pdb->msf, PDB_FixedStream_Dbi, string_ht, is_stripped); - pdb_info_build(pdb->info, pdb->msf, PDB_FixedStream_Info); - if (build_gsi) { if (dbi->globals_sn == MSF_INVALID_STREAM_NUMBER) { dbi->globals_sn = msf_stream_alloc(pdb->msf); @@ -3167,6 +3164,9 @@ pdb_build(TP_Context *tp, TP_Arena *pool_temp, PDB_Context *pdb, CV_StringHashTa gsi_build(tp, pdb->gsi, pdb->msf, dbi->globals_sn, dbi->symbols_sn); } + dbi_build(tp, pdb->dbi, pdb->msf, PDB_FixedStream_Dbi, string_ht, is_stripped); + pdb_info_build(pdb->info, pdb->msf, PDB_FixedStream_Info); + ProfEnd(); } diff --git a/src/torture/torture_radlink.c b/src/torture/torture_radlink.c index 9ff94e09..107aeb25 100644 --- a/src/torture/torture_radlink.c +++ b/src/torture/torture_radlink.c @@ -4670,9 +4670,9 @@ TEST(validate_info_stream) 0x6f, 0x00, 0x74, 0x68, 0x72, 0x65, 0x65, 0x00, 0x66, 0x6f, 0x75, 0x72, 0x00, 0x66, 0x69, 0x76, 0x65, 0x00, 0x2f, 0x4c, 0x69, 0x6e, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xb7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x13, - 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x51, 0x33, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x51, 0x33, 0x01 }; T_Ok(str8_match(info_data, str8_array_fixed(expected_info_data), 0));