Sponsored Content
Special Forums Hardware Filesystems, Disks and Memory How to find Dependent libraries in ELF file? Post 302179615 by ravinder.are on Friday 28th of March 2008 07:31:23 AM
Old 03-28-2008
How to find Dependent libraries in ELF file?

Dear group,

I need to load dependent libraries for an application which is in ELF format.please let me know how to parse the ELF file to find dependent libraries.

thnaks in advance,
Ravinder
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script execution dependent upon a file landing in a certain directory

Hi all, I'm looking to write a script that is dependent upon the existence of 2 files each in separate directories. My thought was to do: **psuedo code ** execute script check directory 1 for file1 if file exists then execute script 2 ( checking directory 2 for file 2) else... (3 Replies)
Discussion started by: keladar
3 Replies

2. Linux

editing ELF file

Hello, This is not exactly relevant to Linux kernel but I'm gonna ask any way. Is there any way I can modify a 64-bit ELF object file to make it look like 32-bit ELF object file and link it (using `ld`) with 32-bit ELF file? I tried libelf but was unsuccessful. I had this pretty link... (1 Reply)
Discussion started by: tejuwala
1 Replies

3. UNIX for Advanced & Expert Users

How can i read a non text file in unix - ELF-64 executable object file - IA64

The binary file is ELF-64 executable object file - IA64. How i know that the source is Is there any comamnd in unix i can read these kind of files or use a thirty party software? Thanks for your help (8 Replies)
Discussion started by: alexcol
8 Replies

4. Shell Programming and Scripting

Find programs that are missing libraries.

I had to whip this up, and it seems useful enough to post here. Say you have been cleaning up your filesystem, and you removed a bunch of libraries, or you shuffled around some library directories, and aren't sure if ld.so.conf is correctly setup. You want to sweep through your file system looking... (0 Replies)
Discussion started by: otheus
0 Replies

5. Linux

Reading ELF file Symbol table of C++ program

Folks, I have some program(Test.cpp) as follows, #include<iostream> class Abc { private: int _theVar; public : int printVar(); }; int Abc :: printVar() { _theVar=10; } main() { Abc _t; (0 Replies)
Discussion started by: vinod_chitrali
0 Replies

6. Programming

Reading ELF file Symbol table of C++ program

Folks, I have some program(Test.cpp) as follows, #include<iostream> class Abc { private: int _theVar; public : int printVar(); }; int Abc :: printVar() { _theVar=10; } main() { Abc _t; (2 Replies)
Discussion started by: vinod_chitrali
2 Replies

7. Solaris

Not a Vaild ELF File

Hi Anyone, I have two disks , one is primary and anothe is mirror. I checked my mirror disk , It was fine. After that i booted from my primary disk, did some installations regarding kernel patches. It did not get booted properly. It says ==================== Not a valid... (2 Replies)
Discussion started by: jegaraman
2 Replies

8. Shell Programming and Scripting

Two files one file is dependent and it does not show an output

xxxxx (2 Replies)
Discussion started by: vinayrao
2 Replies

9. Programming

A help to create an ELF file

Hi!!! How do I create a file .ELF? What code should I use, could help me with a simple code or example? I know programming to Windows by important languages but this seems to be more sistematical, and I really don't know how to. (2 Replies)
Discussion started by: linecoder
2 Replies

10. Solaris

Solaris: ldd doesn't find libraries in exported environment variable LD_LIBRARY_PATH

I have given the relevant details below. Why are the libraries in /export/home/builds/pc9x_root/960/build/powrmart/pmbuild/bin/SunOS.64.r are invisible to ldd? %setenv ... (3 Replies)
Discussion started by: old_as_a_fossil
3 Replies
GELF_UPDATE_EHDR(3)					   BSD Library Functions Manual 				       GELF_UPDATE_EHDR(3)

NAME
gelf_update_ehdr, gelf_update_phdr, gelf_update_shdr -- update underlying ELF data structures LIBRARY
ELF Access Library (libelf, -lelf) SYNOPSIS
#include <gelf.h> int gelf_update_ehdr(Elf *elf, GElf_Ehdr *ehdr); int gelf_update_phdr(Elf *elf, int ndx, GElf_Phdr *phdr); int gelf_update_shdr(Elf_Scn *scn, GElf_Shdr *shdr); DESCRIPTION
These functions are used to update ELF data structures on the underlying ELF descriptor. Class-dependent data structures in the underlying ELF descriptor are updated using the data in the class-independent GElf descriptors and the underlying ELF data structures are marked ``dirty''. The conversion process signals an error if the values being copied to the target ELF data structure would exceed representation limits. GElf descriptors are described in gelf(3). Function gelf_update_ehdr() updates the ELF Executable Header with the values in the class-independent executable header ehdr. Function gelf_update_phdr() updates the ELF Program Header structure at index ndx with the values in the class-independent program header phdr. Function gelf_update_shdr() updates the ELF Section Header structure associated with section descriptor scn with the values in argument shdr. RETURN VALUES
These functions return a non-zero integer on success, or zero in case of an error. ERRORS
These functions may fail with the following errors: [ELF_E_ARGUMENT] Arguments elf, ehdr, phdr, scn, or shdr were NULL. [ELF_E_ARGUMENT] Argument elf was not a descriptor for an ELF object. [ELF_E_ARGUMENT] Argument elf had an unsupported ELF class. [ELF_E_ARGUMENT] Argument ndx exceeded the number of entries in the program header table. [ELF_E_ARGUMENT] Section descriptor scn was not associated with an ELF descriptor. [ELF_E_MODE] ELF descriptor elf was not opened for writing or updating. [ELF_E_RESOURCE] An out of memory condition was detected. SEE ALSO
elf(3), elf_flagelf(3), elf_flagphdr(3), elf_flagshdr(3), gelf(3), gelf_getehdr(3), gelf_getphdr(3), gelf_getshdr(3) BSD
August 27, 2006 BSD
All times are GMT -4. The time now is 09:55 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy