avr-gcc-list
[Top][All Lists]
Advanced

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

Re: [avr-gcc-list] Link Time Optimization vs __builtin_unreachable() and


From: Bob Paddock
Subject: Re: [avr-gcc-list] Link Time Optimization vs __builtin_unreachable() and .signature?
Date: Mon, 18 Jun 2012 15:40:15 -0400

> IIRC, It's not referenced from the C code, but we would like to keep it in 
> the final ELF file.
>
> Maybe the __used__ attribute is what is needed. That, and the linker script 
> should be double checked.

Added __used__ in <avr\signature.h> and avr-objdump -s -j .signature
is working again:

const unsigned char __signature[3] __attribute__((__used__))
__attribute__((section (".signature"))) =
 { SIGNATURE_2, SIGNATURE_1, SIGNATURE_0 };

Need same change in <avr\lock.h> and <avr\fuse.h>:

#define LOCKMEM  __attribute__((__used__)) __attribute__((section (".lock")))


#if !defined(FUSES)
  #if defined(__AVR_XMEGA__)
    #define FUSES NVM_FUSES_t __fuse FUSEMEM __attribute__((__used__))
  #else
    #define FUSES __fuse_t __fuse FUSEMEM __attribute__((__used__))
  #endif
#endif



reply via email to

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