Sponsored Content
Top Forums Programming overriding the dynamic library Post 302119158 by Raom on Monday 28th of May 2007 08:54:03 AM
Old 05-28-2007
again !!!

I did this .....

i used dlopen to find the Link_map and lib handle of particular library loaded by ld.

this closed this lib using dlclose.

pointed the link_map to new library which i loaded using dlopen again(both libs are same but differ in some symbols) .

my apps does not complain or exit, but hanged forever.
 

10 More Discussions You Might Find Interesting

1. Programming

how to auto load a dynamic library

hi, every body. i have in trouble that how to load a dynamic library by hand. for example, i know how to generate a dynamic library and how to link a dynamic library in makefile. generate a dynamic library: add -dy -G behind cc link a dynamic library in makefile: add -dy -Bdynamic behind cc... (0 Replies)
Discussion started by: subrain
0 Replies

2. Linux

load dynamic and shared library in kernel

hi how can i load dynamic or shared library in linux kernel modules . mtaghiloo@yahoo.com (0 Replies)
Discussion started by: mtaghiloo
0 Replies

3. Programming

loading a dynamic library in linux

is there a way to load a dynamic library in linux? I know tht in AIX u can do it using the loadAndInit() function. Please guide me (2 Replies)
Discussion started by: jacques83
2 Replies

4. Shell Programming and Scripting

Overriding PATH

Hello, I'm using Sun solaris . I'm trying to override the environmental variable in my script, however when I execute the script, the PATH whatever being set in .profile is taking precedence. I have done the sanity checks like order of my entry in path, permissions for the user etc., To... (1 Reply)
Discussion started by: brainyoung
1 Replies

5. Programming

C++ overriding Vs hiding

class B { public: void fns(void){//base def;} }; class D:public B { public: void fns(void) {//new def;} }; I was thinking the above is overriding but somewhere else i found the above is just hiding.Only virtual functions can be considered as overriding? This is the exact statement ... (1 Reply)
Discussion started by: johnbach
1 Replies

6. UNIX for Dummies Questions & Answers

How to obtain list of object files in a shared (dynamic) library?

How can I simply obtain a list of the object files in a shared (dynamic) library. I am looking for the equivalent of "ar -t <lib>" for archived (static) libraries. Thanks in advance. :rolleyes: ---------- Post updated at 01:47 PM ---------- Previous update was at 12:16 PM ---------- The... (1 Reply)
Discussion started by: chatieremerrill
1 Replies

7. UNIX for Dummies Questions & Answers

Problem with shared dynamic library files

I am having a major problem. Most of the commands that i am running on my centos 5 system is giving the error of type: <dynamic shared library file>:open failed: No such file or directory For example: libgcc_s.so.1: open failed: No such file or directory How can i solve this? (6 Replies)
Discussion started by: proactiveaditya
6 Replies

8. Programming

Dynamic library load with dlopen

Hi, I created two library libsum.so and libproduct.so. In the libproduct.so is defined function "product" that use function "sum" defined in libsum.so. So libproduct depends on libsum. In main function I called product function by a dlopen request. Unfortunaly, when I execute program I have an... (5 Replies)
Discussion started by: shade82
5 Replies

9. Programming

problem in dynamic library*.so

hello I apologize if my question bothers you I work on a code developed in C + + which worked well on mac os, this code will help create libraries *.so from *.cc and *.h I used this as flags:CXXFLAGS = -g -O2 -fPIC -Wall -ldl -D_GNU_SOURCE ,CXX := g++ and $(CXX)-shared -o $(LIBNAME) $(CLIBLIB)... (0 Replies)
Discussion started by: pheapc
0 Replies

10. Programming

Specifying dynamic library path to linker at compile time

I would like to compile a binary that doesnot depend on LD_LIBRARY_PATH as this binary will be setuid to owner and used by other users and since setuid doesnot support LD_LIBRARY_PATH making it independent of LD_LIBRARY_PATH would be great. But I am not able to specify the path of the shared... (1 Reply)
Discussion started by: waavman
1 Replies
fastbind(1)						      General Commands Manual						       fastbind(1)

NAME
fastbind - Prepare an incomplete executable for faster program start-up SYNOPSIS
incomplete-executable... DESCRIPTION
is a tool that can improve the start-up time of programs that use shared libraries (incomplete executables) by storing information about needed shared library symbols in the executable file. performs analysis on the symbols used to bind an executable and all of it's dependent shared libraries, and stores this information in the executable file. The next time the executable is run, the dynamic loader will notice that this information is available, and it will use this fastbind information to bind the executable instead of the standard search method for binding the symbols. For Itanium-based systems, the dynamic loader is for 32-bit mode or for 64-bit mode. For PA-RISC systems, the dynamic loader is for 32-bit mode or for 64-bit mode. Since writes the fastbind information in the executable file, you must have write permission on the executable file. Also, if the exe- cutable file being analyzed is being run as another process, the file will be locked against modifications by the kernel, and will fail. If the shared libraries that an executable is dependent on are modified after the fastbind information is created, the dynamic loader will silently revert to standard search method for binding the symbols. The fastbind information can be re-created by running on the executable again. will automatically erase the old fastbind information and generate the new one. The option can be used to instruct the linker to run the fastbind tool on an incomplete executable it has produced. Environment Variables If determines that the fastbind information is out of date, it will silently revert to standard search method for binding the symbols. If the environment variable is set to the dynamic loader will emit a warning message when the fastbind information is out of date. The environment variable can be set to to make the dynamic loader ignore the fastbind information and revert to the standard search method for binding the symbols. Options recognizes the following options: Remove the fastbind information from the executable, returning it to the same state it was in before was originally run on it. Normally, if detects any unsatisfied symbols while building the fastbind information, it will generate an error message and not mod- ify the executable file. When is invoked with option however, unresolved symbols are allowed. EXTERNAL INFLUENCES
Environment Variables The following internationalization variables affect the execution of Determines the locale category for native language, local customs and coded character set in the absence of and other environment variables. If is not specified or is set to the empty string, a default of (see lang(5)) is used instead of Determines the values for all locale categories and has precedence over and other environment variables. Determines the locale that should be used to affect the format and contents of diagnostic messages written to standard error. Determines the locale category for numeric formatting. Determines the locale category for character handling functions. Determines the location of message catalogs for the processing of If any internationalization variable contains an invalid setting, behaves as if all internationalization variables are set to See envi- ron(5). In addition, the following environment variable affects Specifies a directory for temporary files (see tmpnam(3S)). DIAGNOSTICS
returns zero when the operation is successful. A non-zero return code indicates that an error occurred. EXAMPLES
To run on the executable file enter: To later remove the fastbind information from the executable file enter: WARNINGS
32-bit PA-RISC does not work with EXEC_MAGIC executables. effectively enforces bind restricted and bind immediate. For example, consider an executable linked bind deferred, which calls a function foo() defined in an implicitly loaded library. Before the actual call is made, if it explicitly loads a shared library (using shl_load(3X) with having a definition for when is finally called, it will be resolved from the explicitly loaded library. But after running the symbol will be resolved from the implicitly loaded library. AUTHOR
was developed by Hewlett-Packard. FILES
output file 32-bit PA-RISC dynamic loader 32-bit Itanium-based dynamic loader 64-bit PA-RISC dynamic loader 64-bit Itanium-based dynamic loader message catalog temporary files SEE ALSO
System Tools ld(1) invoke the link editor Miscellaneous a.out(4) assembler, compiler, and linker output dld.sl(5) PA-RISC dynamic loader dld.so(5) Itanium-based dynamic loader Texts and Tutorials
All times are GMT -4. The time now is 10:04 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy