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 70 of file readelflib.c.

#define __ELF_NATIVE_CLASS   64

Definition at line 70 of file readelflib.c.

Definition at line 69 of file readelflib.c.

Definition at line 69 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 
)

Here is the caller graph for this function:

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 
)

Here is the caller graph for this function:

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 33 of file readelflib.c.

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

  if (elf_header->e_ident [EI_CLASS] == ELFCLASS32)
    {
      ret = process_elf32_file (file_name, lib, flag, osversion, soname,
                            file_contents, file_length);

      /* n32 libraries are always libc.so.6+.  */
      if (ret && (elf_header->e_flags & EF_MIPS_ABI2) != 0)
       *flag = FLAG_MIPS64_LIBN32|FLAG_ELF_LIBC6;
    }
  else
    {
      ret = process_elf64_file (file_name, lib, flag, osversion, soname,
                            file_contents, file_length);
      /* n64 libraries are always libc.so.6+.  */
      if (!ret)
       *flag = FLAG_MIPS64_LIBN64|FLAG_ELF_LIBC6;
    }

  return ret;
}

Here is the call graph for this function: