ELF_END(3) BSD Library Functions Manual ELF_END(3)NAME
elf_end -- release an ELF descriptor
LIBRARY
ELF Access Library (libelf, -lelf)
SYNOPSIS
#include <libelf.h>
int
elf_end(Elf *elf);
DESCRIPTION
Function elf_end() is used to release the resources associated with an ELF descriptor pointed to by argument elf. This descriptor must have
been allocated by a previous call to elf_begin(3) or elf_memory(3). For programming convenience, a NULL value is permitted for argument elf.
A call to elf_end() decrements the activation count for descriptor elf by one. The resources associated with the descriptor are only
released with its activation count goes to zero.
Once function elf_end() returns zero, the ELF descriptor elf will no longer be valid and should not be used further.
RETURN VALUES
Function elf_end() returns the current value of the ELF descriptor elf's activation count, or zero if argument elf was NULL.
SEE ALSO elf(3), elf_begin(3), elf_memory(3), gelf(3)BSD June 29, 2006 BSD
Check Out this Related Man Page
ELF_CNTL(3) BSD Library Functions Manual ELF_CNTL(3)NAME
elf_cntl -- control an elf file descriptor
LIBRARY
ELF Access Library (libelf, -lelf)
SYNOPSIS
#include <libelf.h>
int
elf_cntl(Elf *elf, Elf_Cmd cmd);
DESCRIPTION
Function elf_cntl() controls the ELF library's subsequent use of the file descriptor used to create ELF descriptor elf.
Argument cmd informs the library of the action to be taken:
ELF_C_FDDONE This value instructs the ELF library not to perform any further I/O on the file descriptor associated with argument elf. For
ELF descriptors opened with mode ELF_C_WRITE or ELF_C_RDWR subsequent elf_update() operations on the descriptor will fail.
ELF_C_FDREAD This value instructs the ELF library to read in all necessary data associated with ELF descriptor elf into memory so that the
underlying file descriptor can be safely closed with command ELF_C_FDDONE.
Argument elf must be an ELF descriptor associated with a file system object (e.g., an ar(1) archive, an ELF file, or other data file).
IMPLEMENTATION NOTES
Due to use of mmap(2) internally, this function is a no-op for for ELF objects opened in ELF_C_READ mode.
RETURN VALUES
Function elf_cntl() returns 0 on success, or -1 if an error was detected.
ERRORS
[ELF_E_ARCHIVE] Argument elf is a descriptor for an archive member.
[ELF_E_ARGUMENT] Argument elf was NULL.
[ELF_E_ARGUMENT] Argument cmd was not recognized.
[ELF_E_MODE] An ELF_C_FDREAD operation was requested on an ELF descriptor opened for writing.
SEE ALSO elf(3), elf_begin(3), elf_end(3), elf_next(3), elf_update(3), gelf(3)BSD August 9, 2006 BSD
Is there any way to view the full contents of the command field when using ps -elf? I'm running a java process which has 4 lines worth of arguments. When i ps -elf no matter how much cut i use it will only display the first line of the command.
Thanks, (2 Replies)
Hi unixers... I need some help,
I have this command,
ps -elf|grep proadm|awk '{ print $3 "-" $4 "-" $10 }'
column 10 returns a value and I want that in the output only apears lines with values bigger than 500000 in column 10.
How do I do that?
Tkz! (2 Replies)
when i give "ps -elf" or "ps" system gets hung.
if i press "^c" come out from it...
pls help..what should i do to get it resolved.
thanks
CKanth (4 Replies)
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)
Hi Experts,
I got a question..
In the following output of `ps -elf | grep DataFlow` I get:-
242001 A mqsiadm 2076676 1691742 0 60 20 26ad4f400 130164 * May 09 - 3:02 DataFlowEngine EAIDVBR1_BROKER 5e453de8-2001-0000-0080-fd142b9ce8cb VIPS_INQ1 0
242001 A mqsiadm... (5 Replies)
Hello All,
i am porting my application from SunSolaris to Linux (RHEL4).
When i compile my c/c++ code i am getting the following errors.
1. catastrophic error: could not open source file "sys/elf_386.h"
#include <sys/elf_386.h>
2. catastrophic error: could not open source file... (2 Replies)
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)
I am trying to write a script which will only show me the file descriptor count for a process/pid. My script will return me the count only not the whole output. For example, I would like my script to return the output 23 this case, not the whole output.
Can anybody please help me how do I get... (11 Replies)
Hi, I have a c program i compile with gcc4.5. This elf, if I use gdb and put a breakpoint on main, instead has a breakpoint in a function other than main or says no line in file.
I verified the elf is 1 to 1 with source, have all debug symbols for compilation etc.
The problem I think is the... (2 Replies)
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)
Hello all
I want to read program header of a executable without using readelf. I know it can be tough. I will do the programming myself. Just give me a hint of it.
Thanks
---------- Post updated at 05:02 AM ---------- Previous update was at 04:58 AM ----------
basically i want to count... (3 Replies)