|
NAMEelftc_bfd_find_target ,
elftc_bfd_target_byteorder ,
elftc_bfd_target_class ,
elftc_bfd_target_flavor ,
elftc_bfd_target_machine —
binary object descriptor handling
LIBRARYlibrary “libelftc”SYNOPSIS#include <libelftc.h>
struct Elftc_Bfd_Target; Elftc_Bfd_Target *
unsigned int
unsigned int
Elftc_Bfd_Target_Flavor
unsigned int
unsigned int
DESCRIPTIONFunctionelftc_bfd_find_target () locates a binary object
descriptor corresponding to the descriptor name in argument
target_name. Binary object descriptors encapsulate
properties of an object format such as its file representation, ELF class, and
byte endianness.
Known descriptor names and their properties include: Function Function Function
RETURN VALUESFunctionelftc_bfd_find_target () returns a valid pointer
to an opaque binary target descriptor if successful, or NULL in case of an
error.
Function Function Function Function EXAMPLESTo return descriptor information associated with target name “elf64-big” use:struct Elftc_Bfd_Target *t; if ((t = elftc_bfd_find_target("elf64-big")) == NULL) errx(EXIT_FAILURE, "Cannot find target descriptor"); printf("Class: %s\n", elftc_bfd_target_class(t) == ELFCLASS32 ? "ELFCLASS32" : "ELFCLASS64"); printf("Byteorder: %s\n", elftc_bfd_target_byteorder(t) == ELFDATA2LSB ? "LSB" : "MSB"); printf("Flavor: %d\n", elftc_bfd_target_flavor(t)); SEE ALSOelf(3)
Visit the GSP FreeBSD Man Page Interface. |