-flto causes unresolved reference to __clear_cache
Bug #1630668 reported by
JC Wren
This bug affects 3 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
GNU Arm Embedded Toolchain |
Won't Fix
|
Medium
|
Unassigned |
Bug Description
When GCC 5.4 2016q3 adds a __clear_cache call and -flto is enabled, ld reports __clear_cache as an unresolved reference.
Target is Cortex-M3 (STM32L151ZD). Attached is a file that will reproduce this issue.
As this uses arm-eabi-none-ar, which requires the --plugin argument when using LTO, I had to copy liblto_plugin-0.dll to the working directory when running under Cygwin. This is also noted in the README.txt file.
This bug report is part of thread https:/
Changed in gcc-arm-embedded: | |
status: | New → Confirmed |
Changed in gcc-arm-embedded: | |
status: | Confirmed → In Progress |
Changed in gcc-arm-embedded: | |
status: | In Progress → Confirmed |
Changed in gcc-arm-embedded: | |
assignee: | Thomas Preud'homme (thomas-preudhomme) → nobody |
To post a comment you must log in.
Hi JC,
We haven't a patch at this point yet but the problem is well understood thanks to your testcase. It only happens when linking static archive so you can work around the issue by either:
- not putting the object file in an archive
- or extracting the elements from the archive for linking
I will let you know once this is fixed.
Best regards,
Thomas