Skip to content

mpy_ld.py: Support complex RO sections #12123

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

Merged
merged 1 commit into from
Sep 1, 2023

Conversation

jonnor
Copy link
Contributor

@jonnor jonnor commented Jul 30, 2023

Sometimes the sections are named .rodata.str1.1 etc, instead of just .rodata. Fix thanks to @phlash in #8783

jonnor added a commit to emlearn/emlearn-micropython that referenced this pull request Jul 30, 2023
Fix submitted for upstream in micropython/micropython#12123
but until merged we need to use our fork
@github-actions
Copy link

github-actions bot commented Jul 30, 2023

Code size report:

   bare-arm:    +0 +0.000% 
minimal x86:    +0 +0.000% 
   unix x64:    +0 +0.000% standard
      stm32:    +0 +0.000% PYBV10
     mimxrt:    +0 +0.000% TEENSY40

@codecov
Copy link

codecov bot commented Jul 30, 2023

Codecov Report

Merging #12123 (d58824a) into master (d1f288c) will decrease coverage by 0.01%.
The diff coverage is n/a.

❗ Current head d58824a differs from pull request most recent head 4837ec3. Consider uploading reports for the commit 4837ec3 to get more accurate results

@@            Coverage Diff             @@
##           master   #12123      +/-   ##
==========================================
- Coverage   98.38%   98.38%   -0.01%     
==========================================
  Files         158      157       -1     
  Lines       20919    20703     -216     
==========================================
- Hits        20582    20368     -214     
+ Misses        337      335       -2     

see 9 files with indirect coverage changes

@jonnor jonnor force-pushed the fix-complex-rodata branch 2 times, most recently from 40981ea to d58824a Compare July 30, 2023 18:10
@jonnor
Copy link
Contributor Author

jonnor commented Aug 3, 2023

Checks failing on code coverage, because 1 line is added, but no tests added.
However I cannot find any tests covering the mpy_ld tool at all?

@dpgeorge dpgeorge added the tools Relates to tools/ directory in source, or other tooling label Aug 10, 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>
@dpgeorge dpgeorge merged commit 4837ec3 into micropython:master Sep 1, 2023
@dpgeorge
Copy link
Member

dpgeorge commented Sep 1, 2023

Thanks for the contribution, this looks good.

I made a small code-style change to pass multiple strings to startswith().

@jonnor
Copy link
Contributor Author

jonnor commented Sep 1, 2023

Hi @dpgeorge - thank you for the review and merge!

@jonnor jonnor deleted the fix-complex-rodata branch September 1, 2023 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tools Relates to tools/ directory in source, or other tooling
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants