DSPRelated.com
Forums

How to create special LDF file for BF561?

Started by nk_inferno November 17, 2005
I am doing a program on BF561.
The default LDF links so many libary into my program.
So I want to creat a special LDF for my own.
But I donnot know which libary is needed.
How can I know this?

Thanks for helping me!


On Thu, 17 Nov 2005, nk_inferno wrote:

> I am doing a program on BF561.
> The default LDF links so many libary into my program.
> So I want to creat a special LDF for my own.
> But I donnot know which libary is needed.
> How can I know this?
>
> Thanks for helping me!
>

Create a map file. It will list all the subroutines called
and where they are located. See if you can create a cross
reference listing too, then you'll know which subroutines
actually get called. If you can't create a cross reference,
you can create an assembly listing and just text search for
each listing in the map file - if it isn't there you can
dump it from the library.

Patience, persistence, truth,
Dr. mike



No need to dump anything from the lib -- only those funktions get linked
to your code that are really used.
This is why the libs come in lib format, not as big obj files...

One known exception: if you build jump tables, the linker cannot check
if a function is used (executed), so it will link all lib functions that
are called within your own functions, even if some of them are not
executed.

Friedrich

_______________________________________

ASK Industries GmbH

Friedrich Burgwedel
Senior Engineer R&D Software Electronics
Mail: BurgwedelF@Burg...

_______________________________________
> -----Original Message-----
> From: adsp@adsp... [mailto:adsp@adsp...] On
> Behalf Of Mike Rosing
> Sent: Thursday, November 17, 2005 2:58 PM
> To: nk_inferno
> Cc: adsp@adsp...
> Subject: Re: [adsp] How to create special LDF file for BF561? > On Thu, 17 Nov 2005, nk_inferno wrote:
>
> > I am doing a program on BF561.
> > The default LDF links so many libary into my program.
> > So I want to creat a special LDF for my own.
> > But I donnot know which libary is needed.
> > How can I know this?
> >
> > Thanks for helping me!
> >
>
> Create a map file. It will list all the subroutines called
> and where they are located. See if you can create a cross
> reference listing too, then you'll know which subroutines
> actually get called. If you can't create a cross reference,
> you can create an assembly listing and just text search for
> each listing in the map file - if it isn't there you can dump
> it from the library.
>
> Patience, persistence, truth,
> Dr. mike



On Fri, 18 Nov 2005, Burgwedel Friedrich (Ask De) wrote:

>
> No need to dump anything from the lib -- only those funktions get linked
> to your code that are really used.
> This is why the libs come in lib format, not as big obj files...
>
> One known exception: if you build jump tables, the linker cannot check
> if a function is used (executed), so it will link all lib functions that
> are called within your own functions, even if some of them are not
> executed.

That should show up in the map file. A good proceedure is to do profiling
and find out how many times functions get called. If it really isn't
used, you can track it that way.

Nice to know the linker is smart!

Patience, persistence, truth,
Dr. mike