Re: m54418: ELF execution issues

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Jean-Michel,

On Mon, Jun 3, 2024 at 12:54 PM Jean-Michel Hautbois
<jeanmichel.hautbois@xxxxxxxxxx> wrote:
I managed to get really far in my boot process, as I can now try to
execute bash. I had to change the elf.h file because if I don't do that,
it is not working.

Here is the diff (on v6.9.1):
diff --git a/arch/m68k/include/asm/elf.h b/arch/m68k/include/asm/elf.h
index 2def06a99b08..38acb928fa81 100644
--- a/arch/m68k/include/asm/elf.h
+++ b/arch/m68k/include/asm/elf.h
@@ -78,8 +78,10 @@ typedef struct user_m68kfp_struct elf_fpregset_t;
     the loader.  We need to make sure that it is out of the way of the
program
     that it will "exec", and that there is sufficient room for the brk.  */

-#ifndef CONFIG_SUN3
+#if !defined(CONFIG_SUN3) && !defined(CONFIG_COLDFIRE)
  #define ELF_ET_DYN_BASE         0xD0000000UL
+#elif defined(CONFIG_COLDFIRE)
+#define ELF_ET_DYN_BASE                (TASK_UNMAPPED_BASE + 0x10000000)
  #else
  #define ELF_ET_DYN_BASE         0x0D800000UL
  #endif

If you end up needing to make a change here, please reshuffle the logic,
so it becomes more streamlined:

    #ifdef CONFIG_COLDFIRE
    ...
    #elif defined(CONFIG_SUN3)
    ...
    #else
    ...
    #endif

Thanks!

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds





[Index of Archives]     [Video for Linux]     [Yosemite News]     [Linux S/390]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux