This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: LD
- From: Bob Koninckx <bob dot koninckx at o-3s dot com>
- To: "Meulendijks, J." <Meulendijks at WT dot TNO dot NL>
- Cc: "'ecos-discuss at ecos dot sourceware dot org'" <ecos-discuss at ecos dot sourceware dot org>
- Date: Tue, 28 Sep 2004 23:03:20 +0200
- Subject: Re: [ECOS] LD
- Organization: o-3s
- References: <6B80E71673E6D611AC1D0008C7F37BC203F8E5DC@wt15.wt.tno.nl>
- Reply-to: bob dot koninckx at o-3s dot com
Probably, its got something to do with linker optimization. A function
that is never called will be optimized away en won't appear in the final
image. This has the unfortunate side-effect that also functions that
only _appear_ to be never called can get optimized away. A typical
example are functions that are only called indirectly through a function
pointer.
If I am not mistaking, this is the reason why eCos applications always
link against an archive library (.a) which is subject to optimization
and an object file (.o) which is not.
Hth
Bob
On Tue, 2004-09-28 at 10:56, Meulendijks, J. wrote:
> Hi,
>
> I have a question about powerpc-eabi-ld. Is there a maximum number of objects
> (c.q. libraries) which can be linked?
> I couldn't find the answer to this question anywhere (so proberly the answer is
> no) but I want to make sure there isn't.
>
> I got the feeling that the linker isn't linking al the objects and information I
> give him.
> My command:
> powerpc-eabi-ld -g -Lc:/macs/ecos/lib -nostdlib .\obj/untitled_single_gnu.o
> .\obj/rt_main.o .\obj/rt_sim.o .\obj/rt_nonfinite.o
> .\obj/untitled_single_gnu_app_TNO.o C:\Macs\Driver/startup.o
> C:\Macs\Driver/fixfloat.o C:\Macs\Driver/toucan.o C:\Macs\Driver/qsmcm.o
> C:\Macs\Driver/mpc555.o C:\Macs\Driver/main.o C:\Macs\Driver/io_buffer.o
> C:\Macs\Driver/ccp_apl.o c:/cygwin/gnu/powerpc/obj/ecrtn.o
> c:/cygwin/gnu/powerpc/obj/ecrti.o C:\MATLAB6p5p1/rtw/c/lib/rtwlib.a
> c:/macs/ecos/lib/vectors.o -e __exception_reset c:/macs/ecos/lib/extras.o -(
> c:/macs/ecos/lib/libtarget.a c:/cygwin/gnu/powerpc/lib/libgcc.a
> c:/macs/ecos/lib/libsupc++.a -) -Tc:/macs/ecos\target.ld -Map .\output/link.map
> -o .\output/ram.elf -r -E
>
> Thanks
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss