This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: jumps to middle of x86 instructions ?
- From: Andrew Haley <aph at redhat dot com>
- To: Mithun R N Iyer <mithun_rn at yahoo dot co dot in>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Fri, 04 Apr 2008 10:10:20 +0100
- Subject: Re: jumps to middle of x86 instructions ?
- References: <169046.30623.qm@web8511.mail.in.yahoo.com>
Mithun R N Iyer wrote:
> Hi All: I see these weird jmps to middle of
> instructions in a binary.
>
> This is on x86, ubuntu gcc version: 4.1.3 with -O2
> optimization.
>
> Can someone please let me know why such jumps are
> generated ? I have seen such jmps in case of lock
> prefix instructions but do not see any such
> instructions here.
> There is no assembly code added in the sources.
>
> The code snippet looks like:
> 0x0006c007 <strrchr+103>: add %al,(%eax)
> 0x0006c009 <strrchr+105>: add
> %al,0xee8304ee(%ebx)
When you build strrchr, generate an assembly file by compiling with
-save-temps. I think you will find this is not code, but data.
Andrew.