I know that in libaaa.so there is an exported (the symbol is in the text/code section) function obj1() at address 0x12345 from the start of the library.
CLibrary libaaa = (CLibrary)Native.load("aaa", CLibrary.class);
I want to invoke a function obj2() which I know to be at address 0x12444 from the start of the library OR the address of (obj1() + 0xff) (0x12444-0x12345=0xff)
The obj2() symbol is NOT in the text/code section, so I can only invoke it by its address (which I know.) I understand that I could use Function.getFunction(new Pointer(funcAddr), 0, "utf8");
if I had the function's address, but I do not know what address JNA will load the library.
I can easily access the obj1() function (aaa.obj1()) that's trivial, but how could I access the aaa.obj2() function which is not in the text section, and thereby only referable from its offset in the library (or offset from another function in the text/code section.)
Thank you.