mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-16 18:39:19 +02:00
* set the bss, rodata and rodata_norel section alignment to 2 bytes for the i8086-msdos target
git-svn-id: trunk@30680 -
This commit is contained in:
parent
ae04eb258b
commit
5a1ce6162b
@ -329,9 +329,10 @@ implementation
|
||||
result:=1;
|
||||
sec_code:
|
||||
result:=1;
|
||||
sec_data,
|
||||
sec_rodata,
|
||||
sec_rodata_norel,
|
||||
sec_bss:
|
||||
result:=1;
|
||||
sec_data:
|
||||
result:=2;
|
||||
{ For idata (at least idata2) it must be 4 bytes, because
|
||||
an entry is always (also in win64) 20 bytes and aligning
|
||||
|
@ -1081,11 +1081,11 @@ interface
|
||||
AsmWriteLn('SECTION ' + CodeSectionName(current_module.modulename^) + ' use16 class=code');
|
||||
{ NASM complains if you put a missing section in the GROUP directive, so }
|
||||
{ we add empty declarations to make sure they exist, even if empty }
|
||||
AsmWriteLn('SECTION .rodata class=data');
|
||||
AsmWriteLn('SECTION .data class=data');
|
||||
AsmWriteLn('SECTION .rodata class=data align=2');
|
||||
AsmWriteLn('SECTION .data class=data align=2');
|
||||
AsmWriteLn('SECTION .fpc class=data');
|
||||
{ WLINK requires class=bss in order to leave the BSS section out of the executable }
|
||||
AsmWriteLn('SECTION .bss class=bss');
|
||||
AsmWriteLn('SECTION .bss class=bss align=2');
|
||||
if (current_settings.x86memorymodel<>mm_tiny) and
|
||||
(current_settings.x86memorymodel in x86_near_data_models) then
|
||||
AsmWriteLn('SECTION stack stack class=stack align=16');
|
||||
|
@ -489,7 +489,7 @@ FPC_CHECK_NULLAREA:
|
||||
%endif
|
||||
%endif
|
||||
|
||||
segment data class=data
|
||||
segment data class=data align=2
|
||||
%ifdef __NEAR_DATA__
|
||||
mem_realloc_err_msg:
|
||||
db 'Memory allocation error', 13, 10, '$'
|
||||
@ -500,7 +500,7 @@ not_enough_mem_msg:
|
||||
; module, containing the heap segment doesn't get smartlinked away
|
||||
dd ___heap
|
||||
|
||||
segment bss class=bss
|
||||
segment bss class=bss align=2
|
||||
|
||||
%ifndef __TINY__
|
||||
segment _NULL align=16 class=BEGDATA
|
||||
|
Loading…
Reference in New Issue
Block a user