diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-04-30 08:37:24 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-04-30 08:37:24 -0700 |
commit | 01c7cd0ef5d98fdd007d8a04c9f834bead6e5ee1 (patch) | |
tree | 6428c9dcaca3331456f1679afb97fc233655f93d /arch/x86/tools/relocs.h | |
parent | 39b2f8656e2af4d5d490ce6e33e4ba229cda3e33 (diff) | |
parent | c889ba801dc3b3a0155fa77d567f2c3a6097de1c (diff) | |
download | kernel_goldelico_gta04-01c7cd0ef5d98fdd007d8a04c9f834bead6e5ee1.zip kernel_goldelico_gta04-01c7cd0ef5d98fdd007d8a04c9f834bead6e5ee1.tar.gz kernel_goldelico_gta04-01c7cd0ef5d98fdd007d8a04c9f834bead6e5ee1.tar.bz2 |
Merge branch 'x86-kaslr-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull perparatory x86 kasrl changes from Ingo Molnar:
"This contains changes from the ongoing KASLR work, by Kees Cook.
The main changes are the use of a read-only IDT on x86 (which
decouples the userspace visible virtual IDT address from the physical
address), and a rework of ELF relocation support, in preparation of
random, boot-time kernel image relocation."
* 'x86-kaslr-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86, relocs: Refactor the relocs tool to merge 32- and 64-bit ELF
x86, relocs: Build separate 32/64-bit tools
x86, relocs: Add 64-bit ELF support to relocs tool
x86, relocs: Consolidate processing logic
x86, relocs: Generalize ELF structure names
x86: Use a read-only IDT alias on all CPUs
Diffstat (limited to 'arch/x86/tools/relocs.h')
-rw-r--r-- | arch/x86/tools/relocs.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/arch/x86/tools/relocs.h b/arch/x86/tools/relocs.h new file mode 100644 index 0000000..07cdb1e --- /dev/null +++ b/arch/x86/tools/relocs.h @@ -0,0 +1,36 @@ +#ifndef RELOCS_H +#define RELOCS_H + +#include <stdio.h> +#include <stdarg.h> +#include <stdlib.h> +#include <stdint.h> +#include <inttypes.h> +#include <string.h> +#include <errno.h> +#include <unistd.h> +#include <elf.h> +#include <byteswap.h> +#define USE_BSD +#include <endian.h> +#include <regex.h> +#include <tools/le_byteshift.h> + +void die(char *fmt, ...); + +#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) + +enum symtype { + S_ABS, + S_REL, + S_SEG, + S_LIN, + S_NSYMTYPES +}; + +void process_32(FILE *fp, int use_real_mode, int as_text, + int show_absolute_syms, int show_absolute_relocs); +void process_64(FILE *fp, int use_real_mode, int as_text, + int show_absolute_syms, int show_absolute_relocs); + +#endif /* RELOCS_H */ |