delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1997/07/28/06:41:51

From: giac AT dalim DOT de ("Philippe GIACINTI")
Subject: strange relocations in dll => crash
28 Jul 1997 06:41:51 -0700 :
Approved: cygnus DOT gnu-win32 AT cygnus DOT com
Distribution: cygnus
Message-ID: <9707281155.ZM16170.cygnus.gnu-win32@pion.kehl.dalim.de>
Mime-Version: 1.0
X-Face: ^cJc2\tiS@#Ja AT 7laz+N]T)kL{-Kay)Oz"?}p[wuY#}}dO"enP!QVO{,}&4P2V[hEfJD]9&
E1ou~|tY/|9d&7c,7yf>7n: Zj8FD(LtPXWHzy^OJIDi/~O~R]3x/5}"7P;|,*%f:3Z!>h8Ff/&)g?/
}$RXQ
X-Mailer: Z-Mail (3.2.3 08feb96 MediaMail)
Original-To: gnu-win32 AT cygnus DOT com
Original-Sender: owner-gnu-win32 AT cygnus DOT com

[b18 on NT4.0SP3, cross on SGI Irix 6.2]


Hi,

I have a very strange problem when I try to make a relocatable dll.

I use the following procedure, all objects are compiled with debug (ie contains
..stab & .stabstr sections):

	ld $(LDFLAGS) --dll -e $(%entry) -o tmp.dll --base-file base $(%obj)
	dlltool --dllname $@ --base-file base --output-exp tmp.exp --def
dll.def
	ld $(LDFLAGS) --dll -e $(%entry) -o $@ tmp.exp $(%obj)


-1) Some relocations appear for sections .stab & .idata($3) ???

-2) After the 2nd link the export section (.edata) is inserted before the
import section (.idata). The vma's are changed but the relocations generated by
the first pass aren't updated => the relocations are applyed in the wrong
sections.

----> Workaround: add another pass ( dlltool ... & link )

	I think the problem comes from the first remark (relocations for .stab
& .idata) but I'm really not an expert, I tried to see with debugger what's
going on but the code of linker remains obscure for me.

Any kind of help will be welcome ...

Best regards.

-- 

 ==========================================================================
|                         Philippe GIACINTI                                |
|                                                                          |
| DALiM GmbH R&D                                email:  giac AT dalim DOT de      |
| Daimler Strasse 2,                            tel:    +49.7851.9196-28   |
| D-77694 Kehl-Sundheim Germany                 fax:    +49.7851.73576	   |
|                                                                          |
 ==========================================================================
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


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