From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12205 invoked by alias); 19 Dec 2011 17:45:59 -0000 Received: (qmail 12190 invoked by uid 22791); 19 Dec 2011 17:45:53 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,TW_CP 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; Mon, 19 Dec 2011 17:45:35 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=EU1-MAIL.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1RchHJ-0002P2-3c from joseph_myers@mentor.com ; Mon, 19 Dec 2011 09:45:33 -0800 Received: from digraph.polyomino.org.uk ([172.16.63.104]) by EU1-MAIL.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.1830); Mon, 19 Dec 2011 17:45:31 +0000 Received: from jsm28 (helo=localhost) by digraph.polyomino.org.uk with local-esmtp (Exim 4.74) (envelope-from ) id 1RchHG-0000Fb-FQ; Mon, 19 Dec 2011 17:45:30 +0000 Date: Mon, 19 Dec 2011 17:45:00 -0000 From: "Joseph S. Myers" To: Mike Frysinger cc: libc-ports@sourceware.org Subject: Re: [patch] handle unaligned arm abs relocs In-Reply-To: <201112121920.17908.vapier@gentoo.org> Message-ID: References: <201112121920.17908.vapier@gentoo.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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: 2011-12/txt/msg00030.txt.bz2 On Mon, 12 Dec 2011, Mike Frysinger wrote: > + /* Support relocations on mis-aligned offsets. */ > + memcpy (&reloc_value, reloc_addr_arg, sizeof (reloc_value)); > + reloc_value += value; > + memcpy (reloc_addr_arg, &reloc_value, sizeof (reloc_value)); It seems from the discussion that it would be useful to see exactly what code ends up getting generated for these memcpy calls. Is it a function call or inlined? What about all the other memcpy calls in the dynamic linker? For calls to memcpy that really are function calls, do they end up going through the PLT, or do they end up as direct calls to the copy of memcpy in the dynamic linker (given that it's linked with a version script that hides memcpy along with all the other libc functions it uses, so it shouldn't be necessary for calls to go through the PLT)? (If it ends up as a direct call, care might still be needed if ARM memcpy ends up using STT_GNU_IFUNC in future - I think some architectures disable IFUNC versions of string functions in the dynamic linker, though that may be for code size reasons - but that's something to watch out for in future rather than needing addressing now.) -- Joseph S. Myers joseph@codesourcery.com