This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


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: coldfire ld problem


On 06 June 2006 12:12, guy wrote:

> So the only addresses i should see in my s-rec should
> start 0x0Axxxxxx, 0x08xxxxxx or 0x020004xx However the
> top of the s-rec contains records starting with
> 0x0xxxxxxx addresses.
> 
> S00B 000064656D6F2E73313944
> S315 000001D862756720696E2076667072696E74663A13
> S315 000001E82062616420626173650030003031323309
> S315 000001F834353637383961626364656600303132C2
> S315 000002083334353637383941424344454600496E1A
> S315 0000021866004E614E002E00286E756C6C290043F0
> S315 000002282D5554462D3800432D534A495300432D26
> S315 000002384555434A5000432D4A495300496E66695D
> S315 000002486E69747900430049534F2D383835392D76
> S307 0000025831006D
> 
> I know this is related to the sprintf function because
> if i remove all calls to this function the problem
> disappears and the s-record work fine.
> Im new to linker scripts but think this is the area i
> should be looking into. I cannot see why it would be
> placing data outside of the boundaries specified in
> the linker script. From looking at my map file i
> noticed this line..
> *default*        0x00000000         0xffffffff
> 
> It seems plausible to me that somewhere this 0x00
> address is specified but i cannot find where! What
> would be the best way to achieve this?

  It arises because there are input sections in some of the input object files
that aren't mentioned in your linker script.  Ld doesn't throw anything away
unless you tell it to, so it maps input sections that don't match any SECTIONS
entry to a default output section at base zero.  See "3.6.7 Output Section
Discarding" in the info/man page.

> I have included my map file for completeness.

> OUTPUT(demo.elf elf32-m68k)
> 
> .debug_abbrev   0x00000000     0x1527


> .debug_info     0x00000000     0xb655


> .debug_line     0x00000000     0x16c4


> .debug_pubnames


> .debug_str      0x00000000      0x3fa


> .comment        0x00000000      0x29a


> .debug_frame    0x00000000     0x1d78


> .debug_aranges  0x00000000      0x2c8


  You need to add DISCARDs or NOLOADs for all these sections.  Use ".debug*"
to match all the debug info sections in one go.


    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....


--
For unsubscribe information see http://sourceware.org/lists.html#faq


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