summaryrefslogtreecommitdiff
path: root/include/asm-um
diff options
context:
space:
mode:
authorPaolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>2005-05-05 16:15:16 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-05 16:36:33 -0700
commit23352fc252495fdc072b3bd29f57c4c6b7a6bd83 (patch)
tree6d8bbac7d5512e7a984551f39d3922410ba53455 /include/asm-um
parentf7fe8781749bf2de2ca03147a1691244a7d93ec7 (diff)
downloadlinux-3.10-23352fc252495fdc072b3bd29f57c4c6b7a6bd83.tar.gz
linux-3.10-23352fc252495fdc072b3bd29f57c4c6b7a6bd83.tar.bz2
linux-3.10-23352fc252495fdc072b3bd29f57c4c6b7a6bd83.zip
[PATCH] uml: kludgy compilation fixes for x86-64 subarch modules support
These are some trivial fixes for the x86-64 subarch module support. The only potential problem is that I have to modify arch/x86_64/kernel/module.c, to avoid copying the whole of it. I can't use it verbatim because it depends on a special vmalloc-like area for modules, which for now (maybe that's to fix, I guess not) UML/x86-64 has not. I went the easy way and reused the i386 vmalloc()-based allocator. Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Acked-by: Andi Kleen <ak@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/asm-um')
-rw-r--r--include/asm-um/elf.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/include/asm-um/elf.h b/include/asm-um/elf.h
index 7908f8fe823..d41112bfb29 100644
--- a/include/asm-um/elf.h
+++ b/include/asm-um/elf.h
@@ -21,6 +21,8 @@ extern long elf_aux_hwcap;
#define USE_ELF_CORE_DUMP
+#if defined(CONFIG_UML_X86) && !defined(CONFIG_64BIT)
+
#define R_386_NONE 0
#define R_386_32 1
#define R_386_PC32 2
@@ -34,4 +36,29 @@ extern long elf_aux_hwcap;
#define R_386_GOTPC 10
#define R_386_NUM 11
+#elif defined(CONFIG_UML_X86) && defined(CONFIG_64BIT)
+
+/* x86-64 relocation types */
+#define R_X86_64_NONE 0 /* No reloc */
+#define R_X86_64_64 1 /* Direct 64 bit */
+#define R_X86_64_PC32 2 /* PC relative 32 bit signed */
+#define R_X86_64_GOT32 3 /* 32 bit GOT entry */
+#define R_X86_64_PLT32 4 /* 32 bit PLT address */
+#define R_X86_64_COPY 5 /* Copy symbol at runtime */
+#define R_X86_64_GLOB_DAT 6 /* Create GOT entry */
+#define R_X86_64_JUMP_SLOT 7 /* Create PLT entry */
+#define R_X86_64_RELATIVE 8 /* Adjust by program base */
+#define R_X86_64_GOTPCREL 9 /* 32 bit signed pc relative
+ offset to GOT */
+#define R_X86_64_32 10 /* Direct 32 bit zero extended */
+#define R_X86_64_32S 11 /* Direct 32 bit sign extended */
+#define R_X86_64_16 12 /* Direct 16 bit zero extended */
+#define R_X86_64_PC16 13 /* 16 bit sign extended pc relative */
+#define R_X86_64_8 14 /* Direct 8 bit sign extended */
+#define R_X86_64_PC8 15 /* 8 bit sign extended pc relative */
+
+#define R_X86_64_NUM 16
+
+#endif
+
#endif