On 13/09/15 15:01, Gavin Wraith wrote:
>> In RISC OS, your libraries should be of the form:
>>
>> MyApp:lib.foo/so
>>
>> ie, a library file called "foo/so" in directory "lib" on path "MyApp".
>> You then pass it to dlopen as:
>>
>> /MyApp:lib/foo.so
>>
>> ie, in Unix style. The dynamic linker will then convert to the RISC OS
>> format when performing file operations.
>> I assume you're setting LUA_CPATH to "/MyApp:lib/" and then expecting
>> the dlfcn library to use that to build the correct filename.
>
> Yes.
>
>> If your libraries are named correctly as above, then that may work, but you
>> may have to tweak the dlfcn library to get the filenames correct.
>
> Some progress. I no longer get the 'file not found' error, but instead I get
> a message
> Text relocation of data symbol '' found:
> lua600:lib.riscos/so (offset 0x145C)
That means that either you have compiled one or more C source files
without the -fPIC option or some hand written assembler (sys.s?)
refers to global data without making it position independent.
If you need help with the latter, let me know.
If you load riscos/so into Zap/StrongEd and look at offset 0x145c in
code mode, you should be able to search back to the function that is
causing the problem.
> Not sure how to "tweak the dlfcn library". Would I not need access to its sources?
> The message is presumably from ld?
That's my misunderstanding. I thought you were referring to a library in
the LUA runtime rather the dynamic linker/libdl.
Lee.
_______________________________________________
GCCSDK mailing list gcc@gccsdk.riscos.info
Bugzilla: http://www.riscos.info/bugzilla/index.cgi
List Info: http://www.riscos.info/mailman/listinfo/gcc
Main Page: http://www.riscos.info/index.php/GCCSDK
No comments:
Post a Comment