Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

elf_getshdrnum(3) [freebsd man page]

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
Man Page

5 More Discussions You Might Find Interesting

1. Linux

PS Command Field

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)
Discussion started by: akuma
2 Replies

2. Linux

editing ELF file

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)
Discussion started by: tejuwala
1 Replies

3. UNIX for Advanced & Expert Users

Dynamic Downloading and executing of ELF files

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

What's happens with my thread about "-bash: ELF: command not found "?

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)
Discussion started by: Sonia_
3 Replies

5. Shell Programming and Scripting

Need get content of ELF shell script

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)
Discussion started by: karthickk02
2 Replies