From f88a74e44ad7c5659b4ef26732504365dff0a12e Mon Sep 17 00:00:00 2001 From: vsariola Date: Tue, 5 Jan 2021 19:36:42 +0200 Subject: [PATCH] fix(compiler): fix bss section macros on linux --- compiler/x86_macros.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/compiler/x86_macros.go b/compiler/x86_macros.go index 5f30d56..32acc8d 100644 --- a/compiler/x86_macros.go +++ b/compiler/x86_macros.go @@ -210,7 +210,7 @@ func (p *X86Macros) SectData(name string) string { if !p.DisableSections { return fmt.Sprintf("section .data.%v progbits alloc noexec write align=1", name) } - return "section .data. progbits alloc exec nowrite align=1" + return "section .data progbits alloc exec nowrite align=1" } } @@ -219,13 +219,12 @@ func (p *X86Macros) SectBss(name string) string { if p.OS == "windows" && !p.DisableSections { return fmt.Sprintf("section .%v bss align=256", name) } - return "section .bss align=256" } else { if !p.DisableSections { - return fmt.Sprintf("section .bss.%v progbits alloc noexec write align=256", name) + return fmt.Sprintf("section .bss.%v nobits alloc noexec write align=256", name) } - return "section .bss. progbits alloc exec nowrite align=256" } + return "section .bss align=256" } func (p *X86Macros) Data(label string) string {