Skip to content
This repository has been archived by the owner on Feb 12, 2019. It is now read-only.

Cross-module symbol linking #190

Open
6 tasks
Xe opened this issue Oct 14, 2015 · 1 comment
Open
6 tasks

Cross-module symbol linking #190

Xe opened this issue Oct 14, 2015 · 1 comment

Comments

@Xe
Copy link
Member

Xe commented Oct 14, 2015

This is gonna be a bit of a doozy.

Basically what has come up as part of adding ircv3 support among other things is that there is no real good way to have functions defined in one module be available to another module without putting them into the core. This has caused many issues when trying to clean up the core, things like core/m_message.so and other annoyingly large code files.

A naiive way to implement this would be to abuse hooks in ways they should not be abused. However this is 2015 and we have better ways of doing things.

  • Create a generic char* -> void* hashmap and a vtable-like global for modules to introduce and remove functions they provide to other modules.
  • Create a way for modules to declare and require functions from other modules, failing module load if they cannot find the required symbols.
  • Begin to migrate features that would depend on this to the cross-module linking system.

Extra credit:

  • move operhash and the like to use the above generic hashmap
@kaniini
Copy link

kaniini commented Dec 12, 2015

Have you looked at irc_dictionary.c yet.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants