[Top][All Lists]

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

[avr-libc-dev] Linker size check by adding export symbols

From: Sebastian Brückner
Subject: [avr-libc-dev] Linker size check by adding export symbols
Date: Sat, 5 Aug 2017 15:59:54 +0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:52.0) Gecko/20100101 Thunderbird/52.2.1

Hi all,

I wanted to have automatic size checking of the .data segement. I tried to modify gcrt1.S as I saw in an older message <https://lists.gnu.org/archive/html/avr-libc-dev/2016-03/msg00003.html>.

See patch below. Is this the right way to do it?

Index: avr-libc/crt1/gcrt1.S
--- avr-libc/crt1/gcrt1.S       (Revision 2544)
+++ avr-libc/crt1/gcrt1.S       (Arbeitskopie)
@@ -379,5 +379,19 @@
   values are picked up from the device header file.

+  /* The data size check does not work on devices that support
+  external SRAM since XRAMEND will be defined to 0xFFFF in that case.
+  Linker scripts have start of .data section hardcoded to 0x60,
+  RAMSTART is not used.
+  */
+  .set __DATA_REGION_LENGTH__, (XRAMEND - 0x60)

Best regards

reply via email to

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