Welcome to Soft32 Linux Forums!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Lazyload not working

 
   Soft32 Home -> Linux -> Development RSS
Next:  Trouble compiling C++ programs: libpq++ error  
Author Message
kenneth kahn

External


Since: Jan 09, 2004
Posts: 2



(Msg. 1) Posted: Wed Feb 18, 2004 10:40 pm
Post subject: Lazyload not working
Archived from groups: linux>redhat>devel (more info?)

I'm having a problem getting lazyload to work properly on Linux.
Here's a simple example to show what I'm seeing. Take the case of the
following
program:

#include <stdlib.h>
#include <stdio.h>
extern int so_fct(void);
int main() {
system("sleep 30");
printf("so_fct=%d",so_fct);
}

> gcc -o testx -L. -z lazyload -lx testx.c

The function so_fct is part of the libx.so shared library. According
to my understanding of things, libx shouldn't be loaded until the
so_fct is actually referenced. If I start this test program then
issue an "fuser -u libx.so" before the sleep expires, I get

libx.so: ####m(userid)

showing that libx has already loaded *before* the reference to so_fct
has occured. Isn't this counter to the way lazyload should work?

If I try this on a Solaris system, fuser shows that libx is not loaded
until so_fct is actually referenced, which is what I want.

Am I misunderstanding how Lazyload should be working? Is there
someway to resolve this (i.e. not have libx loaded until so_fct is
referenced)? I'm having the same problem on HP-UX, so perhaps Solaris
is the *only* system that properly implements lazyload???
Back to top
Login to vote
Display posts from previous:   
Related Topics:
source code for shutdown - Hi, Can anyone tell me where to get the source code for the command shutdown. I would like to port it to my Agenda..

a function to add to newt - If anybody still uses newt, it's got a neat feature to listen on socket descriptors, but no way to remove the socket..

download discountinued redhat-betas? - Hi, does anyone know where i can download discontinued redhat-betas, who have removed from the official server? Greet...

RH 9.0 +glut link problem - All my open GL code that uses the glut library fails to link under RH 9.0. It works fine under RH 8.0. Lib glut can'...

Regina Rexx for redhat 2.1 - Has anyone sucessfully build Regina Rexx 3.01 for RH Linux 2.1AW running on an IA64 Itanium? I got the package and the...

Problem building apache from source RPM on RH9 - I am trying to rebuild apache 2.0.40 from the source RPM for Red Hat 9. Just downloaded and installed SRPMS. and runnin...
       Soft32 Home -> Linux -> Development All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Categories:
 Windows
  Linux
 Mac
 PDA


[ Contact us | Terms of Service/Privacy Policy ]