delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1999/07/07/12:07:06

Date: Wed, 7 Jul 1999 17:06:48 +0100
From: cmatraki AT ee DOT ucl DOT ac DOT uk (Chris Matrakidis)
Message-Id: <199907071606.RAA01200@melchard.ee.ucl.ac.uk>
To: djgpp-workers AT delorie DOT com
Subject: Re: .align directives in libc.a
X-Sun-Charset: US-ASCII
Reply-To: djgpp-workers AT delorie DOT com

 
> > The binutils I have compiled with 32 byte alignment of sections can be found
> > at http://www.ee.ucl.ac.uk/~cmatraki/binutils-291.zip if anyone wants to try
> > them out.
> 
> Perhaps you could post here, or on your Web page, the diffs against the 
> Binutils distribution of the changes that you made.  The diffs will 
> probably much smaller than the entire distribution ;-), and I think many 
> people here already have the Binutils 2.9.1 sources somwhere.
> 

It seems that the last version I compiled (the one on the web page) only alignes
to 16 bytes. Here is the patch I used:

*** bfd/coff-i386.c%	Wed Apr 28 19:26:14 1999
--- bfd/coff-i386.c	Wed Apr 28 19:26:14 1999
***************
*** 45,51 ****
  
  	   bfd_vma *));
  
! #define COFF_DEFAULT_SECTION_ALIGNMENT_POWER (2)
  /* The page size is a guess based on ELF.  */
  
  #define COFF_PAGE_SIZE 0x1000
--- 45,51 ----
  
  	   bfd_vma *));
  
! #define COFF_DEFAULT_SECTION_ALIGNMENT_POWER (4)
  /* The page size is a guess based on ELF.  */
  
  #define COFF_PAGE_SIZE 0x1000

However, I think this would be more appropriate (untested):

*** bfd/coff-go32.c%	Fri May  1 16:48:04 1998
--- bfd/coff-go32.c	Wed Jul  7 17:02:14 1999
***************
*** 22,25 ****
--- 22,27 ----
  #define TARGET_NAME		"coff-go32"
  #define TARGET_UNDERSCORE	'_'
  
+ #define COFF_DEFAULT_SECTION_ALIGNMENT_POWER (4)
+ 
  #include "coff-i386.c"
*** bfd/coff-i386.c%	Wed Apr 28 19:26:14 1999
--- bfd/coff-i386.c	Wed Jul  7 16:58:58 1999
***************
*** 44,51 ****
  	   struct coff_link_hash_entry *, struct internal_syment *,
  
  	   bfd_vma *));
! 
! #define COFF_DEFAULT_SECTION_ALIGNMENT_POWER (2)
  /* The page size is a guess based on ELF.  */
  
  #define COFF_PAGE_SIZE 0x1000
--- 44,53 ----
  	   struct coff_link_hash_entry *, struct internal_syment *,
  
  	   bfd_vma *));
! 	   
! #ifndef COFF_DEFAULT_SECTION_ALIGNMENT_POWER
! #define COFF_DEFAULT_SECTION_ALIGNMENT_POWER (4)
! #endif
  /* The page size is a guess based on ELF.  */
  
  #define COFF_PAGE_SIZE 0x1000

- Raw text -


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