riscv-flat.patch 779 B

1234567891011121314151617181920212223
  1. diff -Nur linux-6.6.43.orig/fs/binfmt_flat.c linux-6.6.43/fs/binfmt_flat.c
  2. --- linux-6.6.43.orig/fs/binfmt_flat.c 2024-07-27 11:34:11.000000000 +0200
  3. +++ linux-6.6.43/fs/binfmt_flat.c 2024-08-09 09:34:47.857536277 +0200
  4. @@ -72,8 +72,10 @@
  5. #ifdef CONFIG_BINFMT_FLAT_NO_DATA_START_OFFSET
  6. #define DATA_START_OFFSET_WORDS (0)
  7. +#define MAX_SHARED_LIBS_UPDATE (0)
  8. #else
  9. #define DATA_START_OFFSET_WORDS (MAX_SHARED_LIBS)
  10. +#define MAX_SHARED_LIBS_UPDATE (MAX_SHARED_LIBS)
  11. #endif
  12. struct lib_info {
  13. @@ -880,7 +882,7 @@
  14. return res;
  15. /* Update data segment pointers for all libraries */
  16. - for (i = 0; i < MAX_SHARED_LIBS; i++) {
  17. + for (i = 0; i < MAX_SHARED_LIBS_UPDATE; i++) {
  18. if (!libinfo.lib_list[i].loaded)
  19. continue;
  20. for (j = 0; j < MAX_SHARED_LIBS; j++) {