Date: Fri, 6 Apr 2007 10:05:05 GMT From: Oleksandr Tymoshenko <gonzo@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 117491 for review Message-ID: <200704061005.l36A55v1085780@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=117491 Change 117491 by gonzo@gonzo_jeeves on 2007/04/06 10:04:04 o Convert commets to C style. as stopped to recognize comments with # Affected files ... .. //depot/projects/mips2/src/libexec/rtld-elf/mips/rtld_start.S#3 edit Differences ... ==== //depot/projects/mips2/src/libexec/rtld-elf/mips/rtld_start.S#3 (text+ko) ==== @@ -38,39 +38,39 @@ .set noreorder .cpload t9 - addu sp, sp, -12 # adjust stack pointer - .cprestore 0 # -> 0(sp) for gp - # -> 4(sp) for atexit - # -> 8(sp) for obj_main - move s0,a0 # save stack pointer from a0 - move s1,a3 # save ps_strings pointer + addu sp, sp, -12 /* adjust stack pointer */ + .cprestore 0 /* -> 0(sp) for gp */ + /* -> 4(sp) for atexit */ + /* -> 8(sp) for obj_main */ + move s0,a0 /* save stack pointer from a0 */ + move s1,a3 /* save ps_strings pointer */ la a1, 1f bal 1f nop -1: subu a1, ra, a1 # relocbase +1: subu a1, ra, a1 /* relocbase */ la t9,_C_LABEL(_rtld_relocate_nonplt_self) move s2,a1 la a0,_DYNAMIC addu t9, a1, t9 jalr t9 - addu a0, a1, a0 # &_DYNAMIC + addu a0, a1, a0 /* &_DYNAMIC */ - addu a0, sp, 12 # sp - addu a1, sp, 4 # &exit_proc - addu a2, sp, 8 # &objp - addu sp, sp, -16 # arguments slot - jal _C_LABEL(_rtld) # v0 = _rtld(sp, exit_proc, objp) + addu a0, sp, 12 /* sp */ + addu a1, sp, 4 /* &exit_proc */ + addu a2, sp, 8 /* &objp */ + addu sp, sp, -16 /* arguments slot */ + jal _C_LABEL(_rtld) /* v0 = _rtld(sp, exit_proc, objp) */ nop - addu sp, sp, 16 # + addu sp, sp, 16 - lw a0, 4(sp) # our atexit function - lw a1, 8(sp) # obj_main entry - addu sp, sp,12 # readjust stack + lw a0, 4(sp) /* our atexit function */ + lw a1, 8(sp) /* obj_main entry */ + addu sp, sp,12 /* readjust stack */ move t9,v0 - move a2,s1 # restore ps_strings - jr t9 # _start(sp, cleanup, obj); + move a2,s1 /* restore ps_strings */ + jr t9 /* _start(sp, cleanup, obj); */ nop END(rtld_start) @@ -78,15 +78,16 @@ .globl _rtld_bind_start .ent _rtld_bind_start _rtld_bind_start: - # ABI conventions for stubs - # t8 contains symbol index - # t7 contains return address - .frame sp, 0, ra # satisfy compiler + /* ABI conventions for stubs: + * t8 contains symbol index + * t7 contains return address + */ + .frame sp, 0, ra /* satisfy compiler */ - move v1,gp # save old GP - add t9,8 # modify T9 to point at .cpload + move v1,gp /* save old GP */ + add t9,8 /* modify T9 to point at .cpload */ .cpload t9 - subu sp,44 # save arguments and sp value in stack + subu sp,44 /* save arguments and sp value */ .cprestore 36 sw a0,16(sp) sw a1,20(sp) @@ -95,16 +96,16 @@ sw s0,32(sp) sw t7,40(sp) move s0,sp - move a0,v1 # old GP - subu a0,a0,0x7ff0 # The offset of $gp from the - # beginning of the .got section: - # $gp = .got + 0x7ff0, so - # .got = $gp - 0x7ff0 - # Simple math as you can see. + move a0,v1 /* old GP */ + subu a0,a0,0x7ff0 /* The offset of $gp from the */ + /* beginning of the .got section: */ + /* $gp = .got + 0x7ff0, so */ + /* .got = $gp - 0x7ff0 */ + /* Simple math as you can see. */ - lw a0,4(a0) # object = pltgot[1] & 0x7fffffff + lw a0,4(a0) /* object = pltgot[1] & 0x7fffffff */ and a0,a0,0x7fffffff - move a1,t8 # symbol index + move a1,t8 /* symbol index */ jal _C_LABEL(_mips_rtld_bind) nop
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200704061005.l36A55v1085780>