This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: the "load" command and the .bss section
On Wed, 2008-04-30 at 23:32 -0400, Daniel Jacobowitz wrote:
> On Wed, Apr 30, 2008 at 07:03:00PM -0700, Michael Snyder wrote:
> > That's why there are different implementations of "load".
> > A bare-metal target would presumably wind up using the
> > appropriate "load" version.
>
> Well that's probably why historically there _were_ different
> implementations of load. But I doubt it is still justified.
>
> Only the three m32r targets, the remote-mips target (for specific
> monitors), remote-sim, and target remote have implementations of load.
> It looks to me like target remote's would work for all of them except
> the sim. m32r is just using a wrapper around generic_load already.
> monitor and mips are using srec but could do that anyway for large
> writes. Presumably, at least. But I have no way to test any of them
> so I leave them alone.
Right. I think there used to be more implementations, but
some have probably slipped quietly into the night, along with
their discontinued targets and architectures.
Remote and sim are probably among the main ones that still
need to be supported.
Reviewing the thread -- the OP says he is bringing up a new
board using jtag. I'm not clear which version of load that
implies -- remote?
So, given that there are only a few versions to support,
instead of the plethora I was recalling (eg. we probably
don't need to worry too much about a.out...), maybe there
is a choice to make here, between:
a) Making up a spec for the "load" command and then
making sure that the remote, sim, and ??? versions all
conform to that spec, or
b) Just adding features such as "clear the .bss section"
to the version of load that we expect to use the most
(remote?), and leaving the other(s) alone.