Dwarf Error: Offset with gcc 8 Topic is solved

Report here problems in any of ChibiOS components. This forum is NOT for support.
User avatar
wurstnase
Posts: 59
Joined: Tue Oct 17, 2017 2:24 pm
Has thanked: 23 times
Been thanked: 8 times
Contact:

Dwarf Error: Offset with gcc 8  Topic is solved

Postby wurstnase » Wed May 09, 2018 6:42 am

Hi,

I'm building my gcc with bleeding edge script from Freedie Chopin: https://github.com/FreddieChopin/bleedi ... -toolchain

GNU objdump (bleeding-edge-toolchain) 2.30
arm-none-eabi-gcc (bleeding-edge-toolchain) 8.1.0

Normal builds work until I enable LTO with -ggdb.

demos/STM32/RT-STM32F411RE-NUCLEO64

Code: Select all

Linking build/ch.elf
Creating build/ch.hex
Creating build/ch.bin
Creating build/ch.dmp

   text      data       bss       dec       hex   filename
  66108       140    130928    197176     30238   build/ch.elf
Creating build/ch.list
/home/nico/Tools/arm-none-eabi-gcc-8.1.0-180507/bin/arm-none-eabi-objdump: Dwarf Error: Offset (100729344) greater than or equal to .debug_str size (3109).
/home/nico/Tools/arm-none-eabi-gcc-8.1.0-180507/bin/arm-none-eabi-objdump: Dwarf Error: Offset (84148736) greater than or equal to .debug_str size (3109).
(Offset errors repeated several times)
/home/nico/Tools/arm-none-eabi-gcc-8.1.0-180507/bin/arm-none-eabi-objdump: Dwarf Error: Could not find abbrev number 43.


Code: Select all

diff --git a/demos/STM32/RT-STM32F411RE-NUCLEO64/Makefile b/demos/STM32/RT-STM32F411RE-NUCLEO64/Makefile
index bc8a138c..82b1b24a 100644
--- a/demos/STM32/RT-STM32F411RE-NUCLEO64/Makefile
+++ b/demos/STM32/RT-STM32F411RE-NUCLEO64/Makefile
@@ -30,7 +30,7 @@ endif
 
 # Enable this if you want link time optimizations (LTO)
 ifeq ($(USE_LTO),)
-  USE_LTO = no
+  USE_LTO = yes
 endif
 
 # If enabled, this option allows to compile the application in THUMB mode.
\o/ Nico

User avatar
Giovanni
Site Admin
Posts: 11083
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 367 times
Been thanked: 306 times
Contact:

Re: Dwarf Error: Offset with gcc 8

Postby Giovanni » Sat May 26, 2018 8:56 am

Hi,

Thanks for reporting but this is something in GCC I believe, I cannot imagine how to fix this on our side.

Giovanni

apmorton
Posts: 29
Joined: Fri Sep 29, 2017 10:26 am
Been thanked: 13 times

Re: Dwarf Error: Offset with gcc 8

Postby apmorton » Sun May 27, 2018 12:16 pm

this is a regression in gcc/binutils

here are the relevant bugs:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84847
https://sourceware.org/bugzilla/show_bug.cgi?id=20882

It looks like the issue was fixed in binutils 2.31

User avatar
Giovanni
Site Admin
Posts: 11083
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 367 times
Been thanked: 306 times
Contact:

Re: Dwarf Error: Offset with gcc 8

Postby Giovanni » Sun May 27, 2018 12:19 pm

Thanks, good to know.

Giovanni


Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 0 guests