unix - dlopen()/dlsym() on the main executable: how portable is it? -


i'm building compiler , virtual machine executing byte code. language allows bind external c functions, may defined in external shared object, main compiler/vm binary (some essential language built-ins).

i know can dynamically bind symbols within main executable dlopen(null, ...), not after run strip on binary. have following questions then:

  1. is there way on strip'ed binary?
  2. how portable feature across unix systems in general?
  3. is possible same trick on windows somehow?
  4. any alternatives ways of binding dynamically within main executable?

  1. use strip -d instead strip debug symbols.

  2. the dlopen(3) man page says:

    conforming        posix.1-2001 describes dlclose(), dlerror(), dlopen(), , dlsym(). 

    so, portable across *nix.

  3. windows uses loadlibrary() , getprocaddress() instead.

  4. no.


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

aspxgridview - Devexpress grid - header filter does not work if column is initially hidden -

c# - How to execute a particular part of code asynchronously in a class -