Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , 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 Subject: Problems with Stabs in DLLs Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" 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