kernel: bump 6.1 to 6.1.42
[openwrt/staging/pepe2k.git] / target / linux / generic / pending-6.1 / 203-kallsyms_uncompressed.patch
index 7b7aea060160ca70559ebad7537c688ecdd6b6d2..e066ad3cf304855cc998e3f8dac26a60f8aade75 100644 (file)
@@ -57,17 +57,17 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
         * and return the first char from this token.
 --- a/scripts/kallsyms.c
 +++ b/scripts/kallsyms.c
-@@ -75,6 +75,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;
-@@ -535,6 +536,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;
@@ -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++) {
-@@ -586,6 +590,9 @@ static unsigned char *find_token(unsigne
+@@ -656,6 +660,9 @@ static unsigned char *find_token(unsigne
  {
        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];
-@@ -658,6 +665,9 @@ static void optimize_result(void)
+@@ -728,6 +735,9 @@ static void optimize_result(void)
  {
        int i, best;
  
@@ -95,18 +95,18 @@ 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--) {
-@@ -818,6 +828,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, &lto_clang,       1},
 +                      {"uncompressed",   no_argument, &uncompressed,   1},
                        {},
                };
  
 --- a/scripts/link-vmlinux.sh
 +++ b/scripts/link-vmlinux.sh
-@@ -156,6 +156,10 @@ kallsyms()
-               kallsymopt="${kallsymopt} --base-relative"
+@@ -160,6 +160,10 @@ kallsyms()
+               kallsymopt="${kallsymopt} --lto-clang"
        fi
  
 +      if is_enabled CONFIG_KALLSYMS_UNCOMPRESSED; then