Adding symbols from libge_*.a into blender's dynamic tables #1788
Liebranca
started this conversation in
Announcements & others
Replies: 1 comment 1 reply
-
I don't understand anything sorry. It sounds very technical. I convert this to discussion as we are trying to keep this place for most important bugs only. Thanks for comprehension. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
From the
ld
manual:The linker flag in question being
--export-dynamic
. With this, an extension could load symbols directly from blender, which I would appreciate.Far as I can tell, this is switched off. Tried:
Which returns nothing. Running the same command on
libge_ketsji.a
I get a more informative answer: no dynamic symbols on any of the object files within the lib.So: here I am, asking questions.
-fvisibility=hidden
switched on somewhere?Reason why I want to do this:
Linked as a shared object; loaded with ctypes at game startup, passed
cont.owner
as actypes.py_object
, which AFAIK should correspond toPyObject*
.Running this test should attempt a vtable lookup, then segfault because I most likely passed it a bogus pointer. But instead it throws OSError as soon as I init my lib:
And oh, that's too bad. But what does the binary say?
Found. Let's demangle:
Looks to me me like Blender knows where the vtable is, it just doesn't want to share ;>
But as I see it, sharing is good. I don't even need every last symbol to be accessible to extensions, just the game engine ones for starters.
What do you guys think? Is this viable?
Beta Was this translation helpful? Give feedback.
All reactions