summaryrefslogtreecommitdiff
path: root/kernel-small_fixes.patch
diff options
context:
space:
mode:
authorArkadiusz Miśkiewicz2017-11-13 08:39:29 (GMT)
committerArkadiusz Miśkiewicz2017-11-13 08:39:29 (GMT)
commit778e721c1a2eedb28312242b051a31c1f21ebce4 (patch)
treea807fa271a6fbd92562be86082dd9bf909743403 /kernel-small_fixes.patch
parent706a6dde7ed957c7071d10aa9df3f253ee1abf52 (diff)
downloadkernel-778e721c1a2eedb28312242b051a31c1f21ebce4.zip
kernel-778e721c1a2eedb28312242b051a31c1f21ebce4.tar.gz
- fix orc_dump build on x32
Diffstat (limited to 'kernel-small_fixes.patch')
-rw-r--r--kernel-small_fixes.patch44
1 files changed, 44 insertions, 0 deletions
diff --git a/kernel-small_fixes.patch b/kernel-small_fixes.patch
index 28517b8..81d01fa 100644
--- a/kernel-small_fixes.patch
+++ b/kernel-small_fixes.patch
@@ -27,3 +27,47 @@
fi
done
+; kernel-orc.patch
+Index: linux-2.6/tools/objtool/orc_dump.c
+===================================================================
+--- linux-2.6.orig/tools/objtool/orc_dump.c
++++ linux-2.6/tools/objtool/orc_dump.c
+@@ -76,7 +76,8 @@ int orc_dump(const char *_objname)
+ int fd, nr_entries, i, *orc_ip = NULL, orc_size = 0;
+ struct orc_entry *orc = NULL;
+ char *name;
+- unsigned long nr_sections, orc_ip_addr = 0;
++ size_t nr_sections;
++ Elf64_Addr orc_ip_addr = 0;
+ size_t shstrtab_idx;
+ Elf *elf;
+ Elf_Scn *scn;
+@@ -187,10 +188,10 @@ int orc_dump(const char *_objname)
+ return -1;
+ }
+
+- printf("%s+%lx:", name, rela.r_addend);
++ printf("%s+%llx:", name, (unsigned long long)rela.r_addend);
+
+ } else {
+- printf("%lx:", orc_ip_addr + (i * sizeof(int)) + orc_ip[i]);
++ printf("%llx:", (unsigned long long)(orc_ip_addr + (i * sizeof(int)) + orc_ip[i]));
+ }
+
+
+Index: linux-2.6/tools/objtool/Makefile
+===================================================================
+--- linux-2.6.orig/tools/objtool/Makefile
++++ linux-2.6/tools/objtool/Makefile
+@@ -7,8 +7,9 @@ ARCH := x86
+ endif
+
+ # always use the host compiler
+-CC = gcc
+-LD = ld
++CC = $(HOSTCC)
++HOSTLD ?= ld
++LD = $(HOSTLD)
+ AR = ar
+
+ ifeq ($(srctree),)