diff --git a/public/sourcepawn/sp_file_headers.h b/public/sourcepawn/sp_file_headers.h
index eb0bab53..0b4be064 100644
--- a/public/sourcepawn/sp_file_headers.h
+++ b/public/sourcepawn/sp_file_headers.h
@@ -134,6 +134,15 @@ typedef struct sp_file_pubvars_s
uint32_t name; /**< Index into nametable */
} sp_file_pubvars_t;
+/**
+ * @brief File-encoded tag info.
+ */
+typedef struct sp_file_tag_s
+{
+ uint32_t tag_id; /**< Tag ID from compiler */
+ uint32_t name; /**< Index into nametable */
+} sp_file_tag_t;
+
#if defined __linux__
#pragma pack() /* reset default packing */
#else
diff --git a/sourcepawn/compiler/msvc8/spcomp.vcproj b/sourcepawn/compiler/msvc8/spcomp.vcproj
index af32cd24..8d1fa240 100644
--- a/sourcepawn/compiler/msvc8/spcomp.vcproj
+++ b/sourcepawn/compiler/msvc8/spcomp.vcproj
@@ -305,7 +305,7 @@
>
pubvars - hdr->libraries) / hdr->defsize;
- if (sections[FS_Libraries])
+ sections[FS_Tags] = (hdr->nametable - hdr->tags) / hdr->defsize;
+ if (sections[FS_Tags])
{
- spfw_add_section(spf, ".libraries");
+ spfw_add_section(spf, ".tags");
}
spfw_add_section(spf, ".names");
@@ -260,6 +260,22 @@ int main(int argc, char *argv[])
spfw_next_section(spf);
}
+ if (sections[FS_Tags])
+ {
+ uint32_t numTags = (uint32_t)sections[FS_Tags];
+ AMX_FUNCSTUBNT *stub;
+ sp_file_tag_t tag;
+
+ for (i=0; itags + (i * hdr->defsize));
+ tag.tag_id = stub->address;
+ tag.name = stub->nameofs - (hdr->nametable + sizeof(uint16_t));
+ sfwrite(&tag, sizeof(sp_file_tag_t), 1, spf);
+ }
+ spfw_next_section(spf);
+ }
+
if (sections[FS_Nametable])
{
unsigned char *base;