mips4/32-el BFD breakage

Pjotr Kourzanov peter.kourzanov@philips.com
Mon Mar 7 19:02:00 GMT 2005


Daniel, et al,

OK, here are the diffs and the test application.

1. diff0 is for the shared library itself (libhello.so). I've
   stripped all differences for 40000 symbols. They are pretty much
   the same (offsets differ by 16)

2. diff1 is for the application (a.out)

Will get back to this problem tomorrow,

Pjotr Kourzanov
   
>On Mon, Mar 07, 2005 at 11:30:06AM -0500, Daniel Jacobowitz wrote:
>> Your patch is definitely incorrect.  If the indirect symbol needs a PLT
>> entry, then the defined symbol will need a PLT entry also.
>
>  Most likely, I was also quite surprised that it fixed anything.
>However, it really does fix it. That change made on 2003-11-17 really
>makes the difference (2003.11.18.05.37.00-2003.11.17.05.37.00),
>for binutils-2.14.90. I checked the code in binutils-2.15 and HEAD,
>they both seem to do the same thing, albeit in another way. And
>the patch actually improves both branches...
>
>  However, I know the problem is elsewhere, that's the reason I
>posted it here;-)
>
>> 
>> You've attached a patch against HEAD; however, did you verify that the
>> actual problem occured on HEAD?  Some multi-GOT bugs have been fixed
>
>  The HEAD code that I used was from about a week ago. I just checked
>the BFD version 2.15.95 20050307 from the HEAD and it fails on the 
>target with:
>
>-bash-3.00# ./a.out 
>Call functions in big shared library
>Segmentation fault
>-bash-3.00# 
>
>  The same versions compiled without need_plt work correctly:
>
>-bash-3.00# ./a.out 
>Call functions in big shared library
>Calling hello_0...hello_0
>Calling hello_999...hello_999
>Calling hello_39999...hello_39999
>-bash-3.00#
>
>> since binutils 2.15.  Also, can you explain why you made this
>> particular change and what affect it had on your binary?
>
>  Well, I guess the reason is to get large applications working 
>without having to resort to static linkage.
>
>  The huge shared library is slightly larger without the fix (this
>is to be expected, since some symbols are not copied). I am now 
>running objdump on both of them. Stay tuned...
>
>> 
>> -- 
>> Daniel Jacobowitz
>> CodeSourcery, LLC
>> 
>
>Pjotr Kourzanov
-------------- next part --------------
A non-text attachment was scrubbed...
Name: shlib-hello-test.tgz
Type: application/x-gtar
Size: 744 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20050307/682e421a/attachment.gtar>
-------------- next part --------------
6c6
< 	279c39d0 	addiu	gp,gp,14800
---
> 	279c39c0 	addiu	gp,gp,14784
23c23
< 	279c398c 	addiu	gp,gp,14732
---
> 	279c397c 	addiu	gp,gp,14716
35c35
< 	279c395c 	addiu	gp,gp,14684
---
> 	279c394c 	addiu	gp,gp,14668
51c51
< 	279c3920 	addiu	gp,gp,14624
---
> 	279c3910 	addiu	gp,gp,14608
72c72
< 	279c38d0 	addiu	gp,gp,14544
---
> 	279c38c0 	addiu	gp,gp,14528
78c78
< 	244255c0 	addiu	v0,v0,21952
---
> 	244255b0 	addiu	v0,v0,21936
97c97
< 	244254a4 	addiu	v0,v0,21668
---
> 	24425494 	addiu	v0,v0,21652
106c106
< 	242154a4 	addiu	at,at,21668
---
> 	24215494 	addiu	at,at,21652
115c115
< 	244254a4 	addiu	v0,v0,21668
---
> 	24425494 	addiu	v0,v0,21652
128c128
< 	24845480 	addiu	a0,a0,21632
---
> 	24845470 	addiu	a0,a0,21616
136c136
< 	242155c0 	addiu	at,at,21952
---
> 	242155b0 	addiu	at,at,21936
144c144
< 	279c37b4 	addiu	gp,gp,14260
---
> 	279c37a4 	addiu	gp,gp,14244
152c152
< 	24845480 	addiu	a0,a0,21632
---
> 	24845470 	addiu	a0,a0,21616
155c155
< 	24a555c4 	addiu	a1,a1,21956
---
> 	24a555b4 	addiu	a1,a1,21940
165c165
< 	24425494 	addiu	v0,v0,21652
---
> 	24425484 	addiu	v0,v0,21636
173c173
< 	24845494 	addiu	a0,a0,21652
---
> 	24845484 	addiu	a0,a0,21636
186c186
< 	279c3710 	addiu	gp,gp,14096
---
> 	279c3700 	addiu	gp,gp,14080
192c192
< 	248401a0 	addiu	a0,a0,416
---
> 	24840190 	addiu	a0,a0,400
206c206
< 	279c36c4 	addiu	gp,gp,14020
---
> 	279c36b4 	addiu	gp,gp,14004
212c212
< 	248401a8 	addiu	a0,a0,424
---
> 	24840198 	addiu	a0,a0,408
226c226
< 	279c3678 	addiu	gp,gp,13944
---
> 	279c3668 	addiu	gp,gp,13928
232c232
< 	248401b0 	addiu	a0,a0,432
---
> 	248401a0 	addiu	a0,a0,416
246c246
< 	279c362c 	addiu	gp,gp,13868
---
> 	279c361c 	addiu	gp,gp,13852
252c252
< 	248401b8 	addiu	a0,a0,440
---
> 	248401a8 	addiu	a0,a0,424
266c266
< 	279c35e0 	addiu	gp,gp,13792
---
> 	279c35d0 	addiu	gp,gp,13776
............................................
............................................
............................................
............................................
............................................
800106c800106
< 	279cd540 	addiu	gp,gp,-10944
---
> 	279cd530 	addiu	gp,gp,-10960
800112c800112
< 	24845448 	addiu	a0,a0,21576
---
> 	24845438 	addiu	a0,a0,21560
800126c800126
< 	279cd4f4 	addiu	gp,gp,-11020
---
> 	279cd4e4 	addiu	gp,gp,-11036
800132c800132
< 	24845454 	addiu	a0,a0,21588
---
> 	24845444 	addiu	a0,a0,21572
800146c800146
< 	279cd4a8 	addiu	gp,gp,-11096
---
> 	279cd498 	addiu	gp,gp,-11112
800152c800152
< 	24845460 	addiu	a0,a0,21600
---
> 	24845450 	addiu	a0,a0,21584
800166c800166
< 	279cd45c 	addiu	gp,gp,-11172
---
> 	279cd44c 	addiu	gp,gp,-11188
800172c800172
< 	2484546c 	addiu	a0,a0,21612
---
> 	2484545c 	addiu	a0,a0,21596
800186c800186
< 	279cd410 	addiu	gp,gp,-11248
---
> 	279cd400 	addiu	gp,gp,-11264
800192c800192
< 	24635488 	addiu	v1,v1,21640
---
> 	24635478 	addiu	v1,v1,21624
800200c800200
< 	26105484 	addiu	s0,s0,21636
---
> 	26105474 	addiu	s0,s0,21620
800223,800226d800222
< 	8f998010 	lw	t9,-32752(gp)
< 	03e07821 	move	t7,ra
< 	0320f809 	jalr	t9
< 	24189c5d 	li	t8,-25507
800228c800224
< 00450140 <_fini>
---
> 00450130 <_fini>
800237c800233
< 	04110001 	bal	450164 <_fini+0x24>
---
> 	04110001 	bal	450154 <_fini+0x24>
-------------- next part --------------
146c146
< 	24840e40 	addiu	a0,a0,3648
---
> 	24840e20 	addiu	a0,a0,3616
170c170
< 	24840e40 	addiu	a0,a0,3648
---
> 	24840e20 	addiu	a0,a0,3616
214c214
< 	24840dd0 	addiu	a0,a0,3536
---
> 	24840db0 	addiu	a0,a0,3504
223c223
< 	24840df8 	addiu	a0,a0,3576
---
> 	24840dd8 	addiu	a0,a0,3544
238c238
< 	24840e0c 	addiu	a0,a0,3596
---
> 	24840dec 	addiu	a0,a0,3564
253c253
< 	24840e24 	addiu	a0,a0,3620
---
> 	24840e04 	addiu	a0,a0,3588
403,410d402
< 	24180015 	li	t8,21
< 	8f998010 	lw	t9,-32752(gp)
< 	03e07821 	move	t7,ra
< 	0320f809 	jalr	t9
< 	24180013 	li	t8,19
< 	8f998010 	lw	t9,-32752(gp)
< 	03e07821 	move	t7,ra
< 	0320f809 	jalr	t9
413c405
< 00400d60 <_fini>
---
> 00400d40 <_fini>
416c408
< 	279c72e0 	addiu	gp,gp,29408
---
> 	279c7300 	addiu	gp,gp,29440
422c414
< 	04110001 	bal	400d84 <_fini+0x24>
---
> 	04110001 	bal	400d64 <_fini+0x24>
425c417
< 	279c72bc 	addiu	gp,gp,29372
---
> 	279c72dc 	addiu	gp,gp,29404


More information about the Binutils mailing list