Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MySensorsBootloader causes linker stack smashing on recent gcc versions #43

Open
nekromant opened this issue Dec 3, 2021 · 0 comments

Comments

@nekromant
Copy link

Trying to compile this bootloader with gcc shipped with debian stable (bullseye) or debian testing results in a stack smashing during linking.

0 ✓ necromant @ silverblade ~/Projects/mysensors/MySensorsBootloaderRF24 $ avr-gcc --version
avr-gcc (GCC) 5.4.0
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

0 ✓ necromant @ silverblade ~/Projects/mysensors/MySensorsBootloaderRF24 $ dpkg -l|grep gcc-avr
ii  gcc-avr                                       1:5.4.0+Atmel3.6.2-2                             amd64        G2 ✗ necromant @ silverblade ~/Projects/mysensors/MySensorsBootloaderRF24 $ make -B
rm *.o
rm *.elf
rm *.hex
rm: невозможно удалить '*.hex': Нет такого файла или каталога
make: [Makefile:28: clean] Ошибка 1 (игнорирование)
"/usr/bin/avr-gcc" -funsigned-char -funsigned-bitfields -DF_CPU=1000000L -DBAUD_RATE=9600 -Os -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -mrelax -Wall -Wextra -Wundef -pedantic -mmcu=atmega328p -c -std=gnu99 -MD -MP -MF "MYSBootloader.d" -MT"MYSBootloader.d" -MT"MYSBootloader.o"  MYSBootloader.c -o MYSBootloader.o
"/usr/bin/avr-gcc" -nostartfiles -Wl,-s -Wl,-static -Wl,-Map=".map" -Wl,--start-group -Wl,--end-group -Wl,--gc-sections -mrelax -Wl,-section-start=.text=0x7800 -mmcu=atmega328p   -o MYSBootloader.elf MYSBootloader.o -lm
collect2: fatal error: ld terminated with signal 6 [Аварийный останов]
compilation terminated.
*** stack smashing detected ***: terminated
make: *** [Makefile:34: MYSBootloader.elf] Ошибка 1
@nekromant nekromant changed the title Stack smashing on recent gcc versions MySensorsBootloader causes linker stack smashing on recent gcc versions Dec 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant