This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more infromation.


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

Re: ppc map file is unordered


Jeff Bevis wrote:
> 
> The map files generated by ld are usually sorted badly.  Mostly, the
> offsets increase as you progress through the file.  However, a large
> number of them are not.  This causes a lot of headaches when trying to
> find out what is at a particular offset, which I need to do from time
> to time.  The linker is powerpc-eabi-ld version 2.9.1 (with BFD
> 2.9.1).  Here's a partial example:
> 
>  .text          0x00001cac      0x518 obj/cache.o
>                 0x00001e30                CacheDataCtrlSafe
>                 0x00001cac                CacheInit
>                 0x00002170                K_CacheInstFlush
>                 0x00002058                K_CacheDataSyncRange
>                 0x00001f28                CacheInstCtrlSafe
>                 0x0000219c                CacheInstFlushSafe
>                 0x00001fb4                K_CacheDataFlush
>                 0x000020bc                CacheDataSyncRangeSafe
>                 0x000020e4                K_CacheDataFlushRange
>                 0x00001d88                K_CacheInstStat
>                 0x00001ecc                K_CacheInstCtrl
>                 0x00001d3c                K_CacheDataStat
>                 0x00002148                CacheDataFlushRangeSafe
>                 0x00002008                CacheDataFlushSafe
>                 0x00001dd4                K_CacheDataCtrl
> 
> Any idea why it lists the offsets out of order?  Is there an easy fix
> for this?  Anyone?  Thanks...

I've noticed this too.  I've always assumed that the linker probably
uses some kind of hashed database to maintain symbol information, and
the database is just read out in some simple database walk when printing
the mapfile.  Since I usually use vi to view the mapfile, I often pipe a
section of the mapfile through sort to order a group of symbols.  But it
would be nicer if the linker would output the symbols in address order.

Art

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com


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