Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

elf_getshnum(3) [freebsd man page]

ELF_GETSHNUM(3) 					   BSD Library Functions Manual 					   ELF_GETSHNUM(3)

NAME
elf_getshnum -- return the number of sections in an ELF file LIBRARY
ELF Access Library (libelf, -lelf) SYNOPSIS
#include <libelf.h> int elf_getshnum(Elf *elf, size_t *shnum); DESCRIPTION
This function is deprecated. Please use elf_getshdrnum(3) instead. Function elf_getshnum() 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_getshnum() returns a non-zero value if successful, or zero in case of an error. ERRORS
Function elf_getshnum() 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 5, 2009 BSD

Check Out this Related Man Page

ELF_GETPHNUM(3) 					   BSD Library Functions Manual 					   ELF_GETPHNUM(3)

NAME
elf_getphnum -- return the number of program headers in an ELF file LIBRARY
ELF Access Library (libelf, -lelf) SYNOPSIS
#include <libelf.h> int elf_getphnum(Elf *elf, size_t *phnum); DESCRIPTION
This function is deprecated. Please use function elf_getphdrnum(3) instead. Function elf_getphnum() 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_getphnum() returns a non-zero value if successful, or zero 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_getphdrnum(3), elf_getshdrnum(3), elf_getshdrstrndx(3), gelf(3), gelf_getehdr(3) BSD
August 5, 2009 BSD
Man Page

3 More Discussions You Might Find Interesting

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

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

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