Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

elf_next(3e) [hpux man page]

elf_next(3E)															      elf_next(3E)

NAME
elf_next - sequential archive member access SYNOPSIS
[flag... ] file... [library] ... DESCRIPTION
and manipulate simple object files and archives. elf is an ELF descriptor previously returned from provides sequential access to the next archive member. That is, having an ELF descriptor, elf, associated with an archive member, prepares the containing archive to access the following member when the program calls After successfully positioning an archive for the next member, returns the value Otherwise, the open file was not an archive, elf was null, or an error occurred, and the return value is In either case, the return value may be passed as an argument to specifying the appropriate action. SEE ALSO
ar(4), elf(3E), elf_begin(3E), elf_getarsym(3E), elf_rand(3E). elf_next(3E)

Check Out this Related Man Page

ELF_RAND(3)						   BSD Library Functions Manual 					       ELF_RAND(3)

NAME
elf_rand -- provide sequential access to the next archive member LIBRARY
ELF Access Library (libelf, -lelf) SYNOPSIS
#include <libelf.h> off_t elf_rand(Elf *archive, off_t offset); DESCRIPTION
The elf_rand() function causes the ELF descriptor archive to be adjusted so that the next call to elf_begin(3) will provide access to the ar- chive member at byte offset offset in the archive. Argument offset is the byte offset from the start of the archive to the beginning of the archive header for the desired member. Archive member offsets may be retrieved using the elf_getarsym(3) function. RETURN VALUES
Function elf_rand() returns offset if successful or zero in case of an error. EXAMPLES
To process all the members of an archive use: off_t off; Elf *archive, *e; ... cmd = ELF_C_READ; archive = elf_begin(fd, cmd, NULL); while ((e = elf_begin(fd, cmd, archive)) != (Elf *) 0) { ... process `e' here ... elf_end(e); off = ...new value...; if (elf_rand(archive, off) != off) { ... process error ... } } elf_end(archive); To rewind an archive, use: Elf *archive; ... if (elf_rand(archive, SARMAG) != SARMAG) { ... error ... } ERRORS
Function elf_rand() may fail with the following errors: [ELF_E_ARGUMENT] Argument archive was null. [ELF_E_ARGUMENT] Argument archive was not a descriptor for an ar(1) archive. [ELF_E_ARCHIVE] Argument offset did not correspond to the start of an archive member header. SEE ALSO
ar(1), elf(3), elf_begin(3), elf_end(3), elf_getarsym(3), elf_next(3), gelf(3) BSD
June 17, 2006 BSD
Man Page

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Getting started with VPS management through UNIX

Hi everybody, I have a VPS account and I have hit my limit for domains to manage through Plesk. I now need to begin administering new domains through UNIX. I've never used UNIX before but do have some experience with command line environments. I was able to connect today (I think). So the next... (1 Reply)
Discussion started by: snarky
1 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. Programming

Help me understand this Makefile

PROGOBJS=lab10.o face.o all: lab10 clean lab10: $(PROGOBJS) gcc -o lab10 $(PROGOBJS) lab10.o: lab10.c face.h gcc -c lab10.c face.o: face.c gcc -c face.c very-clean: clean rm *.*~ lab10 clean: rm *.o I need a bit of help understanding what's going on back here. What does that... (3 Replies)
Discussion started by: MaestroRage
3 Replies

4. AIX

Disabling an ASCI terminal in AIX versions 3 and 4

Hi, I tried to do some research on this subject, but got nothing conclusive. I have the following need: I have different servers with AIX versions 3.2.5 through 4.3.2. Some of them have two ASCI terminals connected. I have a shell script that is executed by a user on the main console... (2 Replies)
Discussion started by: andrei_r20
2 Replies

5. Shell Programming and Scripting

Using awk to split a string

Hey guys, I've been trying to find an answer to this, and I've been reading up on awk as much as possible, but I'm at a loss at the moment. I'll start off by saying I'm trying to learn, so forgive me if I ask questions about your answers. Here is what I'm trying to accomplish. I have a long... (8 Replies)
Discussion started by: ShadowBlade72
8 Replies

6. UNIX for Dummies Questions & Answers

How to pass a parameter to an alias in ksh?

I want to do something like this: alias cd2="cd /data_saves/$(/opt/bin/util/getcustdb -i $@)" Where /opt/bin/util/getcustdb is an inhouse script to lookup customer db name based on a provided id number Then when I use the alias I can cd2 4567 and have it run "/opt/bin/util/getcustdb -i... (3 Replies)
Discussion started by: JourneyRider
3 Replies

7. Shell Programming and Scripting

Inescapable '{' in sed?

Greetings! Well, this next example should be a snap, but, instead, sed is raising yet another bump on my head. Here's the "offending" commandline today:sed -i s'/\$\{HOUSING\}/casing/g' ./some.fileAnd, here's the output:sed: -e expression #1, char 27: Invalid content of \{\}FWIW, I tried... (17 Replies)
Discussion started by: LinQ
17 Replies

8. Solaris

Connectivity to EMC x4 storage

Hi All! I have a two x6270 solaris 10, blade, connected to a EMC x4 storage appliance via fibre. I have little knowledge of veritasfile system, and EMC x4, storage device, but I found out that one DG is in shared mode. I need to split the configuration, to use only one server (blade). The EMC... (1 Reply)
Discussion started by: fretagi
1 Replies

9. Shell Programming and Scripting

Text manipulation with sed/awk in a bash script

Guys, I have a variable in a script that I want to transform to into something else Im hoping you guys can help. It doesn't have to use sed/awk but I figured these would be the simplest. DATE=20160120 I'd like to transform $DATE into "01-20-16" and move it into a new variable called... (8 Replies)
Discussion started by: dendenyc
8 Replies