mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-14 16:19:35 +02:00
* elf section alignment, patch by Florian, mantis #32900
M ogelf.pas git-svn-id: trunk@38251 -
This commit is contained in:
parent
14b14f3bda
commit
9a136836fd
@ -1260,7 +1260,7 @@ implementation
|
||||
{ section data }
|
||||
layoutsections(datapos);
|
||||
{ section headers }
|
||||
shoffset:=datapos;
|
||||
shoffset:=align(datapos,dword(Sizeof(AInt)));
|
||||
inc(datapos,(nsections+1)*sizeof(telfsechdr));
|
||||
|
||||
{ Write ELF Header }
|
||||
@ -1298,6 +1298,9 @@ implementation
|
||||
writer.writezeros($40-sizeof(header)); { align }
|
||||
{ Sections }
|
||||
WriteSectionContent(data);
|
||||
|
||||
{ Align header }
|
||||
Writer.Writezeros(Align(Writer.Size,Sizeof(AInt))-Writer.Size);
|
||||
{ section headers, start with an empty header for sh_undef }
|
||||
writer.writezeros(sizeof(telfsechdr));
|
||||
ObjSectionList.ForEachCall(@section_write_sechdr,nil);
|
||||
|
Loading…
Reference in New Issue
Block a user