used attribute for _MMCU_ , should avoid dropping the .mmcu section
authormsquirogac <msquirogac@gmail.com>
Sat, 23 May 2020 01:38:51 +0000 (21:38 -0400)
committermsquirogac <msquirogac@gmail.com>
Thu, 28 May 2020 04:10:38 +0000 (00:10 -0400)
Fix for issue #285

simavr/sim/avr/avr_mcu_section.h

index ebeceb0..3deae7b 100644 (file)
@@ -80,7 +80,7 @@ enum {
  * So the new method declares the string as fixed size, and the parser
  * is forced to skip the zeroes in padding. Dumbo.
  */
-#define _MMCU_ __attribute__((section(".mmcu")))
+#define _MMCU_ __attribute__((section(".mmcu"))) __attribute__((used))
 struct avr_mmcu_long_t {
        uint8_t tag;
        uint8_t len;