On Sun, 28 Mar 2010, Ralf Wildenhues wrote:

Working on support for -flto has uncovered an ugly buglet in libltdl.
ltmain declares this symbol as:

 extern $lt_dlsym_const lt_dlsymlist
 lt_${my_prefix}_LTX_preloaded_symbols[];

but libltdl declares it as:

 #define preloaded_symbols       LT_CONC3(lt_, LTDLOPEN, _LTX_preloaded_symbols)

 #ifdef HAVE_LIBDLLOADER
 extern lt_dlsymlist             preloaded_symbols;
 #endif

(note the missing []) and takes its address to make up for it.
gcc -flto notices this inconsistency between the objects.

This patch fixes it, it passes the testsuite.  I'll be pushing it soon.
I don't actually know whether this bug can cause issues on some system.

Nice catch.  I had not been aware of the -flto option before.

Bob
--
Bob Friesenhahn
bfrie...@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/


Reply via email to