mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-28 18:43:13 +01:00
Do not add a second underscore to naked functions on Windows.
This leads to missing symbols during linking on Windows x64. If this changes breaks other Windows platforms then we have to analyze the triple instead of global.params.os.
This commit is contained in:
@@ -162,11 +162,10 @@ void DtoDefineNakedFunction(FuncDeclaration* fd)
|
||||
{
|
||||
std::string def = "def";
|
||||
std::string endef = "endef";
|
||||
asmstr << "\t." << def << "\t_" << mangle << ";";
|
||||
asmstr << "\t." << def << "\t" << mangle << ";";
|
||||
// hard code these two numbers for now since gas ignores .scl and llvm
|
||||
// is defaulting to .type 32 for everything I have seen
|
||||
asmstr << "\t.scl 2; .type 32;\t" << "." << endef << std::endl;
|
||||
asmstr << "_";
|
||||
} else
|
||||
{
|
||||
asmstr << "\t." << linkage << "\t" << mangle << std::endl;
|
||||
|
||||
Reference in New Issue
Block a user