Skip to content

Commit

Permalink
Fix toEmodulename in 64bit version
Browse files Browse the repository at this point in the history
`toEmodulename` didn't work with the 64bit build of dmd
because of the fixed offset that's doubled in the 64 bit
build.
  • Loading branch information
nemanja-boric-sociomantic committed Oct 13, 2014
1 parent b54f5c3 commit 3e58412
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/glue.c
Expand Up @@ -1287,14 +1287,14 @@ elem *Module::toEmodulename()

/* Class ModuleInfo is defined in std.moduleinfo.
* The first member is the name of it, char name[],
* which will be at offset 8.
* which will be at offset 2 * Target::ptrsize.
*/

si = toSymbol();
#if 1
// Use this instead so -fPIC will work
efilename = el_ptr(si);
efilename = el_bin(OPadd, TYnptr, efilename, el_long(TYuint, 8));
efilename = el_bin(OPadd, TYnptr, efilename, el_long(TYuint, 2 * Target::ptrsize));
if (config.exe != EX_WIN64)
efilename = el_una(OPind, TYdarray, efilename);
#else
Expand Down

0 comments on commit 3e58412

Please sign in to comment.