Avoid allocating for our linkdef names (#2111)

This reverts a change introduced in fd78a9ae8, though it wasn't that commit's main point
so I'm feeling okay with undoing that.

This feels like an overkill change, using a static string is good enough for this
since we never modify this. I have considered using `string_view` instead, to have
the best of both worlds, but that's not NUL-terminated so our print functions
get a little grumpy.
This commit is contained in:
ISSOtm
2026-09-17 13:58:30 -04:00
committed by Rangi
parent 0b9f8ab523
commit f234796428
8 changed files with 31 additions and 38 deletions
+2 -2
View File
@@ -865,7 +865,7 @@ void sdobj_ReadFile(FileStackNode const &src, FILE *file, std::vector<Symbol> &f
"\"%s\" is implicitly defined as a %s section (being at address $%04" PRIx16
"), but it has data! (Was a bad `__at()` value used?)",
section->name.c_str(),
section->typeInfo().name.c_str(),
section->typeInfo().name,
section->org
);
}
@@ -875,7 +875,7 @@ void sdobj_ReadFile(FileStackNode const &src, FILE *file, std::vector<Symbol> &f
"\"%s\" is implicitly defined as a %s section (being at address $%04" PRIx16
"), but it doesn't have any data! (Was a bad `__at()` value used?)",
section->name.c_str(),
section->typeInfo().name.c_str(),
section->typeInfo().name,
section->org
);
}