Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
modpost.h File Reference
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/mman.h>
#include <fcntl.h>
#include <unistd.h>
#include <elf.h>
#include "elfconfig.h"

Go to the source code of this file.

Data Structures

struct  _Elf64_Mips_R_Info
 
union  _Elf64_Mips_R_Info_union
 
struct  buffer
 
struct  module
 
struct  elf_info
 

Macros

#define Elf_Ehdr   Elf32_Ehdr
 
#define Elf_Shdr   Elf32_Shdr
 
#define Elf_Sym   Elf32_Sym
 
#define Elf_Addr   Elf32_Addr
 
#define Elf_Sword   Elf64_Sword
 
#define Elf_Section   Elf32_Half
 
#define ELF_ST_BIND   ELF32_ST_BIND
 
#define ELF_ST_TYPE   ELF32_ST_TYPE
 
#define Elf_Rel   Elf32_Rel
 
#define Elf_Rela   Elf32_Rela
 
#define ELF_R_SYM   ELF32_R_SYM
 
#define ELF_R_TYPE   ELF32_R_TYPE
 
#define ELF64_MIPS_R_SYM(i)   ((__extension__ (_Elf64_Mips_R_Info_union)(i)).r_info_fields.r_sym)
 
#define ELF64_MIPS_R_TYPE(i)   ((__extension__ (_Elf64_Mips_R_Info_union)(i)).r_info_fields.r_type1)
 
#define TO_NATIVE(x)   (x)
 
#define NOFAIL(ptr)   do_nofail((ptr), #ptr)
 
#define SPECIAL(i)   ((i) - (SHN_HIRESERVE + 1))
 

Functions

voiddo_nofail (void *ptr, const char *expr)
 
void __attribute__ ((format(printf, 2, 3))) buf_printf(struct buffer *buf
 
void const char void buf_write (struct buffer *buf, const char *s, int len)
 
void handle_moddevtable (struct module *mod, struct elf_info *info, Elf_Sym *sym, const char *symname)
 
void add_moddevtable (struct buffer *buf, struct module *mod)
 
void maybe_frob_rcs_version (const char *modfilename, char *version, void *modinfo, unsigned long modinfo_offset)
 
void get_src_version (const char *modname, char sum[], unsigned sumlen)
 
voidgrab_file (const char *filename, unsigned long *size)
 
charget_next_line (unsigned long *pos, void *file, unsigned long size)
 
void release_file (void *file, unsigned long size)
 
void fatal (const char *fmt,...)
 
void warn (const char *fmt,...)
 
void merror (const char *fmt,...)
 

Variables

void const charfmt
 
unsigned int cross_build
 

Macro Definition Documentation

#define ELF64_MIPS_R_SYM (   i)    ((__extension__ (_Elf64_Mips_R_Info_union)(i)).r_info_fields.r_sym)

Definition at line 62 of file modpost.h.

#define ELF64_MIPS_R_TYPE (   i)    ((__extension__ (_Elf64_Mips_R_Info_union)(i)).r_info_fields.r_type1)

Definition at line 65 of file modpost.h.

#define Elf_Addr   Elf32_Addr

Definition at line 19 of file modpost.h.

#define Elf_Ehdr   Elf32_Ehdr

Definition at line 16 of file modpost.h.

#define ELF_R_SYM   ELF32_R_SYM

Definition at line 27 of file modpost.h.

#define ELF_R_TYPE   ELF32_R_TYPE

Definition at line 28 of file modpost.h.

#define Elf_Rel   Elf32_Rel

Definition at line 25 of file modpost.h.

#define Elf_Rela   Elf32_Rela

Definition at line 26 of file modpost.h.

#define Elf_Section   Elf32_Half

Definition at line 21 of file modpost.h.

#define Elf_Shdr   Elf32_Shdr

Definition at line 17 of file modpost.h.

#define ELF_ST_BIND   ELF32_ST_BIND

Definition at line 22 of file modpost.h.

#define ELF_ST_TYPE   ELF32_ST_TYPE

Definition at line 23 of file modpost.h.

#define Elf_Sword   Elf64_Sword

Definition at line 20 of file modpost.h.

#define Elf_Sym   Elf32_Sym

Definition at line 18 of file modpost.h.

#define NOFAIL (   ptr)    do_nofail((ptr), #ptr)

Definition at line 90 of file modpost.h.

#define SPECIAL (   i)    ((i) - (SHN_HIRESERVE + 1))

Definition at line 154 of file modpost.h.

#define TO_NATIVE (   x)    (x)

Definition at line 86 of file modpost.h.

Function Documentation

void __attribute__ ( (format(printf, 2, 3))  )
void add_moddevtable ( struct buffer buf,
struct module mod 
)

Definition at line 1173 of file file2alias.c.

void const char void buf_write ( struct buffer buf,
const char s,
int  len 
)

Definition at line 1786 of file modpost.c.

void* do_nofail ( void ptr,
const char expr 
)

Definition at line 102 of file modpost.c.

void fatal ( const char fmt,
  ... 
)

Definition at line 53 of file modpost.c.

char* get_next_line ( unsigned long pos,
void file,
unsigned long  size 
)

Return a copy of the next line in a mmap'ed file. spaces in the beginning of the line is trimmed away. Return a pointer to a static buffer.

Definition at line 364 of file modpost.c.

void get_src_version ( const char modname,
char  sum[],
unsigned  sumlen 
)

Definition at line 400 of file sumversion.c.

void* grab_file ( const char filename,
unsigned long size 
)

Definition at line 337 of file modpost.c.

void handle_moddevtable ( struct module mod,
struct elf_info info,
Elf_Sym sym,
const char symname 
)

Definition at line 1112 of file file2alias.c.

void maybe_frob_rcs_version ( const char modfilename,
char version,
void modinfo,
unsigned long  modinfo_offset 
)

Definition at line 512 of file sumversion.c.

void merror ( const char fmt,
  ... 
)

Definition at line 77 of file modpost.c.

void release_file ( void file,
unsigned long  size 
)

Definition at line 393 of file modpost.c.

void warn ( const char fmt,
  ... 
)

Definition at line 66 of file modpost.c.

Variable Documentation

unsigned int cross_build

Definition at line 119 of file file2alias.c.

void const char* fmt

Definition at line 100 of file modpost.h.