--- a/init/Kconfig
+++ b/init/Kconfig
-@@ -1447,6 +1447,17 @@ config SYSCTL_ARCH_UNALIGN_ALLOW
+@@ -1481,6 +1481,17 @@ config SYSCTL_ARCH_UNALIGN_ALLOW
the unaligned access emulation.
see arch/parisc/kernel/unaligned.c for reference
--- a/kernel/kallsyms.c
+++ b/kernel/kallsyms.c
-@@ -80,6 +80,11 @@ static unsigned int kallsyms_expand_symb
+@@ -69,6 +69,11 @@ static unsigned int kallsyms_expand_symb
* For every byte on the compressed symbol data, copy the table
* entry for that byte.
*/
while (len) {
tptr = &kallsyms_token_table[kallsyms_token_index[*data]];
data++;
-@@ -112,6 +117,9 @@ tail:
+@@ -101,6 +106,9 @@ tail:
*/
static char kallsyms_get_symbol_type(unsigned int off)
{
* and return the first char from this token.
--- a/scripts/kallsyms.c
+++ b/scripts/kallsyms.c
-@@ -58,6 +58,7 @@ static struct addr_range percpu_range =
+@@ -77,6 +77,7 @@ static struct addr_range percpu_range =
static struct sym_entry **table;
static unsigned int table_size, table_cnt;
static int all_symbols;
+static int uncompressed;
static int absolute_percpu;
static int base_relative;
-
-@@ -486,6 +487,9 @@ static void write_src(void)
-
- free(markers);
+ static int lto_clang;
+@@ -605,6 +606,9 @@ static void write_src(void)
+ printf("\t.long\t%u\n", table[i]->seq);
+ printf("\n");
+ if (uncompressed)
+ return;
output_label("kallsyms_token_table");
off = 0;
for (i = 0; i < 256; i++) {
-@@ -537,6 +541,9 @@ static unsigned char *find_token(unsigne
+@@ -656,6 +660,9 @@ static unsigned char *find_token(unsigne
{
int i;
for (i = 0; i < len - 1; i++) {
if (str[i] == token[0] && str[i+1] == token[1])
return &str[i];
-@@ -609,6 +616,9 @@ static void optimize_result(void)
+@@ -728,6 +735,9 @@ static void optimize_result(void)
{
int i, best;
/* using the '\0' symbol last allows compress_symbols to use standard
* fast string functions */
for (i = 255; i >= 0; i--) {
-@@ -773,6 +783,7 @@ int main(int argc, char **argv)
- {"all-symbols", no_argument, &all_symbols, 1},
+@@ -889,6 +899,7 @@ int main(int argc, char **argv)
{"absolute-percpu", no_argument, &absolute_percpu, 1},
{"base-relative", no_argument, &base_relative, 1},
+ {"lto-clang", no_argument, <o_clang, 1},
+ {"uncompressed", no_argument, &uncompressed, 1},
{},
};
--- a/scripts/link-vmlinux.sh
+++ b/scripts/link-vmlinux.sh
-@@ -266,6 +266,10 @@ kallsyms()
- kallsymopt="${kallsymopt} --base-relative"
+@@ -160,6 +160,10 @@ kallsyms()
+ kallsymopt="${kallsymopt} --lto-clang"
fi
+ if is_enabled CONFIG_KALLSYMS_UNCOMPRESSED; then
+ fi
+
info KSYMS ${2}
- ${NM} -n ${1} | scripts/kallsyms ${kallsymopt} > ${2}
+ scripts/kallsyms ${kallsymopt} ${1} > ${2}
}