From: Brian Gerst <bgerst@didntduck.org>
To: Dave Airlie <airlied@linux.ie>
Cc: linux-kernel@vger.kernel.org, linux-vax@mithra.physics.montana.edu
Subject: Re: Global Offset Table question..
Date: Sat, 22 Sep 2001 18:01:39 -0400 [thread overview]
Message-ID: <3BAD0A43.731832F4@didntduck.org> (raw)
In-Reply-To: <Pine.LNX.4.32.0109222139550.22558-100000@skynet>
Dave Airlie wrote:
>
> I've been trying to get dynamic loading on the Linux/VAX project going,
> and I've having trouble with the Global Offset Table and how it magically
> gets in to the ebx register on x86.. where is this done?
>
> I think I've looked at the kernel, gcc, binutils, ld.so 1.9, glibc 2.2.3
> and can't see exactly where this happens...
>
> Anyone care to enlighten my poor brain...
>
> Thanks,
> Dave.
>
I assume you are talking about position independant code? On the x86,
the only instructions that can use IP-relative addressing are branch
instructions. This asm fragment shows how it's done:
call 1f
1: popl %ebx
addl $(GOT - 1b), %ebx
If the Vax has better support for IP-relative addressing, this may be
easier. On recent x86 procesors, the above code will screw up the
call/return cache (branch prediction) and cause performance penalties.
--
Brian Gerst
prev parent reply other threads:[~2001-09-22 21:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-09-22 20:42 Global Offset Table question Dave Airlie
2001-09-22 21:29 ` [LV] " Dave Airlie
2001-09-22 22:01 ` Brian Gerst [this message]
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=3BAD0A43.731832F4@didntduck.org \
--to=bgerst@didntduck.org \
--cc=airlied@linux.ie \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-vax@mithra.physics.montana.edu \
/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