On Mon, 7 Sep 2015, Nick Clifton wrote:
> > extern char start_of_ROM[], end_of_ROM[], start_of_FLASH[];
> > memcpy (start_of_FLASH, start_of_ROM, end_of_ROM - start_of_ROM);
>
> Actually that *is* a nicer way of writing it.

With two people agreeing, it's almost an objective view. :)

> But, I wrote the original example based upon code that a customer had written
> (without the ampersand operators) and then complained that it did not work.
> The point of the example therefore was to catch the reader's eye as code that
> they might write, and then show them how it really should be written.

That's a very good point.

> I agree however that your way is better, so how does this addition to the
> linker manual sit with you ?

Nicely, thanks.  While there's a point in keeping just one
version for simplicity, the educational point of "here's what
you may write which doesn't work, here's the semantically
corrected code, and this is what you should have written in the
first place" wins, IMHO.

brgds, H-P

_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to