-
Notifications
You must be signed in to change notification settings - Fork 1k
Warning: changing start of section .bss by x bytes #465
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
Comments
@lorol
while with
So I lost 4 bytes with alignment. What I will do is to remove the warn section alignment as by default, SECTIONS command |
Remove ld option 'warn-section-align', as by default, SECTIONS command does not specify a start address for the section, let ld do the work. If a start address is specified no warn was displayed. --warn-section-align Warn if the address of an output section is changed because of alignment. Typically, the alignment will be set by an input section. The address will only be changed if it not explicitly specified; that is, if the SECTIONS command does not specify a start address for the section. Fix stm32duino#465 Signed-off-by: Frederic.Pillon <[email protected]>
Hi IDE 1.8.8 STM32 1.5.0 NUCLEO L152 -----------------ORIGINAL ld--------------------------- ./../../arm-none-eabi/bin/ld.exe: warning: changing start of section .bss by 4 bytes Sketch uses 54552 bytes (10%) of program storage space. Maximum is 524288 bytes. ----------------PATCHED ld---------------------------- Sketch uses 54552 bytes (10%) of program storage space. Maximum is 524288 bytes. |
Well it is fairly depends on your sketch. |
Remove ld option 'warn-section-align', as by default, SECTIONS command does not specify a start address for the section, let ld do the work. If a start address is specified no warn was displayed. --warn-section-align Warn if the address of an output section is changed because of alignment. Typically, the alignment will be set by an input section. The address will only be changed if it not explicitly specified; that is, if the SECTIONS command does not specify a start address for the section. Fix #465 Signed-off-by: Frederic.Pillon <[email protected]>
Great! |
Remove ld option 'warn-section-align', as by default, SECTIONS command does not specify a start address for the section, let ld do the work. If a start address is specified no warn was displayed. --warn-section-align Warn if the address of an output section is changed because of alignment. Typically, the alignment will be set by an input section. The address will only be changed if it not explicitly specified; that is, if the SECTIONS command does not specify a start address for the section. Fix stm32duino#465 Signed-off-by: Frederic.Pillon <[email protected]>
Info
Board
Additional context
Here is an .ino file (it needs few lib's but you can figure out) to reproduce the warning.
https://gist.github.com/b41c43db7f3ac0990b5639921658f024.git
The cause is a double (64-bit) var at line 96. If you are using float, no problems.
If you move the position where it is declared, it may affect the warning output (or not)
It works ... but the difference is: with warning it takes +4 RAM bytes more :)
With corrected .bss ALIGN(4) no warnings and less memory.
Related commit:
d52e577#commitcomment-32583137
The text was updated successfully, but these errors were encountered: