lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Miles Bader wrote:
> Henk Boom <henk@henk.ca> writes:
> > Why would the luajit ffi be using a different library than the linker/loader?
> 
> Presumably luajit searches for libraries in "normal" locations.

It just maps
  ffi.load("GL")
to:
  dlopen("libGL.so", RTLD_LAZY|RTLD_LOCAL)

The FFI has no clue about the actual library paths on POSIX. It
simply relies on whatever dlopen() does, when called with a path
without a slash.

I was always under the impression dlopen() behavior is the same as
implicit dependency loading via ELF headers. Apparently I'm wrong.
Maybe have a look at readelf -d and at the various environment
variables related to the dynamic loader.

--Mike