From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1920 invoked by alias); 15 Oct 2004 18:51:20 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 1896 invoked from network); 15 Oct 2004 18:51:18 -0000 Received: from unknown (HELO wiesinger.com) (212.186.124.96) by sourceware.org with SMTP; 15 Oct 2004 18:51:18 -0000 Received: from bbs.intern (localhost [127.0.0.1]) by wiesinger.com (8.12.10/8.12.10) with ESMTP id i9FIpDI9032631 for ; Fri, 15 Oct 2004 20:51:13 +0200 Received: from localhost (gerhard@localhost) by bbs.intern (8.12.10/8.12.10/Submit) with ESMTP id i9FIpDdJ032627 for ; Fri, 15 Oct 2004 20:51:13 +0200 Date: Fri, 15 Oct 2004 18:51:00 -0000 From: Gerhard Wiesinger To: gcc-help@gcc.gnu.org Subject: Re: gcc and -fPIC In-Reply-To: <72f84372eb57.72eb5772f843@southeast.rr.com> Message-ID: References: <72f84372eb57.72eb5772f843@southeast.rr.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-MailScanner-Information-wiesinger.com: See www.mailscanner.info for information X-MailScanner-wiesinger.com: Found to be clean X-MailScanner-From: lists@wiesinger.com X-SW-Source: 2004-10/txt/msg00116.txt.bz2 On Fri, 15 Oct 2004 bserdar@nc.rr.com wrote: > >> 80485b3: e8 00 00 00 00 call 80485b8 >> 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. > OK, but why is the function call at 80485b3 to the next address at 80485b8? Is the call relocated at runtime (if yes, to what address or function) or can this not be handled by objdump? Thank you for the answer. Ciao, Gerhard