+ added "code segment too large" and "data segment too large" error messages

git-svn-id: trunk@30687 -
This commit is contained in:
nickysn 2015-04-20 23:47:22 +00:00
parent 211dbb9752
commit bde7d0aacb
4 changed files with 308 additions and 282 deletions

View File

@ -2753,7 +2753,7 @@ asmr_e_invalid_ref_register=07125_E_Invalid register used in memory reference ex
#
# Assembler/binary writers
#
# 08029 is the last used one
# 08031 is the last used one
#
asmw_f_too_many_asm_files=08000_F_Too many assembler files
% With smartlinking enabled, there are too many assembler
@ -2804,6 +2804,8 @@ asmw_h_changing_bind_type=08028_H_Change of bind type of symbol $1 from $2 to $3
% of wrong code generation, but currently set to Note level as it appears inside
% the compiler compilation.
asmw_e_32bit_not_supported=08029_E_Asm: 32 Bit references not supported
asmw_f_code_segment_too_large=08030_F_Code segment too large
asmw_f_data_segment_too_large=08031_F_Data segment too large
#
# Executing linker/assembler
#

View File

@ -824,6 +824,8 @@ const
asmw_w_changing_bind_type=08027;
asmw_h_changing_bind_type=08028;
asmw_e_32bit_not_supported=08029;
asmw_f_code_segment_too_large=08030;
asmw_f_data_segment_too_large=08031;
exec_w_source_os_redefined=09000;
exec_i_assembling_pipe=09001;
exec_d_cant_create_asmfile=09002;
@ -1008,9 +1010,9 @@ const
option_info=11024;
option_help_pages=11025;
MsgTxtSize = 75342;
MsgTxtSize = 75404;
MsgIdxMax : array[1..20] of longint=(
26,99,341,124,96,58,126,30,202,64,
26,99,341,124,96,58,126,32,202,64,
58,20,1,1,1,1,1,1,1,1
);

File diff suppressed because it is too large Load Diff

View File

@ -226,6 +226,7 @@ interface
FSecOptions : TObjSectionOptions;
FCachedFullName : pshortstring;
procedure SetSecOptions(Aoptions:TObjSectionOptions);
procedure SectionTooLargeError;
public
ObjData : TObjData;
index : longword; { index of section in section headers }
@ -848,6 +849,15 @@ implementation
end;
procedure TObjSection.SectionTooLargeError;
begin
if oso_executable in SecOptions then
Message(asmw_f_code_segment_too_large)
else
Message(asmw_f_data_segment_too_large);
end;
function TObjSection.write(const d;l:aword):aword;
begin
result:=size;
@ -855,6 +865,10 @@ implementation
begin
if Size<>Data.size then
internalerror(200602281);
{$ifndef cpu64bitalu}
if (qword(size)+l)>high(size) then
SectionTooLargeError;
{$endif}
Data.write(d,l);
inc(Size,l);
end
@ -928,6 +942,10 @@ implementation
procedure TObjSection.alloc(l:aword);
begin
{$ifndef cpu64bitalu}
if (qword(size)+l)>high(size) then
SectionTooLargeError;
{$endif}
inc(size,l);
end;