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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

putting a variable in an own section


Hi,

if (in C) i have a variable:

int a;

Then it is put in section .bss, which is cleared by the
C startup code.

If i have a variable WITH initial value:

int a = 0xdeadbeef;

Then i can see that this variable is located in section
.data (which is in RAM for (has Flag "W").  Also, if
i copy that section out:

v850-unknown-elf-objcopy -O binary -j .data qwe.elf data.bin
hexdump data.bin
0000000 beef dead
0000004


If i generate an S-Record, the initial value is placed into RAM:

S309FFFFB000EFBEADDE10


But i can NOT burn this S-Rec into the target, i can't flash a
RAM value.  Shouldn't there be TWO sections, one in ROM with the
initial values, which is copied into a section in RAM?


Best regards,
Torsten.



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