bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/18912] New: Off-by-one error in ld documentation


From: markrages at gmail dot com
Subject: [Bug ld/18912] New: Off-by-one error in ld documentation
Date: Wed, 02 Sep 2015 17:30:46 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=18912

            Bug ID: 18912
           Summary: Off-by-one error in ld documentation
           Product: binutils
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: ld
          Assignee: unassigned at sourceware dot org
          Reporter: markrages at gmail dot com
  Target Milestone: ---

In ld/ld.texinfo, the following example code is offered:

>  start_of_ROM   = .ROM;
>  end_of_ROM     = .ROM + sizeof (.ROM) - 1;
>  start_of_FLASH = .FLASH;
> 
> Then the C source code to perform the copy would be:
> 
>  extern char start_of_ROM, end_of_ROM, start_of_FLASH;
> 
>  memcpy (& start_of_FLASH, & start_of_ROM, & end_of_ROM - & start_of_ROM);

But I think this does not copy the last byte of ROM due to the -1 in
the end_of_ROM definition.

Regards,
Mark
address@hidden

-- 
You are receiving this mail because:
You are on the CC list for the bug.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]