Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

elf_getshnum(3) [netbsd 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
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_getshstrndx(3), gelf(3), gelf_getehdr(3) BSD
October 31, 2006 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
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_getshnum(3), elf_getshstrndx(3), gelf(3), gelf_getehdr(3) BSD
December 16, 2006 BSD
Man Page

6 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. Programming

A help to create an ELF file

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

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