c - Linking separate binaries -


say have 2 executables need loaded in same address space, @ different addresses. want keep 2 executables separate files, allow 1 call functions another.

for example, if executable a, has loaded @ 0x1000, contains function void foo() @ 0x1abc , executable b, loaded @ 0x2000, calls foo(), want end call 0x1abc in executable b.

the reason need toy os. need bootloader know interrupt handler , kernel code starts. might able squeeze whole thing 1 file, i'd rather not.

at moment solve problem manually loading needed functions @ "nice" addresses , manually writing jumps them. works, but, needles say, suboptimal.

one option provied addresses of function on second path. file example, or fixed memory address. if have full control on system, last version should work well.


Comments

Popular posts from this blog

ruby - Trying to change last to "x"s to 23 -

jquery - Clone last and append item to closest class -

css - Can I use the :after pseudo-element on an input field? -