delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/05/04/06:01:32

From: "Jack K." <xos AT o2 DOT pl>
Newsgroups: comp.os.msdos.djgpp
Subject: Again: data alignment
Date: Fri, 4 May 2001 10:27:26 +0200
Organization: tp.internet - http://www.tpi.pl
Lines: 31
Message-ID: <9ctq54$nks$1@news.tpi.pl>
NNTP-Posting-Host: pe84.gdansk.cvx.ppp.tpnet.pl
X-Trace: news.tpi.pl 988965860 24220 213.76.28.84 (4 May 2001 08:44:20 GMT)
X-Complaints-To: usenet AT tpi DOT pl
NNTP-Posting-Date: 4 May 2001 08:44:20 GMT
X-Newsreader: Microsoft Outlook Express 5.50.4133.2400
X-MSMail-Priority: Normal
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

I have a table:

unsigned int pgdir[1024];

It is put by compiler in .bss section. This table should be page
(4096-bytes) aligned.

This is my linker script:

OUTPUT_FORMAT("coff-go32")
SECTIONS
{
  .main 0x100000:
  {
    *(.header)
    *(.data)
    *(.text)
  }
  .bss ALIGN(4096):
  {
    *(.bss)
  }
}

How should I define the alignment?






- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019