This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

lazy load shared objects using gcc


i always assumed 'lazy load' to be the default configuration of the
g++/gcc 'frontend'. But i tested this using gcc version 2.96 on 
RedHat 7.1/7.2, and it seems to be 'load now' the default configuration.

Reading the man/info pages of gcc and ld, i guess the ld to support 'lazy
load' ( the -R <file> option ). But the gcc doesn't know any option, except
' -z now ' --- to *turn off* lazy loading. This confirms my assumption of 
'lazy load' beeing the default.

But it doesn't: The error message of missing shared libraries always appears
on start time. To decide between two hardware subsets (eg. pcmcia cards)
i simply want to decide to engage the card of type one or two. 

a simple ' gcc MainApplication.cpp ' should
call the compiler, Assembler and linker -- preparing lazy load. But it does
a 'load now'. (And this doubles the time to start the Application.)

Please tell me where do i'm going wrong ? Where is my mistake in 
configuration ? Is there really no other way as to go through the ugly 
way of 'dlopen()' + dlsym() ... ??
I always mentioned the ELF format to be the solution to these problems.

Best regards,
  Roberta Reidel

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]