public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Problems with STABS debugging info in relocatable DLLs
@ 1999-11-25  6:59 Pierre Muller
  0 siblings, 0 replies; only message in thread
From: Pierre Muller @ 1999-11-25  6:59 UTC (permalink / raw)
  To: binutils

  I sent this message first to cygwin mailing list
but Mumit Kahn suggested this as beeing a better destination list.


   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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1999-11-25  6:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-11-25  6:59 Problems with STABS debugging info in relocatable DLLs 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).