https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100446
--- Comment #3 from R. Diez <rdiezmail-gcc at yahoo dot de> --- Regarding "shifting the blame", no worries, I am grateful for any help. I suspect that there is more than 1 issue here. Could you take a look at the following aspect mentioned in the GDB bug? ----8<----8<---- In fact, I do not understand why StartOfUserCode is not defined in the release build, because it is the same source code after all. The same routine is used in the same way. I dumped all symbols like this and I compared them: arm-none-eabi-objdump --syms firmware-debug-non-lto.elf arm-none-eabi-objdump --syms firmware-release-lto.elf ----8<----8<---- That particular symbol, StartOfUserCode, among many others, should be in the release build too. And there is no GDB involved there at all. I have not got experience with clang or lldb at all, and I have read that lldb is not ready yet for debugging bare metal firmware (at least off the shelf).