This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

SH: Should not be actually linker script ?


For sh4-unknown-linux target, is not symbolic link but linker script
that is

GROUP ( libgcc.a )

I hear this is because some functions are not included in and they are
only in libgcc.a.

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/ -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 is a symbolic link to

If were symbolic link, unneeded dependency on would not be written to the executable.
( '--as-needed' seems not work for linker script )

SUGIOKA Toshinobu

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]