Fundamental defect of the concept of shared libraries
Masataka Ohta
mohta at necom830.cc.titech.ac.jp
Wed May 22 15:19:42 AEST 1991
In article <1991May22.063425.26144 at kithrup.COM>
sef at kithrup.COM (Sean Eric Fagan) writes:
>>>Are there any architectures of interest in this discussion that can't
>>>support PC-relative references?
>>R3000.
>
> _foo:
> <entrycode>
> jal foo1$
> foo1$:
> addu $at, $31, 0
>
>Guess what: we can now do PC-relative references. And this isn't even
>the most efficient way to do it.
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.
You had better write PC-relative (not actually) reference as
< la $at,foo1$
< foo1$:
It is as PC-relative as your trick, but is called immediate addressing.
Of course, both of above are unusable in PIC.
>Score one for our side.
Sigh.
Masataka Ohta
More information about the Comp.unix.internals
mailing list