summaryrefslogtreecommitdiff
path: root/compiler/aggas.pas
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/aggas.pas')
-rw-r--r--compiler/aggas.pas17
1 files changed, 14 insertions, 3 deletions
diff --git a/compiler/aggas.pas b/compiler/aggas.pas
index 2a882abf6f..52acf3b03f 100644
--- a/compiler/aggas.pas
+++ b/compiler/aggas.pas
@@ -843,7 +843,8 @@ implementation
asmwrite(ReplaceForbiddenAsmSymbolChars(tai_datablock(hp).sym.name));
asmwrite(',');
asmwrite(tostr(tai_datablock(hp).size)+',');
- asmwrite('_data.bss_');
+ asmwrite('_data.bss_,');
+ asmwriteln(tostr(last_align));
end;
end
else
@@ -1243,6 +1244,11 @@ implementation
end;
if tai_label(hp).labsym.bind in [AB_GLOBAL,AB_PRIVATE_EXTERN] then
begin
+{$ifdef arm}
+ { do no change arm mode accidently, .globl seems to reset the mode }
+ if GenerateThumbCode or GenerateThumb2Code then
+ AsmWriteln(#9'.thumb_func'#9);
+{$endif arm}
AsmWrite('.globl'#9);
if replaceforbidden then
AsmWriteLn(ReplaceForbiddenAsmSymbolChars(tai_label(hp).labsym.name))
@@ -1446,7 +1452,12 @@ implementation
begin
WriteDirectiveName(tai_directive(hp).directive);
if tai_directive(hp).name <>'' then
- AsmWrite(tai_directive(hp).name);
+ begin
+ if replaceforbidden then
+ AsmWrite(ReplaceForbiddenAsmSymbolChars(tai_directive(hp).name))
+ else
+ AsmWrite(tai_directive(hp).name);
+ end;
AsmLn;
end;
@@ -1712,7 +1723,7 @@ implementation
{ "no executable stack" marker }
{ TODO: used by OpenBSD/NetBSD as well? }
- if (target_info.system in (systems_linux + systems_android + systems_freebsd)) and
+ if (target_info.system in (systems_linux + systems_android + systems_freebsd + systems_dragonfly)) and
not(cs_executable_stack in current_settings.moduleswitches) then
begin
AsmWriteLn('.section .note.GNU-stack,"",%progbits');