ELF_GETSHDRNUM(3) BSD Library Functions Manual ELF_GETSHDRNUM(3)NAME
elf_getshdrnum -- return the number of sections in an ELF file
LIBRARY
ELF Access Library (libelf, -lelf)
SYNOPSIS
#include <libelf.h>
int
elf_getshdrnum(Elf *elf, size_t *shnum);
DESCRIPTION
Function elf_getshdrnum() 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_getshdrnum() returns zero value if successful, or -1 in case of an error.
ERRORS
Function elf_getshdrnum() 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 4, 2009 BSD
Check Out this Related Man Page
ELF_GETPHDRNUM(3) BSD Library Functions Manual ELF_GETPHDRNUM(3)NAME
elf_getphdrnum -- return the number of program headers in an ELF file
LIBRARY
ELF Access Library (libelf, -lelf)
SYNOPSIS
#include <libelf.h>
int
elf_getphdrnum(Elf *elf, size_t *phnum);
DESCRIPTION
Function elf_getphdrnum() retrieves the number of ELF program headers associated with descriptor elf and stores it into the location pointed
to by argument phnum.
This routine allows applications to uniformly process both normal ELF objects and ELF objects that use extended numbering.
RETURN VALUES
Function elf_getphdrnum() returns a zero value if successful, or -1 in case of an error.
ERRORS
Function elf_getphnum() 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.
[ELF_E_HEADER] The ELF Executable Header associated with argument elf was corrupt.
[ELF_E_SECTION] The section header at index SHN_UNDEF was corrupt.
SEE ALSO elf(3), elf32_getehdr(3), elf64_getehdr(3), elf_getident(3), elf_getshdrnum(3), elf_getshdrstrndx(3), gelf(3), gelf_getehdr(3)BSD August 5, 2009 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)
Hello,
This is not exactly relevant to Linux kernel but I'm gonna ask any way.
Is there any way I can modify a 64-bit ELF object file to make it look like 32-bit ELF object file and link it (using `ld`) with 32-bit ELF file?
I tried libelf but was unsuccessful. I had this pretty link... (1 Reply)
Dear Group,
I want to prepare an ELF file which can be downloaded dynamically to any address in the moemory and executes as a new task/thread/process.
1) for this what are all the compileation, linker options while building the ELF file?
2) which parts of ELF file has to modified while... (1 Reply)
Discussion started by: ravinder.are
1 Replies
4. Post Here to Contact Site Administrators and Moderators
Hi,
Today, I've submitted a new tread in "Shell Programming and Scripting" forum, with title "-bash: ELF: command not found ". However, this thread has disappear.
Can somebody give me an explanation?
Regards. (3 Replies)
I have a script file that file type is
ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs)
Now I want to get the contents of this file. How can I ?
Any help me to get cotents of this file type? (2 Replies)