OSDN Git Service

When compiled with CVS binutils, busybox fails to execute properly.
authorDavid McCullough <davidm@snapgear.com>
Thu, 27 Nov 2008 12:20:48 +0000 (12:20 +0000)
committerDavid McCullough <davidm@snapgear.com>
Thu, 27 Nov 2008 12:20:48 +0000 (12:20 +0000)
That's because it's using --gc-sections, and the elf2flt linker script
allows the linker to remove parts of the .init and .fini sections.  This
patch fixes it.

Bernd Schmidt <bernds_cb1@t-online.de>

elf2flt.ld

index 19eab7c..c319e71 100644 (file)
@@ -19,8 +19,8 @@ SECTIONS {
                *(.glue_7t)
                *(.glue_7)
                *(.jcr)
-               *(.init)
-               *(.fini)
+               KEEP (*(.init))
+               KEEP (*(.fini))
 
 W_RODAT                *(.rodata)
 W_RODAT                *(.rodata1)