* Re: [uClinux-dev] Re: objdump on libgcc, again
@ 2010-04-01 12:42 Fabio Giovagnini
2010-04-02 7:41 ` Paul Mundt
0 siblings, 1 reply; 2+ messages in thread
From: Fabio Giovagnini @ 2010-04-01 12:42 UTC (permalink / raw)
To: linux-sh
in sh-2.6/arch/sh/boot/compressed/Makefile
there is
LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
Why this makefile sets LBGCC if it is not required?
Regards
Cheers
In data giovedì 01 aprile 2010 14:39:05, Fabio Giovagnini ha scritto:
: > OK. I understand, but why there is:
> sh-uclinux-ld -EB --oformat elf32-shbig-linux -Ttext 0x0c800000 -e
> startup -T arch/sh/boot/compressed/../../kernel/vmlinux.lds
> arch/sh/boot/compressed/head_32.o arch/sh/boot/compressed/misc.o
> arch/sh/boot/compressed/cache.o arch/sh/boot/compressed/piggy.o
> /home/fgiovagnini/sh7203/sh7203-
> uclinux-4.4-143/build/target/bin/../lib/gcc/sh-uclinux/4.4.1/libgcc.a -o
> arch/sh/boot/compressed/vmlinux
>
>
> This is the problem.
>
> In data giovedì 01 aprile 2010 09:59:11, Andrew Stubbs ha scritto:
> : > On 01/04/10 08:37, Fabio Giovagnini wrote:
> : >
> > > This is the result,
> > > so I think libgcc is only for fdpic target, so if I need it for
> > > building kernel (and for making zImage it seems to be essential) I can
> > > link only a wrong libgcc.
> >
> > Absolutely, there is only FDPIC libgcc in the release I sent to you.
> >
> > The kernel has not needed glibc for a while now. The relevant routines
> > were copied/rewritten to arch/sh/lib.
> >
> > I expect that all the routines you need are present, so it should just
> > be makefile adjustments. If it does need something extra (that somehow
> > the whole of the rest of the kernel can do without) then I expect it can
> > be extracted from the compiler sources (gcc/config/sh/lib1funcs.asm).
> > The linker should have already told you this list of routines it needs.
> >
> > Andrew
>
--
Fabio Giovagnini
Aurion s.r.l.
P.I e C.F.
00885711200
Tel. +39.051.594.78.24
Cell. +39.335.83.50.919
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [uClinux-dev] Re: objdump on libgcc, again
2010-04-01 12:42 [uClinux-dev] Re: objdump on libgcc, again Fabio Giovagnini
@ 2010-04-02 7:41 ` Paul Mundt
0 siblings, 0 replies; 2+ messages in thread
From: Paul Mundt @ 2010-04-02 7:41 UTC (permalink / raw)
To: linux-sh
On Thu, Apr 01, 2010 at 02:42:41PM +0200, Fabio Giovagnini wrote:
> in sh-2.6/arch/sh/boot/compressed/Makefile
> there is
> LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
>
> Why this makefile sets LBGCC if it is not required?
>
Because in to the context of this Makefile it is required.
> In data gioved?? 01 aprile 2010 14:39:05, Fabio Giovagnini ha scritto:
> : > OK. I understand, but why there is:
> > sh-uclinux-ld -EB --oformat elf32-shbig-linux -Ttext 0x0c800000 -e
> > startup -T arch/sh/boot/compressed/../../kernel/vmlinux.lds
> > arch/sh/boot/compressed/head_32.o arch/sh/boot/compressed/misc.o
> > arch/sh/boot/compressed/cache.o arch/sh/boot/compressed/piggy.o
> > /home/fgiovagnini/sh7203/sh7203-
> > uclinux-4.4-143/build/target/bin/../lib/gcc/sh-uclinux/4.4.1/libgcc.a -o
> > arch/sh/boot/compressed/vmlinux
> >
> >
> > This is the problem.
> >
The parts you conveniently left out were:
sh-uclinux-ld: /opt/tc/renesas-4.4/bin/../lib/gcc/sh-uclinux/4.4.1/libgcc.a(_ashiftlt.o): attempt to mix FDPIC and non-FDPIC objects
sh-uclinux-ld: failed to merge target specific data of file /opt/tc/renesas-4.4/bin/../lib/gcc/sh-uclinux/4.4.1/libgcc.a(_ashiftlt.o)
sh-uclinux-ld: /opt/tc/renesas-4.4/bin/../lib/gcc/sh-uclinux/4.4.1/libgcc.a(_lshiftrt.o): attempt to mix FDPIC and non-FDPIC objects
sh-uclinux-ld: failed to merge target specific data of file /opt/tc/renesas-4.4/bin/../lib/gcc/sh-uclinux/4.4.1/libgcc.a(_lshiftrt.o)
We build the kernel with -mno-fdpic which means that we won't be able to use
the FDPIC libgcc for the zImage loader. Mangling the BFD target isn't going to
help you here either, although of course if there's another BFD that we should
be using while preserving -mno-fdpic semantics for the kernel build then we can
trivially drop that in, too.
It's certainly worth trying to wean the compressed image off of libgcc, but
we're not quite at that point yet.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-04-02 7:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-01 12:42 [uClinux-dev] Re: objdump on libgcc, again Fabio Giovagnini
2010-04-02 7:41 ` Paul Mundt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).