This is the mail archive of the
mailing list for the binutils project.
Re: utility or script to parse map files
- From: Joel Sherrill <joel dot sherrill at OARcorp dot com>
- To: H Girard <hgirard at broadbandnetdevices dot com>
- Cc: binutils at sources dot redhat dot com
- Date: Mon, 08 Apr 2002 11:01:18 -0500
- Subject: Re: utility or script to parse map files
- Organization: OAR Corporation
- References: <email@example.com>
H Girard wrote:
> Hi everyone,
> Does anyone know if there is a utility or script that can parse map files to
> extract some selected sections ( the ones in rom) and put them into a
> format acceptable by a linker script.
> the problem came about this way : the monitor program for my embedded
> application runs out of rom and has many of the functions that are required
> by applications that i can download to ram with gdb. Those applications if
> they do not have a linker script that tells of the location of the functions
> in rom ,takes them from the library and places them in ram using up more ram
> than I have on this board.
> Even small applications can take pages of functions that would have to be
> entered manually into the linker script for that application. A script would
> extract the name and address of functions in rom from the map file of the
> monitor program and put them in a format that can be merged with the linker
> script of the application.
> I looked in the gnu.org site for such a utility or program but could not
> find anything. Is there a better way or have I missed something?
Read up on the -R/--just-symbols option to ld and use it when linking
the RAM image. This should work to let it resolve symbols from
ROM where possible.
> thank you
Joel Sherrill, Ph.D. Director of Research & Development
joel@OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985