Sponsored Content
Full Discussion: ELF-string table
Top Forums Programming ELF-string table Post 302280664 by jim mcnamara on Tuesday 27th of January 2009 11:02:50 AM
Old 01-27-2009
check out libelf here
libelf - Free Software Directory - Free Software Foundation

libbfd may already be on your system - it is fairly complex - but you can download & install it - there are versions for most systems.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Running elf files

I have a few questions about elf files and how they are executed. When gcc compiles a elf file it creates an executable. Is this executable then run directly by the hardware or does the kernel get involved, interpret the elf file and place the asm code directly in memory. Cheers (0 Replies)
Discussion started by: mshindo
0 Replies

2. Programming

Editing or Adding to ELF string tables

Is it possible to add - or edit - data (the strings) contained within the string table of an ELF executable? I know I can access the string table with the following code; while ((scn = elf_nextscn(m_elf, scn)) != 0) { char *name = 0; gelf_getshdr(scn, &shdr); ... (9 Replies)
Discussion started by: Dhodder
9 Replies

3. Shell Programming and Scripting

Search, replace string in file1 with string from (lookup table) file2?

Hello: I have another question. Please consider the following two sample, tab-delimited files: File_1: Abf1 YKL112w Abf1 YAL054c Abf1 YGL234w Ace2 YKL150w Ace2 YNL328c Cup9 YDR441c Cup9 YDR442w Cup9 YEL040w ... File 2: ... ABF1 YKL112W ACE2 YLR131C (9 Replies)
Discussion started by: gstuart
9 Replies

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

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

6. UNIX for Dummies Questions & Answers

string replacement using a lookup table

Dear all thanks for helping in advance.. Know this should be fairly simple but I failed in searching for an answer. I have a file (replacement table) containing two columns, e.g.: ACICJ ACIDIPHILIUM ACIF2 ACIDITHIOBACILLUS ACIF5 ACIDITHIOBACILLUS ACIC5 ACIDOBACTERIUM ACIC1 ACIDOTHERMUS... (10 Replies)
Discussion started by: roussine
10 Replies

7. Shell Programming and Scripting

How can we create a string table in bash shell ?

Hello, How can we write the pseudo code below using Bash shell scripting? table = ; i=0; do{ grep table h.txt; }while(i<3); or table = ; i=0; for(i=0;i<3;i++) grep table h.txt; (4 Replies)
Discussion started by: dbgork
4 Replies

8. BSD

DG/UX ELF binary support

Anyone, perhaps got DG/UX ELF binaries running on an old *BSD system? I've tried a lot of different kinds, with COMPAT_SVR4 compiled in and ibcs support, all ended up with Segement Fault or Bus Error errors. (2 Replies)
Discussion started by: dgux
2 Replies

9. Shell Programming and Scripting

ps -elf AND grep for changes

Hoping theres something already out there like this. I have a list of proccesses who's "ps -elf" (field 10) values I need to continuously monitor and if the values of field 10 start to signiciantly increase (double, triple) then do something. The field 10 is the "memory size" field. (these... (4 Replies)
Discussion started by: ajp7701
4 Replies

10. UNIX for Beginners Questions & Answers

Replacing string/special characters using a 'conversion' table

Hi, Does anyone know if there is a script or program available out there that uses a conversion table to replace special characters from a file? I am trying to remove some special characters from a file but there are several unprintable/control characters that some I need to remove but some I... (2 Replies)
Discussion started by: newbie_01
2 Replies
ELF_STRPTR(3)						   BSD Library Functions Manual 					     ELF_STRPTR(3)

NAME
elf_strptr -- retrieve a string pointer in a string table LIBRARY
ELF Access Library (libelf, -lelf) SYNOPSIS
#include <libelf.h> char * elf_strptr(Elf *elf, size_t scndx, size_t stroffset); DESCRIPTION
Function elf_strptr() allows an application to convert a string table offset to a string pointer, correctly translating the offset in the presence of multiple Elf_Data descriptors covering the contents of the section. Argument elf is a descriptor for an ELF object. Argument scndx is the section index for an ELF string table. Argument stroffset is the index of the desired string in the string table. RETURN VALUES
Function elf_strptr() returns a valid pointer on success or NULL in case an error was encountered. ERRORS
[ELF_E_ARGUMENT] Argument elf was NULL [ELF_E_ARGUMENT] Argument elf was not a descriptor for an ELF object. [ELF_E_ARGUMENT] Argument scndx was not the section index for a string table. [ELF_E_ARGUMENT] Argument stroffset exceeded the size of the string table. [ELF_E_ARGUMENT] Argument stroffset index an unallocated region of the string table. [ELF_E_DATA] Offset stroffset indexed a region that was not covered by any Elf_Data descriptor. [ELF_E_DATA] An erroneous Elf_Data descriptor was part of the section specified by argument scndx. [ELF_E_HEADER] ELF descriptor elf contained an invalid section header. [ELF_E_RESOURCE] An out of memory condition was detected. [ELF_E_SECTION] Section scndx contained a malformed section header. [ELF_E_SECTION] The ELF descriptor in argument elf did not adhere to the conventions used for extended numbering. SEE ALSO
elf(3), elf32_getshdr(3), elf64_getshdr(3), elf_getdata(3), elf_rawdata(3), gelf(3), gelf_getshdr(3) BSD
December 16, 2006 BSD
All times are GMT -4. The time now is 04:02 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy