question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

panda "make recover" shows link error "undefined reference to __aeabi_llsr"

See original GitHub issue

In v0.5.8, panda’s make recover shows following linker error

arm-none-eabi-gcc -g -Wall -mlittle-endian -mthumb -mcpu=cortex-m4 -mhard-float -DSTM32F4 -DSTM32F413xx -mfpu=fpv4-sp-d16 -fsingle-precision-constant -I inc -I ../ -nostdlib -fno-builtin -std=gnu11 -Os -Tstm32_flash.ld -o obj/bootstub.panda.elf obj/startup_stm32f413xx.o obj/bootstub.panda.o obj/sha.panda.o obj/rsa.panda.o obj/sha.panda.o: In function SHA_final: /.../openpilot/panda/crypto/sha.c:131: undefined reference to __aeabi_llsr collect2: error: ld returned 1 exit status

This appears to be due to changes in panda/board/build.mk compile optimization flag change from -O2 to -Os. From what I gather, __aeabi_llsr is arm’s long long shift right operation which was excluded by the compiler when the optimization flag changed.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
rbiasinicommented, Feb 9, 2019

cool. I’ll test independently and I’ll merge. Thanks.

1reaction
kernyancommented, Feb 9, 2019

With fix on sha.c

make on EON make_eon

make recover on EON make_recover_eon_part1 make_recover_eon_part2

Without fix on sha.c make recover on EON make_recover_eon_without_sha_fix

Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

What is an undefined reference/unresolved external symbol ...
Library components are linked to satisfy external references to entities not defined in the current translation. All such translator output is collected ...
Read more >
C++ Errors: Undefined Reference, Unresolved External ...
An “Undefined Reference” error occurs when we have a reference to object name (class, function, variable, etc.) in our program and the linker...
Read more >
link error undefined reference - NXP Community
I am using MCUXpresso to build an MK10 project. The startup file, startup_mk10d10.cpp, cannot find functions in other modules, for example interrupt.
Read more >
Make file error undefined reference to `gpioInitialise
Hello, Too new to Pi, using Python and MikroC for some years now i have to use C/C++ on Rpi 4. I don't...
Read more >
Undefined reference when compiling program, what to do
If you get an error about "undefined reference" when compiling a program of your own from source code, then you are probably missing...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found