Back to index

glibc  2.9
Defines | Functions
readelflib.c File Reference
#include "elf/readelflib.c"

Go to the source code of this file.

Defines

#define process_elf_file   process_elf32_file
#define __ELF_NATIVE_CLASS   32
#define process_elf_file   process_elf64_file
#define __ELF_NATIVE_CLASS   64

Functions

int process_elf32_file (const char *file_name, const char *lib, int *flag, unsigned int *osversion, char **soname, void *file_contents, size_t file_length)
int process_elf64_file (const char *file_name, const char *lib, int *flag, unsigned int *osversion, char **soname, void *file_contents, size_t file_length)
int process_elf_file (const char *file_name, const char *lib, int *flag, unsigned int *osversion, char **soname, void *file_contents, size_t file_length)

Define Documentation

#define __ELF_NATIVE_CLASS   32

Definition at line 61 of file readelflib.c.

#define __ELF_NATIVE_CLASS   64

Definition at line 61 of file readelflib.c.

Definition at line 60 of file readelflib.c.

Definition at line 60 of file readelflib.c.


Function Documentation

int process_elf32_file ( const char *  file_name,
const char *  lib,
int flag,
unsigned int osversion,
char **  soname,
void *  file_contents,
size_t  file_length 
)
int process_elf64_file ( const char *  file_name,
const char *  lib,
int flag,
unsigned int osversion,
char **  soname,
void *  file_contents,
size_t  file_length 
)
int process_elf_file ( const char *  file_name,
const char *  lib,
int flag,
unsigned int osversion,
char **  soname,
void *  file_contents,
size_t  file_length 
)

Definition at line 31 of file readelflib.c.

{
  ElfW(Ehdr) *elf_header = (ElfW(Ehdr) *) file_contents;
  int ret;

  if (elf_header->e_ident [EI_CLASS] == ELFCLASS32)
    return process_elf32_file (file_name, lib, flag, osversion, soname,
                            file_contents, file_length);
  else
    {
      ret = process_elf64_file (file_name, lib, flag, osversion, soname,
                            file_contents, file_length);
      /* Sparc 64bit libraries are always libc.so.6+.  */
      if (!ret)
       *flag = FLAG_SPARC_LIB64|FLAG_ELF_LIBC6;
      return ret;
    }
}

Here is the call graph for this function: