From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15871 invoked by alias); 20 Jan 2005 04:22:45 -0000 Mailing-List: contact binutils-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sources.redhat.com Received: (qmail 15555 invoked from network); 20 Jan 2005 04:22:36 -0000 Received: from unknown (HELO gizmo05bw.bigpond.com) (144.140.70.40) by sourceware.org with SMTP; 20 Jan 2005 04:22:36 -0000 Received: (qmail 19812 invoked from network); 20 Jan 2005 04:22:34 -0000 Received: from unknown (HELO bwmam12.bigpond.com) (144.135.24.103) by gizmo05bw.bigpond.com with SMTP; 20 Jan 2005 04:22:34 -0000 Received: from cpe-144-136-221-26.sa.bigpond.net.au ([144.136.221.26]) by bwmam12.bigpond.com(MAM REL_3_4_2a 189/46568587) with SMTP id 46568587; Thu, 20 Jan 2005 14:22:34 +1000 Received: by bubble.modra.org (Postfix, from userid 500) id 14ED814B918; Thu, 20 Jan 2005 14:52:34 +1030 Date: Thu, 20 Jan 2005 04:22:00 -0000 From: Alan Modra To: "H. J. Lu" Cc: Jakub Jelinek , binutils@sources.redhat.com Subject: Re: RFC: PATCH: PR x86_64/584: Detect call on protected symbol Message-ID: <20050120042234.GB3810@bubble.modra.org> Mail-Followup-To: "H. J. Lu" , Jakub Jelinek , binutils@sources.redhat.com References: <20050119224833.GA4107@lucon.org> <20050119230544.GF4777@sunsite.mff.cuni.cz> <20050120004032.GA5734@lucon.org> <20050120015519.GA3810@bubble.modra.org> <20050120031709.GA7990@lucon.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050120031709.GA7990@lucon.org> User-Agent: Mutt/1.4i X-SW-Source: 2005-01/txt/msg00280.txt.bz2 On Wed, Jan 19, 2005 at 07:17:09PM -0800, H. J. Lu wrote: > On Thu, Jan 20, 2005 at 12:25:19PM +1030, Alan Modra wrote: > > On Wed, Jan 19, 2005 at 04:40:32PM -0800, H. J. Lu wrote: > > > Can we be sure that contents[r_offset - 1] == 0xe8 will be call? > > > > Not if the PC32 reloc happens to be in data. Also, I suspect some of > > We can check if the input section is executable. The worst case is that > you may get a runtime error instead of a linktime one. > > > the possible load/store insns might have a sib byte of 0xE8. > > I think 0xe8 SIB is [RAX + RIP * 8], which can't have R_X86_64_PC32. Ah, no disp field. A modrm of 0xE8 won't have the PC32 reloc either. So the only problem is when people put things like jump tables in .text. -- Alan Modra IBM OzLabs - Linux Technology Centre