Added support for library libbases to be stored as an offset in the
commit51fa39f927dfcf3e8dbac1363b989483f1652140
authorverhaegs <verhaegs@fb15a70f-31f2-0310-bbcc-cdcc74a49acc>
Sun, 4 Sep 2011 16:51:56 +0000 (4 16:51 +0000)
committerverhaegs <verhaegs@fb15a70f-31f2-0310-bbcc-cdcc74a49acc>
Sun, 4 Sep 2011 16:51:56 +0000 (4 16:51 +0000)
treecf069921af7fef79210261c0125eef612976de7b
parente78f2e904bd4c48265d0f0ef236de42ec842cc89
Added support for library libbases to be stored as an offset in the
current relbase pointer.

A global variable libbasename_offset indicates at which offset in the
current the other libbase is stored. Support macro's are available in
symbolsets.h.

Support is also added in genmodule so that for all modules compiled with
%build_module generates a liblibname_rel.a file that will call the
function using this offset in the current libbase.

If you want to place a libbase of another library in the library of your
library you have to do the following things:
- Put a field in your libbase
- Initialize the libbasename_offset variable properly
- Link the library with liblibase_rel.a evt. using uslibs=libbase_rel

This patch is co-developed with Jason McMullan.

git-svn-id: https://svn.aros.org/svn/aros/trunk/AROS@41080 fb15a70f-31f2-0310-bbcc-cdcc74a49acc
12 files changed:
arch/i386-all/include/aros/cpu.h
arch/m68k-all/include/aros/cpu.h
compiler/autoinit/libraries.c
compiler/include/aros/symbolsets.h
config/make.tmpl
tools/genmodule/genmodule.c
tools/genmodule/genmodule.h
tools/genmodule/writeautoinit.c
tools/genmodule/writeincproto.c
tools/genmodule/writemakefile.c
tools/genmodule/writestart.c
tools/genmodule/writestubs.c