This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos 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]

Re: LD


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


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