Is there a way to build a non-PIC shared library with l4env?

Valery V. Sedletski _valerius at
Thu Oct 6 14:20:19 CEST 2011

On Thu, 06 Oct 2011 20:43:38 +1300 (MSD), Valery V. Sedletski wrote:

>On Sun, 2 Oct 2011 23:00:11 +0200, Adam Lackorzynski wrote:

I now built a shared lib as PIC and linked to the binary. And made a router function, which is at the
fixed address in the binary, which acts as a wrapper for shared library functions. So, now I can call
the shared lib functions from a fixed address. But another problem -- loads at 0x10000 and prevents my OS/2 binary to load. The area at 0x10000 is the default
OS/2 binary start address and I cannot change this :( Is there a way to move from the address
0x10000 or to avoid loading it at all? Now I have my shared lib dynamically linked with the binary, and it 
gets loaded by ldso (aka Maybe, there is a mode of loading shared libs when is not
needed (for example, I am not sure if it is needed to be loaded when I load it via dlopen() e.g.)

Maybe, I must build a custom version which loads at different address? Or maybe, there is a
legal way to move to another address? -- I know that, for example, thread lib heap can be moved 
from its default position by changing a variable which is defined as a weak symbol. So, maybe it could be done 
likewise? Help, please..

Thanks in advance,

More information about the l4-hackers mailing list