-
Notifications
You must be signed in to change notification settings - Fork 683
Add some more const
s to get data moved from .data to .rodata
#906
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
Add some more const
s to get data moved from .data to .rodata
#906
Conversation
Interestingly, the effect is visible in debug builds only: large chunks (2-4K) of data get moved from .data to .rodata. Details below.
|
If applied together with #905, it does not matter anymore whether debug or release configuration is built, r/w data is always less than 100 bytes. Details below.
|
Note to the PR, might help others as it helped me:
|
LGTM |
I thought quoted string constants are always .rodata. At least compiler complains if you pass them as char* in when certain compiler flags are enabled. |
@zherczeg Does that mean that we should avoid these changes? |
I am not sure which part provides the gain here. But it looks like a gain, so I have no objection. |
We already had some `const`s but it was still not enough. JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
c92632d
to
866ef5b
Compare
I've taken an objdump of jerry, and that has revealed that those globals which have been touched in this PR were all in .data, not in .rodata. |
We already had some
const
s but it was still not enough.JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu