-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
- Loading branch information
1 parent
4d44533
commit 8c4e1ee
Showing
1 changed file
with
46 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8c4e1ee
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This assumes a particular name-mangeling of the C++ names. Are these standardized ?
8c4e1ee
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These should be compatible across Linux compilers on x86 (both 32b and 64b). I cannot guarantee other OSes or architectures.
This is only a PoC, it might be good enough for now, but it's probably not universal. That's why I suggested extracting the mangled symbols at compile time if we want to go this route (as the yosys we're building against should be compiled at this point)
8c4e1ee
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i.e. mangling is a convention, it's not guaranteed by the standard, but compilers tend to use common conventions so you can use clang compiled libs with gcc compiled apps etc
8c4e1ee
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I'd feel more comfortable if in the build process we generate a C macro which we then can use to
#ifdef
out the call with the nodisplay macro.dlsym() also assumes some sort of dynamic linking I suppose which is also not necessarily what everyone is doing.