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

Put BIGBOOT strings in flash so __do_copy_data doesn't get placed ahead of the jump table. #266

Merged
merged 1 commit into from
Feb 3, 2019

Conversation

justarandomgeek
Copy link
Contributor

@justarandomgeek justarandomgeek commented Feb 2, 2019

I found when compiling with BIGBOOT that __do_copy_data was being placed before the jump table, due to the human-readable config flag info being placed in .data. Using the .progmem section puts them before most of .text still, and using .text.buildinfo to sort into the .text.* rule produced linker errors (optiboot.c:(.init9+0x10a): warning: internal error: out of range error optiboot.c:(.init9+0x168): warning: internal error: out of range error, on the lines using eeprom_*_byte()). I placed them in .fini8 to get it ordered properly to work, but someone with more linker-fu might have a better solution.

@WestfW
Copy link
Member

WestfW commented Feb 3, 2019

Well, rats. I could swear that I had tested some of the BIGBOOT images :-(

@WestfW WestfW merged commit b8b7605 into Optiboot:master Feb 3, 2019
@justarandomgeek
Copy link
Contributor Author

FWIW, it did boot correctly even with that in place (the end of __do_copy_data just rolled right on into the jump to main), it's just the jump to do_spm wasn't in the correct place to be called by the app - so it would have appeared to work until you tried to call do_spm and then it would just roll right on into the bootloader for a "reset" instead!

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.

2 participants