Newsgroups: comp.unix.internals
Path: utzoo!utgpu!news-server.csri.toronto.edu!torsqnt!hybrid!scifi!bywater!uunet!kithrup!sef
From: sef@kithrup.COM (Sean Eric Fagan)
Subject: Re: Fundamental defect of the concept of shared libraries
Organization: Kithrup Enterprises, Ltd.
Date: Thu, 23 May 1991 08:26:58 GMT
Message-ID: <1991May23.082658.4881@kithrup.COM>
Keywords: ISC i386 shared libraries
References: <215@titccy.cc.titech.ac.jp> <1991May22.063425.26144@kithrup.COM> <225@titccy.cc.titech.ac.jp>

In article <225@titccy.cc.titech.ac.jp> mohta@necom830.cc.titech.ac.jp (Masataka Ohta) writes:
>You poor boy, such an old trick is already known to me. I sometimes use
>the trick if it is possible.
>The problem here is that "jal" is not PC-relative.

*sigh*
Fine.  How about:

	mov	1, $at
	bgezal	$at, foo1$
	nop
foo1$:
	mov	$r31, $at

*Now* $at has PC, and you can write your PIC code.

Happy?

The assembler and linker can conspire with everything else to produce PIC
code.

Score two for our side.

-- 
Sean Eric Fagan  | "I made the universe, but please don't blame me for it;
sef@kithrup.COM  |  I had a bellyache at the time."
-----------------+           -- The Turtle (Stephen King, _It_)
Any opinions expressed are my own, and generally unpopular with others.
