public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Global Offset Table question..
@ 2001-09-22 20:42 Dave Airlie
  2001-09-22 21:29 ` [LV] " Dave Airlie
  2001-09-22 22:01 ` Brian Gerst
  0 siblings, 2 replies; 3+ messages in thread
From: Dave Airlie @ 2001-09-22 20:42 UTC (permalink / raw)
  To: linux-kernel, linux-vax


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.

-- 
David Airlie, Software Engineer
http://www.skynet.ie/~airlied / airlied@skynet.ie
pam_smb / Linux DecStation / Linux VAX / ILUG person



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [LV] Global Offset Table question..
  2001-09-22 20:42 Global Offset Table question Dave Airlie
@ 2001-09-22 21:29 ` Dave Airlie
  2001-09-22 22:01 ` Brian Gerst
  1 sibling, 0 replies; 3+ messages in thread
From: Dave Airlie @ 2001-09-22 21:29 UTC (permalink / raw)
  To: linux-vax; +Cc: linux-kernel


okay would I be in the right place if I was looking in gcc at

PIC_OFFSET_TABLE_REGNUM

Dave. dazed agus confused.

On Sat, 22 Sep 2001, 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.
>
>

-- 
David Airlie, Software Engineer
http://www.skynet.ie/~airlied / airlied@skynet.ie
pam_smb / Linux DecStation / Linux VAX / ILUG person



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Global Offset Table question..
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Brian Gerst @ 2001-09-22 22:01 UTC (permalink / raw)
  To: Dave Airlie; +Cc: linux-kernel, linux-vax

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-09-22 21:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox