This is the mail archive of the
libc-ports@sources.redhat.com
mailing list for the libc-ports project.
RE: patch to RTLD_START to avoid store data below $sp on MIPS
@Joseph
I did try it out on o32 platform, this is how I know Valgrind will not
report error with that change. I have not run any test suite.
@Maciej
You are right, additional spaces and brackets will look nicer.
Regards,
Petar
-----Original Message-----
From: Maciej W. Rozycki [mailto:macro@codesourcery.com]
Sent: Wednesday, July 04, 2012 6:30 PM
To: Petar Jovanovic
Cc: libc-ports@sourceware.org
Subject: Re: patch to RTLD_START to avoid store data below $sp on MIPS
On Wed, 4 Jul 2012, Petar Jovanovic wrote:
> diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
> index bc03785..5aabc88 100644
> --- a/sysdeps/mips/dl-machine.h
> +++ b/sysdeps/mips/dl-machine.h
> @@ -266,8 +266,9 @@ do {
> \
> " STRINGXP(PTR_ADDU) " $7, $7, " STRINGXP (PTRSIZE) " \n\
> # Make sure the stack pointer is aligned for _dl_init_internal.\n\
> and $2, $29, -2 * " STRINGXP(SZREG) "\n\
> - " STRINGXP(PTR_S) " $29, -" STRINGXP(SZREG) "($2)\n\
> + move $8, $29\n\
> " STRINGXP(PTR_SUBIU) " $29, $2, 32\n\
> + " STRINGXP(PTR_S) " $8, 32-" STRINGXP(SZREG) "($29)\n\
^
Spaces missing here, this is not unary "-" unlike in the old instruction,
and the whole displacement expression should probably be bracketed to
avoid reader's confusion.
> " STRINGXP(SAVE_GP(16)) "\n\
> # Call the function to run the initializers.\n\
> jal _dl_init_internal\n\
Maciej