kernel: add support for kernel 5.4
[openwrt/staging/wigyori.git] / target / linux / generic / pending-5.4 / 203-kallsyms_uncompressed.patch
index 9230279fcaae6ac42074c97255395b71e695fc19..28fde77cda642c5581d8a80a887f1ae5f7506b15 100644 (file)
@@ -13,7 +13,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 
 --- a/init/Kconfig
 +++ b/init/Kconfig
-@@ -1149,6 +1149,17 @@ config SYSCTL_ARCH_UNALIGN_ALLOW
+@@ -1315,6 +1315,17 @@ config SYSCTL_ARCH_UNALIGN_ALLOW
          the unaligned access emulation.
          see arch/parisc/kernel/unaligned.c for reference
  
@@ -33,7 +33,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  
 --- a/kernel/kallsyms.c
 +++ b/kernel/kallsyms.c
-@@ -74,6 +74,11 @@ static unsigned int kallsyms_expand_symb
+@@ -75,6 +75,11 @@ static unsigned int kallsyms_expand_symb
         * For every byte on the compressed symbol data, copy the table
         * entry for that byte.
         */
@@ -45,7 +45,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
        while (len) {
                tptr = &kallsyms_token_table[kallsyms_token_index[*data]];
                data++;
-@@ -106,6 +111,9 @@ tail:
+@@ -107,6 +112,9 @@ tail:
   */
  static char kallsyms_get_symbol_type(unsigned int off)
  {
@@ -57,7 +57,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
         * and return the first char from this token.
 --- a/scripts/kallsyms.c
 +++ b/scripts/kallsyms.c
-@@ -61,6 +61,7 @@ static struct addr_range percpu_range =
+@@ -59,6 +59,7 @@ static struct addr_range percpu_range =
  static struct sym_entry *table;
  static unsigned int table_size, table_cnt;
  static int all_symbols = 0;
@@ -65,7 +65,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  static int absolute_percpu = 0;
  static int base_relative = 0;
  
-@@ -442,6 +443,9 @@ static void write_src(void)
+@@ -440,6 +441,9 @@ static void write_src(void)
  
        free(markers);
  
@@ -75,7 +75,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
        output_label("kallsyms_token_table");
        off = 0;
        for (i = 0; i < 256; i++) {
-@@ -502,6 +506,9 @@ static void *find_token(unsigned char *s
+@@ -500,6 +504,9 @@ static void *find_token(unsigned char *s
  {
        int i;
  
@@ -85,7 +85,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
        for (i = 0; i < len - 1; i++) {
                if (str[i] == token[0] && str[i+1] == token[1])
                        return &str[i];
-@@ -574,6 +581,9 @@ static void optimize_result(void)
+@@ -572,6 +579,9 @@ static void optimize_result(void)
  {
        int i, best;
  
@@ -95,7 +95,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
        /* using the '\0' symbol last allows compress_symbols to use standard
         * fast string functions */
        for (i = 255; i >= 0; i--) {
-@@ -756,6 +766,8 @@ int main(int argc, char **argv)
+@@ -751,6 +761,8 @@ int main(int argc, char **argv)
                                absolute_percpu = 1;
                        else if (strcmp(argv[i], "--base-relative") == 0)
                                base_relative = 1;
@@ -106,7 +106,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
                }
 --- a/scripts/link-vmlinux.sh
 +++ b/scripts/link-vmlinux.sh
-@@ -133,6 +133,10 @@ kallsyms()
+@@ -152,6 +152,10 @@ kallsyms()
                kallsymopt="${kallsymopt} --base-relative"
        fi