On 18-Sep-07, at 8:53 PM, Sven Panne wrote:

int main(void) {
  void *handle = dlopen("libglut.so", RTLD_NOW | RTLD_GLOBAL);

The behaviour seems to be different when RTLD_NOW is not specified, at least on my 32-bit linux box.

That shouldn't be a lot of work. The same relocation is already
implemented for Darwin/x86_64. [...]

Can I interpret this as: "I am willing to implement this for
Linux/x86_64"? ;-) I am not sure if I found the correct place in Linker.c
you've mentioned.

I guess I could find some time to play around with it on the weekend. I don't have an x86_64-linux box available right now, but I might either try some virtualisation software or just do a rough sketch and leave you to do the debugging ;-). R_X86_64_GOTPCREL for ELF is equivalent to X86_64_RELOC_GOT for Mach- O. I would activate the "SymbolExtra" mechanism for x86_64-ELF; that is a hack for putting extra per-symbol things right next to the .o file image (and thus within range); SymbolExtras are already used on powerpc-darwin, x86_64-darwin and powerpc-linux. I'll have a closer look at what exactly needs to be done when I have time.

Cheers,

Wolfgang


_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to