Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* the "load" command and the .bss section
@ 2008-04-28  8:02 Mike Frysinger
  2008-04-28 13:48 ` Daniel Jacobowitz
  2008-04-29 18:04 ` Michael Snyder
  0 siblings, 2 replies; 11+ messages in thread
From: Mike Frysinger @ 2008-04-28  8:02 UTC (permalink / raw)
  To: gdb

[-- Attachment #1: Type: text/plain, Size: 867 bytes --]

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 #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 827 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2008-05-01 20:05 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-28  8:02 the "load" command and the .bss section Mike Frysinger
2008-04-28 13:48 ` Daniel Jacobowitz
2008-04-28 17:29   ` Mike Frysinger
2008-04-28 17:42     ` Daniel Jacobowitz
2008-04-29 18:04 ` Michael Snyder
2008-05-01  0:11   ` Mike Frysinger
2008-05-01  2:03     ` Michael Snyder
2008-05-01  3:32       ` Daniel Jacobowitz
2008-05-01 19:24         ` Michael Snyder
2008-05-01 19:32           ` Daniel Jacobowitz
2008-05-01 20:05             ` Michael Snyder

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox