Subject: strange relocations in dll => crash
From: [email-masked] ("Philippe GIACINTI")

28 Jul 1997 06:41:51 -0700
Approved: [email-masked]
Distribution: cygnus
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Face: ^cJc2\tiS@#Ja@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: [email-masked]
Original-Sender: [email-masked]

[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:  [email-masked]      |
| 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
"[email-masked]" with one line of text: "help".