public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Dave Korn" <dk@artimi.com>
To: <bserdar@nc.rr.com>, "'Gerhard Wiesinger'" <gerhard@wiesinger.com>
Cc: <binutils@sources.redhat.com>, <gcc-help@gcc.gnu.org>
Subject: RE: gcc and -fPIC
Date: Fri, 15 Oct 2004 18:46:00 -0000	[thread overview]
Message-ID: <NUTMEGXDtMVK9vJdgko000004f5@NUTMEG.CAM.ARTIMI.COM> (raw)
In-Reply-To: <72f84372eb57.72eb5772f843@southeast.rr.com>

> -----Original Message-----
> From: binutils-owner On Behalf Of bserdar
> Sent: 15 October 2004 19:27

> >  80485b3:       e8 00 00 00 00          call   80485b8 <X::f()+0xc>
> >  80485b8:       5b                      pop    %ebx
> >  80485b9:       81 c3 5c 12 00 00       add    $0x125c,%ebx
> 
> With pop ebx, it pops the eip at that instruction to ebx. I'm 
> guessing it'll use ebx as a base pointer to data (or code?) 
> from this point on. You can verify this guess by accessing 
> some global variables from within X::f() and see whether it 
> uses ebx-relative access.
> 

  Oh blimey, I didn't spot that.  Yes, of course that's what it's doing.
Please ignore my previous post, I would now assume that the -r flag will in
fact show that no reloc is applied nor needed on that instruction.

    cheers, 
      DaveK
-- 
Can't think of a witty .sigline today....

  reply	other threads:[~2004-10-15 18:46 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-15 18:26 bserdar
2004-10-15 18:46 ` Dave Korn [this message]
2004-10-15 18:51 ` Gerhard Wiesinger
2004-10-15 19:11   ` Jeffrey A Law
2004-10-15 19:16     ` Gerhard Wiesinger
  -- strict thread matches above, loose matches on Subject: below --
2004-10-15 18:58 bserdar
2004-10-15 17:08 Gerhard Wiesinger
2004-10-15 17:54 ` Dave Korn
2004-10-15 19:55 ` Andreas Schwab
2004-10-16  6:06   ` Gerhard Wiesinger
2004-10-16 12:09     ` Andreas Schwab
2004-10-16 15:17       ` Daniel Jacobowitz
2004-10-17 18:57         ` Gerhard Wiesinger
2004-10-17 19:31           ` Daniel Jacobowitz
2004-10-18  5:17             ` Gerhard Wiesinger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=NUTMEGXDtMVK9vJdgko000004f5@NUTMEG.CAM.ARTIMI.COM \
    --to=dk@artimi.com \
    --cc=binutils@sources.redhat.com \
    --cc=bserdar@nc.rr.com \
    --cc=gcc-help@gcc.gnu.org \
    --cc=gerhard@wiesinger.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).