diff options
author | Eric Andersen <andersen@codepoet.org> | 2001-02-28 04:01:29 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2001-02-28 04:01:29 +0000 |
commit | faec125f35d86af53f8d38a0ef914cb584ed7b6b (patch) | |
tree | 5f5640a6a87b8912b56571f45ea9016b73167a45 | |
parent | 82dd793fd07a21d4b03d3e0a1bd7434d302f35bb (diff) |
This evening I've been investigating why linking with the shared uClibc library
was not working when booting busybox as init, even though it workes when run on
my desktop system. I made boot floppy with just /dev, a few /etc entries,
busybox dynamically linked vs uClibc, and /lib with shared uClibc in it. And
just as several people have reported, it didn't work.
So I ran 'ldd /bin/true' and it showed 'true' is linked with the shared library
loader. But 'ldd ./busybox' showed it was only linked with uClibc. Doh! Of
course it couldn't work!
This patch fixes the gcc wrapper so when we link with the shared uClibc
library, we also always link with the correct shared lib loader. With this
patch in place, I have now sucessfully booted busybox linked vs the shared
uClibc library. And it works great!
-Erik
-rw-r--r-- | extra/gcc-uClibc/gcc-uClibc.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/extra/gcc-uClibc/gcc-uClibc.c b/extra/gcc-uClibc/gcc-uClibc.c index c29f351c4..a628705ea 100644 --- a/extra/gcc-uClibc/gcc-uClibc.c +++ b/extra/gcc-uClibc/gcc-uClibc.c @@ -142,6 +142,9 @@ int main(int argc, char **argv) } } gcc_argv[i++] = GCC_LIB; + if (!use_static_linking && DYNAMIC_LINKER[0]) { + gcc_argv[i++] = DYNAMIC_LINKER; + } } } gcc_argv[i++] = NULL; |