public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [patch] djgpp dwarf2 fix
@ 2001-08-21 10:55 Mark E.
  2001-08-21 13:23 ` DJ Delorie
  0 siblings, 1 reply; 4+ messages in thread
From: Mark E. @ 2001-08-21 10:55 UTC (permalink / raw)
  To: binutils

Hi guys,
I ran into another problem with using dwarf2 with djgpp. The section alignment for the dwarf2 
debug sections must be set to 0 or gdb will think .debug_info is bigger than it really is and 
then complain.

2001-08-21  Mark Elbrecht  <snowball3@bigfoot.com>

	* coff-go32.c: Make DWARF2 sections use an alignment of 0.
	* coff-sto32.c: Likewise.

Index: coff-go32.c
===================================================================
RCS file: /cvs/src/src/bfd/coff-go32.c,v
retrieving revision 1.7
diff -c -p -r1.7 coff-go32.c
*** coff-go32.c	2001/03/08 21:03:57	1.7
--- coff-go32.c	2001/08/21 17:41:50
*************** Foundation, Inc., 59 Temple Place - Suit
*** 36,41 ****
  { COFF_SECTION_NAME_PARTIAL_MATCH (".gnu.linkonce.t"), \
    COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \
  { COFF_SECTION_NAME_PARTIAL_MATCH (".gnu.linkonce.r"), \
!   COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }
  
  #include "coff-i386.c"
--- 36,43 ----
  { COFF_SECTION_NAME_PARTIAL_MATCH (".gnu.linkonce.t"), \
    COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \
  { COFF_SECTION_NAME_PARTIAL_MATCH (".gnu.linkonce.r"), \
!   COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \
! { COFF_SECTION_NAME_PARTIAL_MATCH (".debug"), \
!   COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 0 }
  
  #include "coff-i386.c"
Index: coff-stgo32.c
===================================================================
RCS file: /cvs/src/src/bfd/coff-stgo32.c,v
retrieving revision 1.8
diff -c -p -r1.8 coff-stgo32.c
*** coff-stgo32.c	2001/01/25 21:08:10	1.8
--- coff-stgo32.c	2001/08/21 17:42:02
***************
*** 47,53 ****
  { COFF_SECTION_NAME_EXACT_MATCH (".data"), \
    COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \
  { COFF_SECTION_NAME_EXACT_MATCH (".text"), \
!   COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }
  
  #include "bfd.h"
  
--- 47,55 ----
  { COFF_SECTION_NAME_EXACT_MATCH (".data"), \
    COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \
  { COFF_SECTION_NAME_EXACT_MATCH (".text"), \
!   COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \
! { COFF_SECTION_NAME_PARTIAL_MATCH (".debug"), \
!   COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 0 }
  
  #include "bfd.h"
  

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [patch] djgpp dwarf2 fix
  2001-08-21 10:55 [patch] djgpp dwarf2 fix Mark E.
@ 2001-08-21 13:23 ` DJ Delorie
  2001-08-21 14:27   ` Mark E.
  0 siblings, 1 reply; 4+ messages in thread
From: DJ Delorie @ 2001-08-21 13:23 UTC (permalink / raw)
  To: snowball3; +Cc: binutils

> 2001-08-21  Mark Elbrecht  <snowball3@bigfoot.com>
> 
> 	* coff-go32.c: Make DWARF2 sections use an alignment of 0.
> 	* coff-sto32.c: Likewise.

Applied.  Thanks!

I noticed that coff-stgo32.c is missing some of the entries that
coff-go32.c has.  Does it need to be updated to include them?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [patch] djgpp dwarf2 fix
  2001-08-21 13:23 ` DJ Delorie
@ 2001-08-21 14:27   ` Mark E.
  2001-08-21 15:39     ` DJ Delorie
  0 siblings, 1 reply; 4+ messages in thread
From: Mark E. @ 2001-08-21 14:27 UTC (permalink / raw)
  To: binutils

> I noticed that coff-stgo32.c is missing some of the entries that
> coff-go32.c has.  Does it need to be updated to include them?

It makes no difference in the final executable. Those .gnu.linkonce sections 
end up in either .data or .text sections (with the exception of the dwarf2 
linkonce sections) so they'll be aligned correctly in the executable. So it 
won't hurt to add them.

Now that you bring it up, dwarf2 linkonce sections from gcc3 also need an 
alignment of 0. Sorry for forgetting about them.

2001-08-21  Mark Elbrecht  <snowball3@bigfoot.com>

	* coff-go32.c: Set the alignment of dwarf2 linkonce sections to 0.
	* coff-stgo32.c: Likewise.

Index: coff-go32.c
===================================================================
RCS file: /cvs/src/src/bfd/coff-go32.c,v
retrieving revision 1.8
diff -c -p -r1.8 coff-go32.c
*** coff-go32.c	2001/08/21 20:23:38	1.8
--- coff-go32.c	2001/08/21 21:24:28
*************** Foundation, Inc., 59 Temple Place - Suit
*** 38,43 ****
--- 38,45 ----
  { COFF_SECTION_NAME_PARTIAL_MATCH (".gnu.linkonce.r"), \
    COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \
  { COFF_SECTION_NAME_PARTIAL_MATCH (".debug"), \
+   COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 0 }, \
+ { COFF_SECTION_NAME_PARTIAL_MATCH (".gnu.linkonce.wi"), \
    COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 0 }
  
  #include "coff-i386.c"
Index: coff-stgo32.c
===================================================================
RCS file: /cvs/src/src/bfd/coff-stgo32.c,v
retrieving revision 1.9
diff -c -p -r1.9 coff-stgo32.c
*** coff-stgo32.c	2001/08/21 20:23:38	1.9
--- coff-stgo32.c	2001/08/21 21:24:44
***************
*** 49,54 ****
--- 49,56 ----
  { COFF_SECTION_NAME_EXACT_MATCH (".text"), \
    COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \
  { COFF_SECTION_NAME_PARTIAL_MATCH (".debug"), \
+   COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 0 } \
+ { COFF_SECTION_NAME_PARTIAL_MATCH (".gnu.linkonce.wi"), \
    COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 0 }
  
  #include "bfd.h"

Mark

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [patch] djgpp dwarf2 fix
  2001-08-21 14:27   ` Mark E.
@ 2001-08-21 15:39     ` DJ Delorie
  0 siblings, 0 replies; 4+ messages in thread
From: DJ Delorie @ 2001-08-21 15:39 UTC (permalink / raw)
  To: snowball3; +Cc: binutils

S'Ok.  Applied, thanks.

> Now that you bring it up, dwarf2 linkonce sections from gcc3 also need an 
> alignment of 0. Sorry for forgetting about them.
> 
> 2001-08-21  Mark Elbrecht  <snowball3@bigfoot.com>
> 
> 	* coff-go32.c: Set the alignment of dwarf2 linkonce sections to 0.
> 	* coff-stgo32.c: Likewise.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2001-08-21 15:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-21 10:55 [patch] djgpp dwarf2 fix Mark E.
2001-08-21 13:23 ` DJ Delorie
2001-08-21 14:27   ` Mark E.
2001-08-21 15:39     ` DJ Delorie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).