aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/elf.h26
-rw-r--r--include/linux/elfcore.h1
2 files changed, 26 insertions, 1 deletions
diff --git a/include/linux/elf.h b/include/linux/elf.h
index ccde3fd45f36..597858418051 100644
--- a/include/linux/elf.h
+++ b/include/linux/elf.h
@@ -50,6 +50,28 @@ typedef __s64 Elf64_Sxword;
50 50
51#define PT_GNU_STACK (PT_LOOS + 0x474e551) 51#define PT_GNU_STACK (PT_LOOS + 0x474e551)
52 52
53/*
54 * Extended Numbering
55 *
56 * If the real number of program header table entries is larger than
57 * or equal to PN_XNUM(0xffff), it is set to sh_info field of the
58 * section header at index 0, and PN_XNUM is set to e_phnum
59 * field. Otherwise, the section header at index 0 is zero
60 * initialized, if it exists.
61 *
62 * Specifications are available in:
63 *
64 * - Sun microsystems: Linker and Libraries.
65 * Part No: 817-1984-17, September 2008.
66 * URL: http://docs.sun.com/app/docs/doc/817-1984
67 *
68 * - System V ABI AMD64 Architecture Processor Supplement
69 * Draft Version 0.99.,
70 * May 11, 2009.
71 * URL: http://www.x86-64.org/
72 */
73#define PN_XNUM 0xffff
74
53/* These constants define the different elf file types */ 75/* These constants define the different elf file types */
54#define ET_NONE 0 76#define ET_NONE 0
55#define ET_REL 1 77#define ET_REL 1
@@ -286,7 +308,7 @@ typedef struct elf64_phdr {
286#define SHN_COMMON 0xfff2 308#define SHN_COMMON 0xfff2
287#define SHN_HIRESERVE 0xffff 309#define SHN_HIRESERVE 0xffff
288 310
289typedef struct { 311typedef struct elf32_shdr {
290 Elf32_Word sh_name; 312 Elf32_Word sh_name;
291 Elf32_Word sh_type; 313 Elf32_Word sh_type;
292 Elf32_Word sh_flags; 314 Elf32_Word sh_flags;
@@ -394,6 +416,7 @@ typedef struct elf64_note {
394extern Elf32_Dyn _DYNAMIC []; 416extern Elf32_Dyn _DYNAMIC [];
395#define elfhdr elf32_hdr 417#define elfhdr elf32_hdr
396#define elf_phdr elf32_phdr 418#define elf_phdr elf32_phdr
419#define elf_shdr elf32_shdr
397#define elf_note elf32_note 420#define elf_note elf32_note
398#define elf_addr_t Elf32_Off 421#define elf_addr_t Elf32_Off
399#define Elf_Half Elf32_Half 422#define Elf_Half Elf32_Half
@@ -403,6 +426,7 @@ extern Elf32_Dyn _DYNAMIC [];
403extern Elf64_Dyn _DYNAMIC []; 426extern Elf64_Dyn _DYNAMIC [];
404#define elfhdr elf64_hdr 427#define elfhdr elf64_hdr
405#define elf_phdr elf64_phdr 428#define elf_phdr elf64_phdr
429#define elf_shdr elf64_shdr
406#define elf_note elf64_note 430#define elf_note elf64_note
407#define elf_addr_t Elf64_Off 431#define elf_addr_t Elf64_Off
408#define Elf_Half Elf64_Half 432#define Elf_Half Elf64_Half
diff --git a/include/linux/elfcore.h b/include/linux/elfcore.h
index cfda74f521b5..e687bc3ba4da 100644
--- a/include/linux/elfcore.h
+++ b/include/linux/elfcore.h
@@ -166,5 +166,6 @@ elf_core_write_extra_phdrs(struct file *file, loff_t offset, size_t *size,
166 unsigned long limit); 166 unsigned long limit);
167extern int 167extern int
168elf_core_write_extra_data(struct file *file, size_t *size, unsigned long limit); 168elf_core_write_extra_data(struct file *file, size_t *size, unsigned long limit);
169extern size_t elf_core_extra_data_size(void);
169 170
170#endif /* _LINUX_ELFCORE_H */ 171#endif /* _LINUX_ELFCORE_H */