08-02-2009
If you are rolling your own tool to read an ELF file, the document you need to read is Tool Interface Standard (TIS) Executable and Linking Format (ELF) Specification Version 1.2
10 More Discussions You Might Find Interesting
1. Programming
Hi@all,
I try to compile c code on hpux 11.11 pa-risc 2 with gcc (32bit). I compile with the option -g, so that I get the symbol table, but it is not available. Does someone knows something on this?
thx (2 Replies)
Discussion started by: Dom_Cyrus
2 Replies
2. Programming
hi ,
How to view the contents of a "c" program symbol table information in unix. (1 Reply)
Discussion started by: saravanan_nitt
1 Replies
3. Programming
hello everybody!
I want to read the string table of an object file(which is in ELF format).
I get the sh_name value but i cant find a way to read the value in the string table that this index represent. I program in C.
thanx a lot folks! (3 Replies)
Discussion started by: nicos
3 Replies
4. Linux
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
5. Programming
Hi,
is there any command to see symbol table info.
will it show where its allocating memory for varibales golbals & locals and code.(i mean the segments).
i read there is a section called read only data segment and this is where initialized data such as strings stores.
i have wriiten the... (7 Replies)
Discussion started by: MrUser
7 Replies
6. Shell Programming and Scripting
Hi!
#!/usr/bin/env bash
rm tmpcomm
nc -v -u -l 444 | hexdump -b > tmpcomm
while :
do
read l1 < tmpcomm
read l2 < tmpcomm
read l3 < tmpcomm
read l4 < tmpcomm
# do something
doneI start netcat in the background and listen for an incoming conncetion. All incoming... (1 Reply)
Discussion started by: torax123
1 Replies
7. Shell Programming and Scripting
Hi,
i need a perl script which reads the file, content is given below. and output in new file.
TARGET DRIVE IO1 IO2 IO3 IO4 IO5
------------ --------- --------- --------- --------- ---------
0a.1.8 266 236 ... (3 Replies)
Discussion started by: asak
3 Replies
8. Programming
Hi,
Hopefully someone can help.
We have a process that writes a file using Connect Direct to our local Solaris server and then our C++ program will pick up the file and process it. Unfortunately, because of the size of the file, the C++ program is processing the file before it has finished... (7 Replies)
Discussion started by: chris01010
7 Replies
9. UNIX for Beginners Questions & Answers
I have this code with me but the condition is If any of the mandatory columns are null then entire file will be rejected.
LOAD DATA
infile ' ' #specifies the name of a datafile containing data that you want to load
BADFILE ' ' #specifies the name of... (1 Reply)
Discussion started by: raka123
1 Replies
10. Programming
Hi,
I am a newbie in Linux land, and I have a question about programming parent/child process interaction:
How do I search the value of a symbol in the child process? Is it possible?
I am doing a fork() and execve() to spawn any child possible, and I need something on the parent side to... (12 Replies)
Discussion started by: alphakili
12 Replies
LEARN ABOUT FREEBSD
elf_getshnum
ELF_GETSHNUM(3) BSD Library Functions Manual ELF_GETSHNUM(3)
NAME
elf_getshnum -- return the number of sections in an ELF file
LIBRARY
ELF Access Library (libelf, -lelf)
SYNOPSIS
#include <libelf.h>
int
elf_getshnum(Elf *elf, size_t *shnum);
DESCRIPTION
This function is deprecated. Please use elf_getshdrnum(3) instead.
Function elf_getshnum() retrieves the number of ELF sections associated with descriptor elf and stores it into the location pointed to by
argument shnum.
This routine allows applications to uniformly process both normal ELF objects, and ELF objects that use extended section numbering.
RETURN VALUES
Function elf_getshnum() returns a non-zero value if successful, or zero in case of an error.
ERRORS
Function elf_getshnum() can fail with the following errors:
[ELF_E_ARGUMENT] A NULL value was passed in for argument elf.
[ELF_E_ARGUMENT] Argument elf was not for an ELF file.
[ELF_E_ARGUMENT] Argument elf lacks an ELF Executable header.
SEE ALSO
elf(3), elf32_getehdr(3), elf64_getehdr(3), elf_getident(3), elf_getphdrnum(3), elf_getshdrstrndx(3), gelf(3), gelf_getehdr(3)
BSD
August 5, 2009 BSD