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

Fixing alignment linker warning #21

Closed
wants to merge 1 commit into from

Conversation

grafalex82
Copy link
Contributor

I am linking with -Wl,--warn-section-align linker switch. When I added FreeRTOS to my project I got this warning

ld.exe: warning: changing start of section .text by 4 bytes

I know this code came from FreeRTOS without any modifications, but I took a look at the same code in stm32duino uses other alignment and does not generates the warning. Fix works fine on STM32F103

@danieleff
Copy link
Owner

I do not know enough about freertos and alignment requirements there.
Can this not be fixed in linker script somehow? .text should be already have align 4 there.

@grafalex82
Copy link
Contributor Author

I tried to fix this in linker script, no luck

@fpistm
Copy link

fpistm commented Jun 10, 2017

Hi, add in the linker script:
.text ALIGNED(4):
instead of
.text :

@danieleff
Copy link
Owner

Thanks. I added it, and uploaded. Can you try if you still get the warning? I tested a little, and it seems to fix it.

@danieleff danieleff closed this Aug 28, 2018
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

Successfully merging this pull request may close these issues.

3 participants