diff options
author | Hauke Mehrtens <hauke@openwrt.org> | 2014-09-08 19:55:36 +0000 |
---|---|---|
committer | Hauke Mehrtens <hauke@openwrt.org> | 2014-09-08 19:55:36 +0000 |
commit | b36f776369b11beba6711a014528a3fb62a2d887 (patch) | |
tree | 3fd4e9cde81de3736205474e7eddc43a2cd32a8a /target/linux/generic/patches-3.9/203-kallsyms_uncompressed.patch | |
parent | 2f47b07c14e4f9e6182a0943ccbc85a7c28997bd (diff) | |
download | master-187ad058-b36f776369b11beba6711a014528a3fb62a2d887.tar.gz master-187ad058-b36f776369b11beba6711a014528a3fb62a2d887.tar.bz2 master-187ad058-b36f776369b11beba6711a014528a3fb62a2d887.zip |
kernel: drop 3.9 support
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@42452 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/generic/patches-3.9/203-kallsyms_uncompressed.patch')
-rw-r--r-- | target/linux/generic/patches-3.9/203-kallsyms_uncompressed.patch | 108 |
1 files changed, 0 insertions, 108 deletions
diff --git a/target/linux/generic/patches-3.9/203-kallsyms_uncompressed.patch b/target/linux/generic/patches-3.9/203-kallsyms_uncompressed.patch deleted file mode 100644 index 3feca4ffe3..0000000000 --- a/target/linux/generic/patches-3.9/203-kallsyms_uncompressed.patch +++ /dev/null @@ -1,108 +0,0 @@ ---- a/scripts/kallsyms.c -+++ b/scripts/kallsyms.c -@@ -54,6 +54,7 @@ static struct text_range text_ranges[] = - static struct sym_entry *table; - static unsigned int table_size, table_cnt; - static int all_symbols = 0; -+static int uncompressed = 0; - static char symbol_prefix_char = '\0'; - - int token_profit[0x10000]; -@@ -360,6 +361,9 @@ static void write_src(void) - - free(markers); - -+ if (uncompressed) -+ return; -+ - output_label("kallsyms_token_table"); - off = 0; - for (i = 0; i < 256; i++) { -@@ -418,6 +422,9 @@ static void *find_token(unsigned char *s - { - int i; - -+ if (uncompressed) -+ return NULL; -+ - for (i = 0; i < len - 1; i++) { - if (str[i] == token[0] && str[i+1] == token[1]) - return &str[i]; -@@ -490,6 +497,9 @@ static void optimize_result(void) - { - int i, best; - -+ if (uncompressed) -+ return; -+ - /* using the '\0' symbol last allows compress_symbols to use standard - * fast string functions */ - for (i = 255; i >= 0; i--) { -@@ -646,7 +656,9 @@ int main(int argc, char **argv) - if ((*p == '"' && *(p+2) == '"') || (*p == '\'' && *(p+2) == '\'')) - p++; - symbol_prefix_char = *p; -- } else -+ } else if (strcmp(argv[i], "--uncompressed") == 0) -+ uncompressed = 1; -+ else - usage(); - } - } else if (argc != 1) ---- a/init/Kconfig -+++ b/init/Kconfig -@@ -1259,6 +1259,17 @@ config KALLSYMS_ALL - - Say N unless you really need all symbols. - -+config KALLSYMS_UNCOMPRESSED -+ bool "Keep kallsyms uncompressed" -+ depends on KALLSYMS -+ help -+ Normally kallsyms contains compressed symbols (using a token table), -+ reducing the uncompressed kernel image size. Keeping the symbol table -+ uncompressed significantly improves the size of this part in compressed -+ kernel images. -+ -+ Say N unless you need compressed kernel images to be small. -+ - config HOTPLUG - def_bool y - ---- a/scripts/link-vmlinux.sh -+++ b/scripts/link-vmlinux.sh -@@ -83,6 +83,10 @@ kallsyms() - kallsymopt="${kallsymopt} --all-symbols" - fi - -+ if [ -n "${CONFIG_KALLSYMS_UNCOMPRESSED}" ]; then -+ kallsymopt="${kallsymopt} --uncompressed" -+ fi -+ - local aflags="${KBUILD_AFLAGS} ${KBUILD_AFLAGS_KERNEL} \ - ${NOSTDINC_FLAGS} ${LINUXINCLUDE} ${KBUILD_CPPFLAGS}" - ---- a/kernel/kallsyms.c -+++ b/kernel/kallsyms.c -@@ -106,6 +106,11 @@ static unsigned int kallsyms_expand_symb - * For every byte on the compressed symbol data, copy the table - * entry for that byte. - */ -+#ifdef CONFIG_KALLSYMS_UNCOMPRESSED -+ memcpy(result, data + 1, len - 1); -+ result += len - 1; -+ len = 0; -+#endif - while (len) { - tptr = &kallsyms_token_table[kallsyms_token_index[*data]]; - data++; -@@ -133,6 +138,9 @@ static unsigned int kallsyms_expand_symb - */ - static char kallsyms_get_symbol_type(unsigned int off) - { -+#ifdef CONFIG_KALLSYMS_UNCOMPRESSED -+ return kallsyms_names[off + 1]; -+#endif - /* - * Get just the first code, look it up in the token table, - * and return the first char from this token. |