delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1999/11/22/05:24:10

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT sourceware DOT cygnus DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT sourceware DOT cygnus DOT com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sourceware DOT cygnus DOT com>
List-Help: <mailto:cygwin-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs>
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
Message-Id: <199911221031.LAA30416@cerbere.u-strasbg.fr>
X-Sender: muller AT ics DOT u-strasbg DOT fr
X-Mailer: QUALCOMM Windows Eudora Pro Version 4.0.2
Date: Mon, 22 Nov 1999 11:25:05 +0100
To: cygwin AT sourceware DOT cygnus DOT com
From: Pierre Muller <muller AT cerbere DOT u-strasbg DOT fr>
Subject: Problems with Stabs in DLLs
Mime-Version: 1.0

   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 AT ics DOT u-strasbg DOT 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 AT sourceware DOT cygnus DOT com

- Raw text -


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