This is the mail archive of the gdb@sourceware.org mailing list for the GDB 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]

the "load" command and the .bss section


i was doing a new board port using jtag and so was leveraging the "load" 
command to setup the initial ELF in the relevant memory regions.  things kept 
crashing on me and then i realized that the loading process wasnt actually 
zeroing out the bss.  is there a reason for this ?  i googled and flipped 
through the manual, but the details on what exactly the "load" command is 
supposed to do is a bit on sketchy side.  from what i can tell from the gdb 
source code and the actual output from running the command, it walks the 
section headers (rather than the program headers ?) and loads up everything 
that is in the file.  since the bss section doesnt actually exist in the file 
and is only allocated, that is why it gets skipped ?

once i adapted my habits to first load the ELF and then manually zero the bss, 
life was so much saner :).
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.


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