avr-gcc-list
[Top][All Lists]
Advanced

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

Re: [avr-gcc-list] section flags .data


From: Torsten Mohr
Subject: Re: [avr-gcc-list] section flags .data
Date: Sun, 24 Jul 2005 00:32:12 +0200
User-agent: KMail/1.8

Hi,

investigating further i found out that the data section actually is
contained in the SREC file and that the information seems to be in
the "program header" of the ELF file:

---- program header 1
p_type 0x0001
p_offset 0x0000222E
p_vaddr 0x00800100
p_paddr 0x0000219A
p_filesz 0x000C
p_memsz 0x000C
p_flags 0x0006
p_align 0x0001

This seems to say that virtual address 0x800100 needs to be loaded
at 0x219a.


Best regards,
Torsten.


> It does not make sense to me to "download" the .data section into
> flash memory.
>
> Are the section flags or type incorrectly set by avr-gcc/-ld or
> is my condition for downloading a section into flash incorrect?
>
>
> I once got the hint on the binutils mailing list that this is the
> condition to download a section into flash, but it looks incorrect
> to me.
>
> Here's the output of avr-readelf -S:
>
> Section Headers:
>   [Nr] Name      Type            Addr     Off    Size   ES Flg Lk Inf Al
>   [ 0]           NULL            00000000 000000 000000 00      0   0  0
>   [ 1] .data     PROGBITS        00800100 002204 00000c 00  WA  0   0  1
>   [ 2] .text     PROGBITS        00000000 000094 002170 00  AX  0   0  1
>   [ 3] .bss      NOBITS          0080010c 002210 00024b 00  WA  0   0  1
>   [ 4] .noinit   PROGBITS        00800357 002210 000000 00   W  0   0  1
>   [ 5] .eeprom   PROGBITS        00810000 002210 000000 00   W  0   0  1
>   [ 6] .stab     PROGBITS        00000000 002210 00033c 0c      7   0  4
>   [ 7] .stabstr  STRTAB          00000000 00254c 000043 00      0   0  1
>
>
> Best regards,
> Torsten.
>
>
> _______________________________________________
> AVR-GCC-list mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/avr-gcc-list




reply via email to

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