[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] problem after relocate code to fix address

From: Erik Christiansen
Subject: Re: [avr-gcc-list] problem after relocate code to fix address
Date: Fri, 9 Dec 2005 18:22:59 +1100
User-agent: Mutt/1.5.6+20040722i

On Fri, Dec 09, 2005 at 03:12:39AM +0000, zhao abl wrote:
>    void putcinstr(uint8_t) __attribute__((section(".putsec")));
>    Wl,--section-start=.putsec=0x4000
>  After i relocate a function to a fix address ,the .data section
> can't be initialized correctly,all .data section has been initialized 
> with "0xff".
>  In the .map file:
>      0x000004de                __data_load_start = LOADADDR (.data)
>      0x000004e8                __data_load_end = (__data_load_start + 
> SIZEOF (.data))
>  it seems that ,__data_load_start from 0x04de, but actually there is 
> nothing but "0xff".
> the "load_data" has been placed at "0x2034"(word address),just followed the 
> relocated founction.

Can you please post the output of "avr-objdump -h your_object_file" ?
It would be useful to provide this for the case where
--section-start=.putsec=0x4000, and again with no .putsec. We can then
see if there really is some interference.

The limited information available so far shows that the LMA of .data is
indeed 0x04de. Where do you see '"0x2034"(word address)'? 
(In any case, when fiddling with the linker, it is better to work
exclusively in byte adresses. It avoids confusion. ;-)


PS: The weekend starts any minute now. It'll be two days before I see your

reply via email to

[Prev in Thread] Current Thread [Next in Thread]