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
mpy_ld.py: Unable to emit relocations in more complex .rodata.* sections #8783
Labels
Comments
I hit the same issue when working on https://github.com/emlearn/emlearn-micropython - which was some quite simple 100 line code. I did some other hack, but will try to test this fix. |
jonnor
added a commit
to jonnor/micropython
that referenced
this issue
Jul 30, 2023
Sometimes the sections are named .rodata.str1.1 etc, instead of just .rodata. Avoid crashing in that case. Instead treat it like any other RO section. Fix thanks to @phlash Closes micropython#8783
This fix looks to work for me. I have created a merge request with your fix @phlash - hope you dont mind |
jonnor
added a commit
to jonnor/micropython
that referenced
this issue
Jul 30, 2023
Sometimes the sections are named .rodata.str1.1 etc, instead of just .rodata. Avoid crashing in that case. Instead treat it like any other RO section. Fix thanks to @phlash Closes micropython#8783
jonnor
added a commit
to jonnor/micropython
that referenced
this issue
Jul 30, 2023
Sections sometimes named .rodata.str1.1 etc, instead of just .rodata. Avoid crashing in that case. Instead treat it like any other RO section. Fix thanks to @phlash Closes micropython#8783 Signed-off-by: Jon Nordby <jononor@gmail.com>
You're welcome, I didn't have a fork to commit to / issue a PR from, so thanks! |
dpgeorge
pushed a commit
to jonnor/micropython
that referenced
this issue
Sep 1, 2023
Sections sometimes named .rodata.str1.1 etc, instead of just .rodata. Avoid crashing in that case. Instead treat it like any other RO section. Fix thanks to @phlash. Fixes issue micropython#8783. Signed-off-by: Jon Nordby <jononor@gmail.com>
Fixed by 4837ec3 |
xuancong84
pushed a commit
to xuancong84/micropython
that referenced
this issue
Sep 12, 2023
Sections sometimes named .rodata.str1.1 etc, instead of just .rodata. Avoid crashing in that case. Instead treat it like any other RO section. Fix thanks to @phlash. Fixes issue micropython#8783. Signed-off-by: Jon Nordby <jononor@gmail.com>
jprodriguez-nbs
pushed a commit
to jprodriguez-nbs/micropython
that referenced
this issue
Sep 21, 2023
Sections sometimes named .rodata.str1.1 etc, instead of just .rodata. Avoid crashing in that case. Instead treat it like any other RO section. Fix thanks to @phlash. Fixes issue micropython#8783. Signed-off-by: Jon Nordby <jononor@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
While linking a large(ish) project with the latest micropython and ESP-IDF compiler, I had a failure during writing of relocations in
build_mpy
due to a section named.rodata.str1.1
which was not matched by thekind
checking logic, resulting in an attempt to concatenate anint
with astr
. Given such sections are part of the general read-only data, I applied the following fix which seems to work:The text was updated successfully, but these errors were encountered: