Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable nmethod disassembly on Windows and Linux #1

Open
talksmall opened this issue Dec 9, 2010 · 3 comments
Open

Enable nmethod disassembly on Windows and Linux #1

talksmall opened this issue Dec 9, 2010 · 3 comments

Comments

@talksmall
Copy link
Owner

Enhance the disassembler to make it cross platform. Add a new member function to the os class - char* os::dll_extension() - to return the filename extension used for DLL files on a given platform and add implementations for all three platforms - os_nt.cpp, os_darwin.cpp and os_linux.cpp.

Change disassembler.cpp to use the new function when generating the name of the dll to be loaded.

@lojo
Copy link
Contributor

lojo commented Dec 9, 2010

Since there is no standard way to do this, and Linux, Windows and Mac OS X have their own naming conventions (prefix, postfix, Apple Frameworks, version numbers).

A trade-off would be to use a platform agnostic libname with a vy simple mapping scheme (short term solution):
For example, the shared libname 'foo' in the os:dll_load("foo") call would map to:

Windows -> foo.dll
Linux -> libfoo.so
Mac OS X -> libfoo.dylib

This would at least get the API right, until someome runs into a 'corner case'.

@talksmall
Copy link
Owner Author

That won't work asis :(. os::dll_load is already used by the image-side DLL mapping code. The change you suggest would break all of the existing code that uses DLL (which means you wouldn't even be able to run a script from the command line, let alone draw anything on the screen).

On the image-side this all works right now. OSX framework mappings are handled a little differently than ordinary .dylibs, but the principle is similar and it's early days as yet for that.

@lojo
Copy link
Contributor

lojo commented Dec 9, 2010

...and someone ran with lightspeed into a corner case!

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

No branches or pull requests

2 participants