Sponsored Content
Top Forums Programming Listing function exports from object file Post 302141202 by mah on Thursday 18th of October 2007 05:23:21 AM
Old 10-18-2007
You may also try

objdump = show info within object files
readelf = show info within elf files.

Thanks
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

/etc/exports

i have the following entry in /etc/exports which is /opt/hpxt. i am on hpux b11.0.0 questions 1) is /hpxt in the same physical machine? got confused by the meaning of export. (1 Reply)
Discussion started by: yls177
1 Replies

2. 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

3. UNIX for Dummies Questions & Answers

Object reference not set to an instance of an object

I am new to PHP and UNIX. I am using Apache to do my testing on a Windows Vista machine. I am getting this error when I am trying to connect to a web service. I did a search and did not see any posts that pertain to this. Here is my function: <?php function TRECSend($a, $b, $c, $d,... (0 Replies)
Discussion started by: EddiRae
0 Replies

4. AIX

AIX Exports file

Why can I not add more than 1 filesystem to the /etc/exports file and export them via smitty, or command line? I have tried, I stopped the NFS daemons, edited the /etc/exports file by hand, saved it, then re-started NFS, but it only still exports the first line in the exports file. ... (4 Replies)
Discussion started by: mrmurdock
4 Replies

5. Shell Programming and Scripting

How to Call external function in .C or .So (Shared Object)

Hi, Anybody know any way to Call with Shell Script an external function wrote in .C or .So (Shared Object) on AIX enviroment and returning parameters of .C or .SO to Shell Script? Tks!! (6 Replies)
Discussion started by: rdgsantos
6 Replies

6. Programming

question about function object

I have a code as following: #include <iostream> #include <algorithm> #include <list> using namespace std; //the class Nth is a predicates class Nth{ private: int nth; int count; public: Nth(int n):nth(n),count(0){} bool operator()(int){ ... (2 Replies)
Discussion started by: homeboy
2 Replies

7. SCO

Problem with nfs exports between 5.0.5 and 5.0.7

Hello everyone! I have two systems: an old SCO 5.0.5 Openserver (here's the uname -a output): /# uname -a SCO_SV munixela 3.2 5.0.5 i386 And a SCO 5.0.7 OpenServer (uname -a output): /# uname -a SCO_SV catedral 3.2 5.0.7 i386 I exported a Filesystem from the 5.0.7 machine, using the... (13 Replies)
Discussion started by: superchivo
13 Replies

8. Programming

passing object to function, columns class

I am working on a small columns class, since I use allot of tabular data. I am trying to set up code to allow me to efficiently read in tabular data, manipulate it, and write to output files. I more or less know what I need to do, but there are many options to sort through. I have the beginnings... (14 Replies)
Discussion started by: LMHmedchem
14 Replies

9. UNIX for Dummies Questions & Answers

NFS not showing under /etc/fstab nor /etc/exports

Hi guys, I was asked to perform the following: On server usdfslpsap04 following NFS mounts should be disabled usdfslpwmt3:/u01/opt/wm6_data/ebiz_edi/CALIBER_data 50412232 13369544 34481872 28% /u01/opt/wm6_data/ebiz_edi/CALIBER_data usauxoradw:/DWH/Transfer/current... (1 Reply)
Discussion started by: 300zxmuro
1 Replies

10. Programming

How to initialize an object with another object of different class?

How to initialize an object of class say "A", with an object of type say "B". The following code give the error message "error: conversion from âAâ to non-scalar type âBâ requested" #include <iostream> using namespace std; class B; class A{ public: A() { cout <<"\nA()" << endl; } ... (1 Reply)
Discussion started by: techmonk
1 Replies
DL_ITERATE_PHDR(3)					     Linux Programmer's Manual						DL_ITERATE_PHDR(3)

NAME
dl_iterate_phdr - walk through list of shared objects SYNOPSIS
#define _GNU_SOURCE /* See feature_test_macros(7) */ #include <link.h> int dl_iterate_phdr( int (*callback) (struct dl_phdr_info *info, size_t size, void *data), void *data); DESCRIPTION
The dl_iterate_phdr() function allows an application to inquire at run time to find out which shared objects it has loaded. The dl_iterate_phdr() function walks through the list of an application's shared objects and calls the function callback once for each object, until either all shared objects have been processed or callback returns a nonzero value. Each call to callback receives three arguments: info, which is a pointer to a structure containing information about the shared object; size, which is the size of the structure pointed to by info; and data, which is a copy of whatever value was passed by the calling program as the second argument (also named data) in the call to dl_iterate_phdr(). The info argument is a structure of the following type: struct dl_phdr_info { ElfW(Addr) dlpi_addr; /* Base address of object */ const char *dlpi_name; /* (Null-terminated) name of object */ const ElfW(Phdr) *dlpi_phdr; /* Pointer to array of ELF program headers for this object */ ElfW(Half) dlpi_phnum; /* # of items in dlpi_phdr */ }; (The ElfW() macro definition turns its argument into the name of an ELF data type suitable for the hardware architecture. For example, on a 32-bit platform, ElfW(Addr) yields the data type name Elf32_Addr. Further information on these types can be found in the <elf.h> and <link.h> header files.) The dlpi_addr field indicates the base address of the shared object (i.e., the difference between the virtual memory address of the shared object and the offset of that object in the file from which it was loaded). The dlpi_name field is a null-terminated string giving the pathname from which the shared object was loaded. To understand the meaning of the dlpi_phdr and dlpi_phnum fields, we need to be aware that an ELF shared object consists of a number of segments, each of which has a corresponding program header describing the segment. The dlpi_phdr field is a pointer to an array of the program headers for this shared object. The dlpi_phnum field indicates the size of this array. These program headers are structures of the following form: typedef struct { Elf32_Word p_type; /* Segment type */ Elf32_Off p_offset; /* Segment file offset */ Elf32_Addr p_vaddr; /* Segment virtual address */ Elf32_Addr p_paddr; /* Segment physical address */ Elf32_Word p_filesz; /* Segment size in file */ Elf32_Word p_memsz; /* Segment size in memory */ Elf32_Word p_flags; /* Segment flags */ Elf32_Word p_align; /* Segment alignment */ } Elf32_Phdr; Note that we can calculate the location of a particular program header, x, in virtual memory using the formula: addr == info->dlpi_addr + info->dlpi_phdr[x].p_vaddr; RETURN VALUE
The dl_iterate_phdr() function returns whatever value was returned by the last call to callback. VERSIONS
dl_iterate_phdr() has been supported in glibc since version 2.2.4. CONFORMING TO
The dl_iterate_phdr() function is Linux-specific and should be avoided in portable applications. EXAMPLE
The following program displays a list of pathnames of the shared objects it has loaded. For each shared object, the program lists the vir- tual addresses at which the object's ELF segments are loaded. #define _GNU_SOURCE #include <link.h> #include <stdlib.h> #include <stdio.h> static int callback(struct dl_phdr_info *info, size_t size, void *data) { int j; printf("name=%s (%d segments) ", info->dlpi_name, info->dlpi_phnum); for (j = 0; j < info->dlpi_phnum; j++) printf(" header %2d: address=%10p ", j, (void *) (info->dlpi_addr + info->dlpi_phdr[j].p_vaddr)); return 0; } int main(int argc, char *argv[]) { dl_iterate_phdr(callback, NULL); exit(EXIT_SUCCESS); } SEE ALSO
ldd(1), objdump(1), readelf(1), dlopen(3), elf(5), ld.so(8) Executable and Linking Format Specification, available at various locations online. COLOPHON
This page is part of release 3.44 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/. GNU
2007-05-18 DL_ITERATE_PHDR(3)
All times are GMT -4. The time now is 11:14 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy