Blame view

include/linux/elf.h 1.35 KB
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
1
2
  #ifndef _LINUX_ELF_H
  #define _LINUX_ELF_H
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
3
  #include <asm/elf.h>
607ca46e9   David Howells   UAPI: (Scripted) ...
4
  #include <uapi/linux/elf.h>
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
5

267aed9df   David Howells   UAPI: elf_read_im...
6
7
8
9
10
11
  #ifndef elf_read_implies_exec
    /* Executables for which elf_read_implies_exec() returns TRUE will
       have the READ_IMPLIES_EXEC personality flag set automatically.
       Override in asm/elf.h as needed.  */
  # define elf_read_implies_exec(ex, have_pt_gnu_stack)	0
  #endif
e72837e3e   Al Viro   default SET_PERSO...
12
13
14
15
  #ifndef SET_PERSONALITY
  #define SET_PERSONALITY(ex) \
  	set_personality(PER_LINUX | (current->personality & (~PER_MASK)))
  #endif
267aed9df   David Howells   UAPI: elf_read_im...
16

1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
17
18
19
20
21
  #if ELF_CLASS == ELFCLASS32
  
  extern Elf32_Dyn _DYNAMIC [];
  #define elfhdr		elf32_hdr
  #define elf_phdr	elf32_phdr
8d9032bbe   Daisuke HATAYAMA   elf coredump: add...
22
  #define elf_shdr	elf32_shdr
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
23
  #define elf_note	elf32_note
386d9a7ed   Magnus Damm   [PATCH] elf: Alwa...
24
  #define elf_addr_t	Elf32_Off
1fcccbac8   Daisuke HATAYAMA   elf coredump: rep...
25
  #define Elf_Half	Elf32_Half
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
26
27
28
29
30
31
  
  #else
  
  extern Elf64_Dyn _DYNAMIC [];
  #define elfhdr		elf64_hdr
  #define elf_phdr	elf64_phdr
8d9032bbe   Daisuke HATAYAMA   elf coredump: add...
32
  #define elf_shdr	elf64_shdr
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
33
  #define elf_note	elf64_note
386d9a7ed   Magnus Damm   [PATCH] elf: Alwa...
34
  #define elf_addr_t	Elf64_Off
1fcccbac8   Daisuke HATAYAMA   elf coredump: rep...
35
  #define Elf_Half	Elf64_Half
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
36
37
  
  #endif
e55014923   Michael Ellerman   [POWERPC] spufs: ...
38
  /* Optional callbacks to write extra ELF notes. */
267aed9df   David Howells   UAPI: elf_read_im...
39
  struct file;
cdc3d5627   Al Viro   switch elf_coredu...
40
  struct coredump_params;
267aed9df   David Howells   UAPI: elf_read_im...
41

bf1ab978b   Dwayne Grant McConnell   [POWERPC] coredum...
42
  #ifndef ARCH_HAVE_EXTRA_ELF_NOTES
e55014923   Michael Ellerman   [POWERPC] spufs: ...
43
  static inline int elf_coredump_extra_notes_size(void) { return 0; }
cdc3d5627   Al Viro   switch elf_coredu...
44
  static inline int elf_coredump_extra_notes_write(struct coredump_params *cprm) { return 0; }
e55014923   Michael Ellerman   [POWERPC] spufs: ...
45
46
  #else
  extern int elf_coredump_extra_notes_size(void);
cdc3d5627   Al Viro   switch elf_coredu...
47
  extern int elf_coredump_extra_notes_write(struct coredump_params *cprm);
e55014923   Michael Ellerman   [POWERPC] spufs: ...
48
  #endif
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
49
  #endif /* _LINUX_ELF_H */