This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ld.so.1 broken with gcc 3.3.1 on GNU/Hurd


[Sorry for the late reply, busy with school.]

   The PC value suggests some botch relocation or something.  Compare
   the last several instructions in your gdb disassembly there with
   what objdump -rd shows you on ld.so, and on the rtld.os file that
   went into making it.

Alright, here is s the output from objdump on rtld.os, ld.so.1, and
the last few lines from the gdb disassembly.  Not that this it makes
much sense to me...

objdump -rd ld.so.1:

 00001560 <dl_main>:
[...snip...]
     299a:	8b 83 bc 00 00 00    	mov    0xbc(%ebx),%eax
     29a0:	8b 00                	mov    (%eax),%eax
     29a2:	89 45 e8             	mov    %eax,0xffffffe8(%ebp)
     29a5:	8d 45 e8             	lea    0xffffffe8(%ebp),%eax
     29a8:	50                   	push   %eax
     29a9:	8d 8b 18 ba fe ff    	lea    0xfffeba18(%ebx),%ecx
     29af:	8d 55 e4             	lea    0xffffffe4(%ebp),%edx
     29b2:	8d 45 e0             	lea    0xffffffe0(%ebp),%eax
     29b5:	e8 fe 6d 00 00       	call   97b8 <_dl_catch_error>
     29ba:	8b 45 e4             	mov    0xffffffe4(%ebp),%eax
     29bd:	85 c0                	test   %eax,%eax
     29bf:	74 a0                	je     2961 <dl_main+0x1401>
     29c1:	6a 01                	push   $0x1
     29c3:	e8 fc ff ff ff       	call   29c4 <dl_main+0x1464>
     29c8:	58                   	pop    %eax
     29c9:	eb 96                	jmp    2961 <dl_main+0x1401>
     29cb:	8b 41 18             	mov    0x18(%ecx),%eax
     29ce:	89 83 6c f9 ff ff    	mov    %eax,0xfffff96c(%ebx)
     29d4:	e9 68 ff ff ff       	jmp    2941 <dl_main+0x13e1>
     29d9:	8d 76 00             	lea    0x0(%esi),%esi
[end of dl_main]

objdump -rd rtld.os:

 00000570 <dl_main>:
[...snip...]
			1982: R_386_GOTOFF	.LC22
     1986:	0f b7 97 4c 01 00 00 	movzwl 0x14c(%edi),%edx
     198d:	89 47 04             	mov    %eax,0x4(%edi)
     1990:	8b 4d 10             	mov    0x10(%ebp),%ecx
     1993:	8b 87 48 01 00 00    	mov    0x148(%edi),%eax
     1999:	89 55 0c             	mov    %edx,0xc(%ebp)
     199c:	89 01                	mov    %eax,(%ecx)
     199e:	e9 6b ec ff ff       	jmp    60e <dl_main+0x9e>
     19a3:	c7 45 e4 00 00 00 00 	movl   $0x0,0xffffffe4(%ebp)
     19aa:	8b 83 00 00 00 00    	mov    0x0(%ebx),%eax
			19ac: R_386_GOTOFF	_dl_argv_internal
     19b0:	8b 00                	mov    (%eax),%eax
     19b2:	89 45 e8             	mov    %eax,0xffffffe8(%ebp)
     19b5:	8d 45 e8             	lea    0xffffffe8(%ebp),%eax
     19b8:	50                   	push   %eax
     19b9:	8d 8b 8c 04 00 00    	lea    0x48c(%ebx),%ecx
			19bb: R_386_GOTOFF	.text
     19bf:	8d 55 e4             	lea    0xffffffe4(%ebp),%edx
     19c2:	8d 45 e0             	lea    0xffffffe0(%ebp),%eax
     19c5:	e8 fc ff ff ff       	call   19c6 <dl_main+0x1456>
			19c6: R_386_PLT32	_dl_catch_error_internal
     19ca:	8b 45 e4             	mov    0xffffffe4(%ebp),%eax
     19cd:	85 c0                	test   %eax,%eax
     19cf:	74 a0                	je     1971 <dl_main+0x1401>
     19d1:	6a 01                	push   $0x1
     19d3:	e8 fc ff ff ff       	call   19d4 <dl_main+0x1464>
			19d4: R_386_PC32	_exit
     19d8:	58                   	pop    %eax
     19d9:	eb 96                	jmp    1971 <dl_main+0x1401>
     19db:	8b 41 18             	mov    0x18(%ecx),%eax
     19de:	89 83 d0 03 00 00    	mov    %eax,0x3d0(%ebx)
			19e0: R_386_GOTOFF	_rtld_local
     19e4:	e9 68 ff ff ff       	jmp    1951 <dl_main+0x13e1>
     19e9:	8d 76 00             	lea    0x0(%esi),%esi
[end of dl_main]

gdb disassembly of ld.so:

 (gdb) disassemble
 Dump of assembler code for function dl_main:
 0x00002560 <dl_main+0>:	push   %ebp
 0x00002561 <dl_main+1>:	mov    %esp,%ebp
 0x00002563 <dl_main+3>:	push   %edi
 0x00002564 <dl_main+4>:	push   %esi
 0x00002565 <dl_main+5>:	push   %ebx
 0x00002566 <dl_main+6>:	call   0x256b <dl_main+11>
[...snip...]
 0x0000399a <dl_main+5178>:	mov    0xbc(%ebx),%eax
 0x000039a0 <dl_main+5184>:	mov    (%eax),%eax
 0x000039a2 <dl_main+5186>:	mov    %eax,0xffffffe8(%ebp)
 0x000039a5 <dl_main+5189>:	lea    0xffffffe8(%ebp),%eax
 0x000039a8 <dl_main+5192>:	push   %eax
 0x000039a9 <dl_main+5193>:	lea    0xfffeba18(%ebx),%ecx
 0x000039af <dl_main+5199>:	lea    0xffffffe4(%ebp),%edx
 0x000039b2 <dl_main+5202>:	lea    0xffffffe0(%ebp),%eax
 0x000039b5 <dl_main+5205>:	call   0xa7b8 <_dl_catch_error>
 0x000039ba <dl_main+5210>:	mov    0xffffffe4(%ebp),%eax
 0x000039bd <dl_main+5213>:	test   %eax,%eax
 0x000039bf <dl_main+5215>:	je     0x3961 <dl_main+5121>
 0x000039c1 <dl_main+5217>:	push   $0x1
 0x000039c3 <dl_main+5219>:	call   0x39c4 <dl_main+5220>
 0x000039c8 <dl_main+5224>:	pop    %eax
 0x000039c9 <dl_main+5225>:	jmp    0x3961 <dl_main+5121>
 0x000039cb <dl_main+5227>:	mov    0x18(%ecx),%eax
 0x000039ce <dl_main+5230>:	mov    %eax,0xfffff96c(%ebx)
 0x000039d4 <dl_main+5236>:	jmp    0x3941 <dl_main+5089>
 End of assembler dump.

Cheerio.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]