From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32304 invoked by alias); 27 Jun 2012 22:34:43 -0000 Received: (qmail 32154 invoked by uid 22791); 27 Jun 2012 22:34:42 -0000 X-SWARE-Spam-Status: No, hits=-4.7 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 27 Jun 2012 22:34:29 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1Sk0oe-0007Fg-Ay from Maxim_Kuvyrkov@mentor.com ; Wed, 27 Jun 2012 15:34:28 -0700 Received: from SVR-IES-FEM-01.mgc.mentorg.com ([137.202.0.104]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Wed, 27 Jun 2012 15:33:42 -0700 Received: from [127.0.0.1] (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.1.289.1; Wed, 27 Jun 2012 23:34:26 +0100 Subject: Re: [PATCH, cross prelink] 0001-Pull-ld.so-s-name-from-PT_INTERP-to-avoid-the-runtim.patch MIME-Version: 1.0 (Apple Message framework v1278) Content-Type: text/plain; charset="iso-8859-1" From: Maxim Kuvyrkov In-Reply-To: <4FC4E890.5010307@windriver.com> Date: Wed, 27 Jun 2012 22:34:00 -0000 CC: Content-Transfer-Encoding: quoted-printable Message-ID: References: <78E2B6DA-6156-43B6-B788-C8501057C234@codesourcery.com> <4F848E15.1030905@windriver.com> <9C676A7D-F066-4041-B3FB-4F02653D8588@codesourcery.com> <4F8496BA.3010706@windriver.com> <10862750-7E5E-4B2C-9FEF-1EADEB197044@codesourcery.com> <4FC4E890.5010307@windriver.com> To: Mark Hatle Mailing-List: contact prelink-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: prelink-owner@sourceware.org X-SW-Source: 2012-q2/txt/msg00006.txt.bz2 Ping. -- Maxim Kuvyrkov CodeSourcery / Mentor Graphics On 30/05/2012, at 3:17 AM, Mark Hatle wrote: > This was just an oversight it appears. I'm working on a number of merges= into the cross prelinker today. Hopefully in a few days it will be tested= and pushed. If you don't see anything, feel free to keep reminding me. >=20 > --Mark >=20 > On 5/25/12 10:42 PM, Maxim Kuvyrkov wrote: >> On 11/04/2012, at 8:23 AM, Mark Hatle wrote: >>=20 >>> On 4/10/12 2:56 PM, Maxim Kuvyrkov wrote: >>>> On 11/04/2012, at 7:46 AM, Mark Hatle wrote: >>>>=20 >>>>> On 4/10/12 2:27 PM, Maxim Kuvyrkov wrote: >>>>>> Mark, >>>>>>=20 >>>>>> This patch makes rtld emulator in cross prelink use ld.so's name as = it is encoded in PT_INTERP header. >>>>>>=20 >>>>>> Currently, rtld emulator returns "lib/ld.so.1" for runtime linker's = name, but the linker actually expects "/lib/ld.so.1" -- that one slash at t= he beginning causes prelink checks done by the runtime linker to fail and n= ot use prelink information. >>>>>>=20 >>>>>> The runtime linker sets up a map for itself under the name stored in= PT_INTERP header of the executable, and this patch makes rtld emulator fol= low the suit. >>>>>>=20 >>>>>> I have tested this patch using a different version of rtld emulator = (the one that CodeSourcery / Mentor maintains), but the function in questio= n is the same in both, so this patch is also relevant for Yocto's prelink. >>>>>>=20 >>>>>> Any comments? Please merge at your leisure. >>>>>=20 >>>>> prelinker currently checks that the ld.so name matches what it's expe= cting for any given arch in the PL_ARCH structure. Does this change any of= that behavior? Or does it simply change the internal prelink-rtld behavio= r so that it the prelink-rtld acts as if it's name is the PT_INTERP element? >>>>=20 >>>> It is the latter. Only behavior of prelink-rtld is change to the effe= ct that it outputs "/lib/ld.so.1 -> /lib/ld.so.1 ..." as executable's dep= endency. >>>>=20 >>>> Forgot to mention: the dependency on ld.so.1 [usually] comes from libd= l.so, which is, probably, why this bug wasn't noticed before. >>>=20 >>> Thanks, I think I understand what is going on now. I'll look into gett= ing this merged into the cross prelinker later today or tomorrow. >>=20 >> Mark, >>=20 >> This patch is still not merged to cross-prelink, did you encounter a pro= blem with it? >>=20 >> Thank you, >>=20 >> -- >> Maxim Kuvyrkov >> CodeSourcery / Mentor Graphics >=20