Fundamental defect of the concept of shared libraries

Sean Eric Fagan sef at kithrup.COM
Thu May 23 18:26:58 AEST 1991


In article <225 at titccy.cc.titech.ac.jp> mohta at 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 at 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.



More information about the Comp.unix.internals mailing list