public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Problems with Stabs in DLLs
@ 1999-11-22  2:23 Pierre Muller
  1999-11-30 23:39 ` Pierre Muller
  0 siblings, 1 reply; 2+ messages in thread
From: Pierre Muller @ 1999-11-22  2:23 UTC (permalink / raw)
  To: cygwin

   I have a problem with the default cygwin linker script:

  the .reloc section is put before the .stab section,
but if you compile a DLL using -gstabs
there are entries in the .stab section which need relocation.

  The problem is that these entries are wrong calculated because 
as the .reloc section will be inserted just before the .stab section
you finally "relocate" values inside the .reloc section itself !!!

  I think this is a bug !
  The problem is that it only shows up if you load a DLL at a base address
different from the default base address.

  Solution to the above problem :

  There are in my opinion only two solutions to the above problem :

 1) Put .stab section  before .reloc section in the linker scripts
This needs to remove the NOLOAD attribute of course
and thus leads to bigger memory use, but don't forget that
all that is just ment for debugging purposes !!

  2) Change the .stab output so it uses .rva symbol references
which would avoid the relocation problem.
  But this would mean that we need to change GDB stabs loading mecanism 
(at well as other things like the commercial Cygwin Debugger !)

  I would like to hear comments about my problem!

PS : Don't tell I should use another debugging format,
because I am using and developping  FPC
(Free Pascal Compiler) that uses Cygwin tool to create Win32 executable.
And FPC only supports stabs debugging format
(I wrote the corresponding code !)


Pierre Muller
Institut Charles Sadron
6,rue Boussingault
F 67083 STRASBOURG CEDEX (France)
mailto:muller@ics.u-strasbg.fr
Phone : (33)-3-88-41-40-07  Fax : (33)-3-88-41-40-99

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

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

* Problems with Stabs in DLLs
  1999-11-22  2:23 Problems with Stabs in DLLs Pierre Muller
@ 1999-11-30 23:39 ` Pierre Muller
  0 siblings, 0 replies; 2+ messages in thread
From: Pierre Muller @ 1999-11-30 23:39 UTC (permalink / raw)
  To: cygwin

   I have a problem with the default cygwin linker script:

  the .reloc section is put before the .stab section,
but if you compile a DLL using -gstabs
there are entries in the .stab section which need relocation.

  The problem is that these entries are wrong calculated because 
as the .reloc section will be inserted just before the .stab section
you finally "relocate" values inside the .reloc section itself !!!

  I think this is a bug !
  The problem is that it only shows up if you load a DLL at a base address
different from the default base address.

  Solution to the above problem :

  There are in my opinion only two solutions to the above problem :

 1) Put .stab section  before .reloc section in the linker scripts
This needs to remove the NOLOAD attribute of course
and thus leads to bigger memory use, but don't forget that
all that is just ment for debugging purposes !!

  2) Change the .stab output so it uses .rva symbol references
which would avoid the relocation problem.
  But this would mean that we need to change GDB stabs loading mecanism 
(at well as other things like the commercial Cygwin Debugger !)

  I would like to hear comments about my problem!

PS : Don't tell I should use another debugging format,
because I am using and developping  FPC
(Free Pascal Compiler) that uses Cygwin tool to create Win32 executable.
And FPC only supports stabs debugging format
(I wrote the corresponding code !)


Pierre Muller
Institut Charles Sadron
6,rue Boussingault
F 67083 STRASBOURG CEDEX (France)
mailto:muller@ics.u-strasbg.fr
Phone : (33)-3-88-41-40-07  Fax : (33)-3-88-41-40-99

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

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

end of thread, other threads:[~1999-11-30 23:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-11-22  2:23 Problems with Stabs in DLLs Pierre Muller
1999-11-30 23:39 ` Pierre Muller

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).