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: questions regarding m68k/ColdFire dynamic/shared code


>|> The two instructions:
>|> 
>|>     lea _GLOBAL_OFFSET_TABLE_@GOTPC, %a5
>|>     lea -6(%pc,%a5), %a5
>|> 
>|> is equivalent to:
>|> 
>|>     lea _GLOBAL_OFFSET_TABLE_OFFSET_@GOTPC(%pc),%a5
>
>You're right.  But your dl_start_user does not contain anything like this.

Yup, I fat-fingered my change.  I've updateded it and it now looks like:

000048c2 <_dl_start_user>:
    48c2:	4bf9 0001 1e2c 	lea 11e2c <__getdents+0xb8>,%a5
    48c8:	4bfb d8fa      	lea %pc@(48c4 <_dl_start_user+0x2>,%a5:l),%a5
    48cc:	286d 0028      	moveal %a5@(40),%a4
    48d0:	288f           	movel %sp,%a4@
    48d2:	2840           	moveal %d0,%a4
    48d4:	226d 0074      	moveal %a5@(116),%a1
    48d8:	2015           	movel %a5@,%d0
    48da:	221f           	movel %sp@+,%d1
    48dc:	9280           	subl %d0,%d1
    48de:	4ff7 0c00      	lea %sp@(00000000,%d0:l:4),%sp
    48e2:	2f01           	movel %d1,%sp@-
    48e4:	4877 1c08      	pea %sp@(00000008,%d1:l:4)
    48e8:	486f 0008      	pea %sp@(8)
    48ec:	2f01           	movel %d1,%sp@-
    48ee:	266d 00e8      	moveal %a5@(232),%a3
    48f2:	2f13           	movel %a3@,%sp@-
    48f4:	61ff ffff ffae 	bsrl 48a4 <GLIBC_2.0+0x48a4>
    48fa:	508f           	addql #8,%sp
    48fc:	508f           	addql #8,%sp
    48fe:	226d 0050      	moveal %a5@(80),%a1
    4902:	2c4f           	moveal %sp,%fp
    4904:	4ed4           	jmp %a4@

I'm makink the assumption in insns 0x48ee and 0x48f2 that %a3 doesn't
contain anything useful at the point that _dl_start_user is executed...

>|> But again, back to my question, is ld.so supposed to modify its own
>|> .text segment? 
>
>No, never.
>

Ok, so ld.so should only change entries in the GOT and PLT, right?

Thanx.

-- 
Peter Barada                                   Peter.Barada@motorola.com
Wizard                                         781-852-2768 (direct)
WaveMark Solutions(wholly owned by Motorola)   781-270-0193 (fax)


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