Closed
Description
In recent versions of avr-gcc, the -g option is needed during compile in order to get enough debug information into the final elf file for things like a combined source/disassemebly (avr-objdump -SC foo.elf) to work. Now that link time optimization has been implemented, the "link" command will need the -g option as well as the individual compiles...
(It's possible that some other compile-time options also need to be moved to the link statement as well, but "-g" is the one I noticed.)
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Relationships
Development
No branches or pull requests
Activity
facchinm commentedon Nov 2, 2016
Hi @WestfW ,
does it impact the size of the final hex (once the debug sections have been removed of course)? If it doesn't, I believe we could simply add the
-g
flag everywhere. Otherwise we'll need to provide a way to override the commandline in order to produce a debuggable elfmatthijskooijman commentedon Nov 3, 2016
The .hex file is unaffected, so I would encourage adding -g.
[AVR] Add -g to elf.flags to allow inclusion of debug symbols in elf
Add -g option to lto linking.