This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: SH: Should libgcc_s.so not be actually linker script ?
- From: Kaz Kojima <kkojima at rr dot iij4u dot or dot jp>
- To: sugioka at itonet dot co dot jp
- Cc: gcc at gcc dot gnu dot org
- Date: Wed, 29 Mar 2006 22:31:39 +0900 (JST)
- Subject: Re: SH: Should libgcc_s.so not be actually linker script ?
- References: <4.2.0.58.J.20060329214936.053054a0@router.itonet.co.jp>
SUGIOKA Toshinobu <sugioka@itonet.co.jp> wrote:
> But now, "gcc -v -o hello hello.c" gives following output on linking phase.
>
> /usr/libexec/gcc/sh4-unknown-linux/4.1.0/collect2 --eh-frame-hdr -m shlelf_linux -dynamic-linker /lib/ld-linux.so.2 -o hello /usr/lib/gcc/sh4-unknown-linux/4.1.0/../../../crt1.o /usr/lib/gcc/sh4-unknown-linux/4.1.0/../../../crti.o /usr/lib/gcc/sh4-unknown-linux/4.1.0/crtbegin.o -L/usr/lib/gcc/sh4-unknown-linux/4.1.0 -L/usr/lib/gcc/sh4-unknown-linux/4.1.0 -L/usr/lib/gcc/sh4-unknown-linux/4.1.0/../../.. /tmp/ccer52C9.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/sh4-unknown-linux/4.1.0/crtend.o /usr/lib/gcc/sh4-unknown-linux/4.1.0/../../../crtn.o
>
> It seems that libgcc.a is linked automatically, so it would be work if libgcc_s.so is a symbolic link to libgcc_s.so.1.
>
> If libgcc_s.so were symbolic link, unneeded dependency on libgcc_s.so.1 would not be written to the executable.
> ( '--as-needed' seems not work for linker script )
Thanks for pointing it out. Could you propose the patch for it
on trunk to gcc-patches?
Regards,
kaz