yquake2_5.21~dfsg1-1_amd64.changes ACCEPTED into unstable

Simon McVittie smcv at debian.org
Sun Jan 19 13:58:00 UTC 2014


> Am Montag, den 13.01.2014, 12:08 +0100 schrieb Fabian Greffrath: 
>> I don't understand the global_namespace part in the last chunk of the
>> dlopen patch. Would you mind to elaborate?

Sorry, I must have received the original email while busy or something.

dlsym(RTLD_DEFAULT, "foo") means look up the symbol named foo in the
same way that ld.so would normally do it: look in the executable, then
in the libraries it depends on, then in the libraries *they* depend on,
and so on. Unfortunately, RTLD_DEFAULT doesn't seem to be 100% portable
- it's in dlsym(3posix), but I must have seen some reference to it not
existing everywhere.

The dlsym(3posix) man page also suggests that the handle returned by
dlopen(NULL, ...) is basically equivalent to RTLD_DEFAULT:

 If the value of file is 0, dlopen() shall provide a handle on a  global
 symbol  object. This object shall provide access to the symbols from an
 ordered set of objects consisting of the original program  image  file,
 together  with  any  objects loaded at program start-up as specified by
 that process image file (for example, shared libraries), and the set of
 objects loaded using a dlopen() operation together with the RTLD_GLOBAL
 flag.

so if RTLD_DEFAULT isn't defined, I use that approach instead.

I can't remember why I adapted Sys_GetProcAddress() to deal with "handle
== NULL" like that, rather than relying on having defined ALSYMBOL(.,
foo) to just be foo. Perhaps it's left over from an earlier version of
the patch that didn't redefine ALSYMBOL.

    S




More information about the Pkg-games-devel mailing list