Luke Gorrie
2014-06-22 11:18:29 UTC
Howdy,
I'm looking for a neat way to combine multiple independent DynASM objects
(.o) in the same executable.
Here is how my DynASM code looks now:
https://github.com/lukego/snabbswitch/blob/tlb/src/core/tlb.dasc
I'd like to be able to add more similar files, but I have two problems:
First, dynasm_x86.h is defining a whole bunch of functions (dynasm_init,
etc) so I will get a linker error if I try to include this from another
file too.
Second, 90% of tlb_make() would ideally be a shared library function that
all DynASM-based files can call to do the common tasks like init, assembly,
copying into an executable page of memory, etc.
Anybody happen to have already solved this or have some tips?
Cheers,
-Luke
I'm looking for a neat way to combine multiple independent DynASM objects
(.o) in the same executable.
Here is how my DynASM code looks now:
https://github.com/lukego/snabbswitch/blob/tlb/src/core/tlb.dasc
I'd like to be able to add more similar files, but I have two problems:
First, dynasm_x86.h is defining a whole bunch of functions (dynasm_init,
etc) so I will get a linker error if I try to include this from another
file too.
Second, 90% of tlb_make() would ideally be a shared library function that
all DynASM-based files can call to do the common tasks like init, assembly,
copying into an executable page of memory, etc.
Anybody happen to have already solved this or have some tips?
Cheers,
-Luke