Subject: Re: Dynamic linking is go (again)
To: None <>
From: Izumi Tsutsui <>
List: port-sh3
Date: 07/06/2003 05:09:29
In article <> wrote:

> Hmm, so it doesn't work.  Apparently it crashes in _rtld_setup.

Maybe it's _start vs __start ENTRY problem in ld(1) which I posted.
You have to fix ld in binutils or add -e __start in

> (Our in-tree cross-build infrastructure is really spoiling, I haven't
> setup a cross toolchain myself for ages ;).

FYI, what I tried is:

(1) Build usual toolchain for sh3el:
% cd /usr/src
% sh -m dreamcast -D [somewhere for ${DESTDIR}] tools

(gnu/dist/toolchain/ld/emulparams/ should be fixed first)

(2) Build gcc-3.3:
% tar jxvf gcc-3.3.tar.bz2
% cd gcc-3.3
% ./configure --target=shle--netbsdelf \
--with-as=/usr/tools/sh3el/bin/shle--netbsdelf-as \
--with-ld=/usr/tools/sh3el/bin/shle--netbsdelf-ld \
--disable-shared --enable-languages=c,c++
% gmake
[I might see some errors but not sure..]
% su
# gmake install

(3) Build binaries with make script
% cd /usr/src
% ${TOOLDIR}/bin/make-dreamcast CC=/usr/local/bin/shle--netbsdelf-gcc \

(I'm not sure 'make -k build' works. Maybe you should visit
 directories (lib/csu, lib/libc, libexec/ld.elf_so..) manually)

> Perhaps, can you send me your working (on the DC) ld.elf_so,
> and a sample binary?

Marcus has already put some binaries, but I'll put other binaries later.
Izumi Tsutsui