| ELF_CNTL(3) | Library Functions Manual | ELF_CNTL(3) | 
elf_cntl —
#include <libelf.h>
int
  
  elf_cntl(Elf
    *elf, Elf_Cmd
  cmd);
elf_cntl() controls the ELF library's
  subsequent use of the file descriptor used to create ELF descriptor
  elf.
Argument cmd informs the library of the action to be taken:
ELF_C_FDDONEELF_C_WRITE or
      ELF_C_RDWR subsequent
      elf_update() operations on the descriptor will
      fail.ELF_C_FDREADELF_C_FDDONE.Argument elf must be an ELF descriptor associated with a file system object (e.g., an ar(1) archive, an ELF file, or other data file).
ELF_C_READ mode.
elf_cntl() returns 0 on success, or -1 if an
  error was detected.
ELF_E_ARCHIVE]ELF_E_ARGUMENT]NULL.ELF_E_ARGUMENT]ELF_E_MODE]ELF_C_FDREAD operation was requested on an ELF
      descriptor opened for writing.| August 9, 2006 | NetBSD 10.0 |