public inbox for libc-ports@sourceware.org
 help / color / mirror / Atom feed
* patch to RTLD_START to avoid store data below $sp on MIPS
@ 2012-07-04 15:14 Petar Jovanovic
  2012-07-04 16:09 ` Joseph S. Myers
  2012-07-04 16:30 ` Maciej W. Rozycki
  0 siblings, 2 replies; 7+ messages in thread
From: Petar Jovanovic @ 2012-07-04 15:14 UTC (permalink / raw)
  To: libc-ports

Hi everyone,
 
there is a store-data-below-stack-pointer case in RTLD_START in
sysdeps/mips/dl-machine.h. Is there any reason to be so?
 
If not, I'd like to propose a small fix for it. Valgrind has detected the
issue and reports an error in this region. With the change, it will not
report it.
 
Let me know what you think.
 
Thanks.
 
Regards,
Petar
 
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\
        " STRINGXP(SAVE_GP(16)) "\n\
        # Call the function to run the initializers.\n\
        jal _dl_init_internal\n\

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-07-06 19:13 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-04 15:14 patch to RTLD_START to avoid store data below $sp on MIPS Petar Jovanovic
2012-07-04 16:09 ` Joseph S. Myers
2012-07-04 16:30 ` Maciej W. Rozycki
2012-07-05 17:31   ` Petar Jovanovic
2012-07-05 18:54     ` Joseph S. Myers
2012-07-06 15:45       ` Petar Jovanovic
2012-07-06 19:13         ` Joseph S. Myers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).