mbedtls icon indicating copy to clipboard operation
mbedtls copied to clipboard

Reduce RAM - move some variables to .rodata

Open Xeenych opened this issue 2 years ago • 8 comments

Add const to move variables to .rodata section

Signed-off-by: Xeenych [email protected]

Fix #5891

Xeenych avatar Jun 07 '22 07:06 Xeenych

You miss the sign-off-by line in the commit message.

How do I edit the commit message?

Xeenych avatar Jun 08 '22 09:06 Xeenych

You miss the sign-off-by line in the commit message.

How do I edit the commit message?

Edit it locally : "git commit --amend". Then force push the branch to your Mbed TLS fork, something like: "git push --force-with-lease patch-1"

ronald-cron-arm avatar Jun 08 '22 10:06 ronald-cron-arm

For a single commit:

git commit --no-edit --amend --signoff

For all commits since the last merge:

git rebase -i --signoff

and keep all the commits on “pick”.

gilles-peskine-arm avatar Jun 08 '22 10:06 gilles-peskine-arm

I've made this PR with github web interface. I cannot use git command line

Xeenych avatar Jun 08 '22 11:06 Xeenych

I've made this PR with github web interface. I cannot use git command line

In that case the simpler is maybe to just close this PR and create a new one.

ronald-cron-arm avatar Jun 08 '22 11:06 ronald-cron-arm

I think since the author has added a sign-off to the top of this PR description and seems happy, I'll add a sign-off so we can proceed.

daverodgman avatar Aug 09 '22 10:08 daverodgman

I have rebased on top of development - of the 3 arrays, 2 were deprecated and have since been removed, so only 1 remains.

davidhorstmann-arm avatar Sep 07 '22 17:09 davidhorstmann-arm

DCO is failing due to having a signature that doesn't match the PR author.

davidhorstmann-arm avatar Sep 09 '22 09:09 davidhorstmann-arm

So this changes

   text	   data	    bss	    dec	    hex	filename
  37565	    789	      0	  38354	   95d2	library/ssl_tls-aarch64-development.o
  37573	    777	      0	  38350	   95ce	library/ssl_tls-aarch64-5894.o

Since both text and data will be in flash, this seems like a (very minor) win - but suggests other patterns to look for.

tom-cosgrove-arm avatar Feb 01 '23 22:02 tom-cosgrove-arm

@Xeenych can you add a Signed-off-by: line to the commit so that it passes the DCO commit check?

gstrauss avatar Feb 28 '23 22:02 gstrauss

It's just better with const anyway

tom-cosgrove-arm avatar May 05 '23 13:05 tom-cosgrove-arm