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 11:10:45 -0400

> Can you confirm that it is GCC that is getting rid of .signature? If so, it's 
> a GCC bug and another bug report should be filed. If it is not GCC that is 
> getting rid of it, but it is the linker that is doing that then it should be 
> a GNU Binutils bug report. I don't know if we need to do something with the 
> default linker script to tell ld to keep it, or if it is something else that 
> is blowing it away.

I don't think this would be a valid bug for LTO in this case, for
either GCC or Binutils.

LTO is doing what it was meant to do as I understand it.  How would it
know we are putting stuff in the .ELF file for reasons other than code
generation, unless we tell it?  So the question becomes how do we tell
it?

Also noticing the -g in there, is the admonishment in the
documentation that -g and -flto are incompatible still valid?

"Link-time optimization does not work well with generation of
debugging information. Combining -flto with -g is currently
experimental and expected to produce wrong results."

I assume some debugging symbols are lost, have not looked into that yet?

I'm leaning to it is the linker, as the .lst file still has the data, see below:

  85                            .text
  86                            .section        .gnu.lto_.opts,"",@progbits
  87 0000 272D 6D6D
                .string 
"'-mmcu=atxmega128a1''-mcall-prologues''-gdwarf-2''-Os''-Werror''-pedantic''-flto''-flto-r
  87      6375 3D61
  87      7478 6D65
  87      6761 3132
  87      3861 3127
  88                            .text
  89                            .cfi_sections   .debug_frame
  90                    .global __signature
  91                            .section        .signature,"a",@progbits
  94                    __signature:
  95 0000 4C                    .byte   76
  96 0001 97                    .byte   -105
  97 0002 1E                    .byte   30
  98                            .text
  99                    .Letext0:
 100                            .file 1
"j:\\apps\\avr-gcc-4.7.1-rc1-mingw32\\bin\\../lib/gcc/avr/4.7.1/../../../../avr/include/av
DEFINED SYMBOLS
                            *ABS*:00000000 signature.c
  J:\Temp\ccCqYnId.s:2      *ABS*:0000003e __SP_H__
  J:\Temp\ccCqYnId.s:3      *ABS*:0000003d __SP_L__
  J:\Temp\ccCqYnId.s:4      *ABS*:0000003f __SREG__
  J:\Temp\ccCqYnId.s:5      *ABS*:0000003b __RAMPZ__
  J:\Temp\ccCqYnId.s:6      *ABS*:0000003a __RAMPY__
  J:\Temp\ccCqYnId.s:7      *ABS*:00000039 __RAMPX__
  J:\Temp\ccCqYnId.s:8      *ABS*:00000038 __RAMPD__
  J:\Temp\ccCqYnId.s:9      *ABS*:00000034 __CCP__
  J:\Temp\ccCqYnId.s:10     *ABS*:00000000 __tmp_reg__
  J:\Temp\ccCqYnId.s:11     *ABS*:00000001 __zero_reg__
  J:\Temp\ccCqYnId.s:94     .signature:00000000 __signature
                            *COM*:00000001 __gnu_lto_v1

NO UNDEFINED SYMBOLS



reply via email to

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