From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30211 invoked by alias); 6 Jul 2012 15:45:05 -0000 Received: (qmail 30179 invoked by uid 22791); 6 Jul 2012 15:45:04 -0000 X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED X-Spam-Check-By: sourceware.org Received: from mail.rt-rk.ftn.uns.ac.rs (HELO mail.rt-rk.com) (147.91.177.140) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 06 Jul 2012 15:44:51 +0000 Received: from mail.rt-rk.com (mail.localdomain [127.0.0.1]) by mail.rt-rk.com (Postfix) with SMTP id 0364A25C8DD for ; Fri, 6 Jul 2012 17:44:47 +0200 (CEST) From: "Petar Jovanovic" To: "'Joseph Myers'" Cc: "'Maciej W. Rozycki'" , References: <38131C9536FD498AA0679A54D87B1B96@domain.local> <23DAE082C3224D9DAB2B9E56BEB6E5CB@domain.local> Subject: RE: patch to RTLD_START to avoid store data below $sp on MIPS Date: Fri, 06 Jul 2012 15:45:00 -0000 Message-ID: <2AEC5E6F36A1494EA8C5EFFB09D00F15@domain.local> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0071_01CD5B9F.089A4CB0" In-Reply-To: Mailing-List: contact libc-ports-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: libc-ports-owner@sourceware.org X-SW-Source: 2012-07/txt/msg00014.txt.bz2 This is a multi-part message in MIME format. ------=_NextPart_000_0071_01CD5B9F.089A4CB0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-length: 774 Sure, it is attached. Regards, Petar -----Original Message----- From: Joseph Myers [mailto:joseph@codesourcery.com] Sent: Thursday, July 05, 2012 8:54 PM To: Petar Jovanovic Cc: 'Maciej W. Rozycki'; libc-ports@sourceware.org Subject: RE: patch to RTLD_START to avoid store data below $sp on MIPS On Thu, 5 Jul 2012, Petar Jovanovic wrote: > @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. Could you send a patch updated to take account of Maciej's comments? I can then do some testing for all three ABIs before putting it in if it tests out OK. -- Joseph S. Myers joseph@codesourcery.com ------=_NextPart_000_0071_01CD5B9F.089A4CB0 Content-Type: application/octet-stream; name="dl-machine-patch.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="dl-machine-patch.diff" Content-length: 1212 diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h=0A= index bc03785..cc7da76 100644=0A= --- a/sysdeps/mips/dl-machine.h=0A= +++ b/sysdeps/mips/dl-machine.h=0A= @@ -266,13 +266,14 @@ do { = \=0A= " STRINGXP(PTR_ADDU) " $7, $7, " STRINGXP (PTRSIZE) " \n\=0A= # Make sure the stack pointer is aligned for _dl_init_internal.\n\= =0A= and $2, $29, -2 * " STRINGXP(SZREG) "\n\=0A= - " STRINGXP(PTR_S) " $29, -" STRINGXP(SZREG) "($2)\n\=0A= + move $8, $29\n\=0A= " STRINGXP(PTR_SUBIU) " $29, $2, 32\n\=0A= + " STRINGXP(PTR_S) " $8, (32 - " STRINGXP(SZREG) ")($29)\n\=0A= " STRINGXP(SAVE_GP(16)) "\n\=0A= # Call the function to run the initializers.\n\=0A= jal _dl_init_internal\n\=0A= # Restore the stack pointer for _start.\n\=0A= - " STRINGXP(PTR_L) " $29, 32-" STRINGXP(SZREG) "($29)\n\=0A= + " STRINGXP(PTR_L) " $29, (32 - " STRINGXP(SZREG) ")($29)\n\=0A= # Pass our finalizer function to the user in $2 as per ELF ABI.\n\= =0A= " STRINGXP(PTR_LA) " $2, _dl_fini\n\=0A= # Jump to the user entry point.\n\=0A= ------=_NextPart_000_0071_01CD5B9F.089A4CB0--