elf64_getphdr man page on IRIX

Man page or keyword search:  
man Server   31559 pages
apropos Keyword Search (all sections)
Output format
IRIX logo
[printable version]



ELF_GETPHDR(3E)						       ELF_GETPHDR(3E)

NAME
     elf_getphdr: elf32_getphdr, elf32_newphdr, elf64_getphdr, elf64_newphdr -
     retrieve class-dependent program header table

SYNOPSIS
     cc [flag ...] file ...  -lelf [library ...]

     #include <libelf.h>
     Elf32_Phdr *elf32_getphdr(Elf *elf);
     Elf32_Phdr *elf32_newphdr(Elf *elf, size_t count);
     Elf64_Phdr *elf64_getphdr(Elf *elf);
     Elf64_Phdr *elf64_newphdr(Elf *elf, size_t count);

DESCRIPTION
     For a 32-bit class file, elf32_getphdr returns a pointer to the program
     execution header table, if one is available for the ELF descriptor elf.

     elf32_newphdr allocates a new table with count entries, regardless of
     whether one existed previously, and sets the ELF_F_DIRTY bit for the
     table [see elf_flag(3E)].	Specifying a zero count deletes an existing
     table.  Note this behavior differs from that of elf32_newehdr [see
     elf32_getehdr(3E)], allowing a program to replace or delete the program
     header table, changing its size if necessary.

     If no program header table exists, the file is not a 32-bit class file,
     an error occurs, or elf is null, both functions return a null pointer.
     Additionally, elf32_newphdr returns a null pointer if count is zero.

     The table is an array of Elf32_Phdr structures, each of which includes
     the following members.

		  Elf32_Word	  p_type;
		  Elf32_Off	  p_offset;
		  Elf32_Addr	  p_vaddr;
		  Elf32_Addr	  p_paddr;
		  Elf32_Word	  p_filesz;
		  Elf32_Word	  p_memsz;
		  Elf32_Word	  p_flags;
		  Elf32_Word	  p_align;

     The ELF header's e_phnum member tells how many entries the program header
     table has [see elf_getehdr(3E)].  A program may inspect this value to
     determine the size of an existing table; elf32_newphdr automatically sets
     the member's value to count.  If the program is building a new file, it
     is responsible for creating the file's ELF header before creating the
     program header table.

     The 64-bit class works identically, simply replacing all instances of 32
     in the description and table with 64.

									Page 1

ELF_GETPHDR(3E)						       ELF_GETPHDR(3E)

SEE ALSO
     elf(3E), elf_begin(3E), elf_flag(3E), elf_getehdr(3E).

									Page 2

[top]

List of man pages available for IRIX

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net