This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: RFC: PATCH: PR x86_64/584: Detect call on protected symbol
- From: Jakub Jelinek <jakub at redhat dot com>
- To: "H. J. Lu" <hjl at lucon dot org>
- Cc: binutils at sources dot redhat dot com
- Date: Thu, 20 Jan 2005 00:05:44 +0100
- Subject: Re: RFC: PATCH: PR x86_64/584: Detect call on protected symbol
- References: <20050119224833.GA4107@lucon.org>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Wed, Jan 19, 2005 at 02:48:34PM -0800, H. J. Lu wrote:
> X86_64 uses R_X86_64_PC32 for both branch and store/load. Linker
> can't tell if a protected symbol reference is local or global just
> by relocation. This patch disassembles the code to check for call.
Eh, why you need the disassembler there?
Isn't it enough just to check if R_X86_64_PC32's r_offset > 0 and
contents[r_offset - 1] == 0xe8?
Jakub