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 strings in .text instead of .data ? #25

Open
WestfW opened this issue Jun 23, 2024 · 0 comments
Open

Put strings in .text instead of .data ? #25

WestfW opened this issue Jun 23, 2024 · 0 comments

Comments

@WestfW
Copy link
Contributor

WestfW commented Jun 23, 2024

The various strings used in vmon are what C would call "read only data", which the linker would eventually merge into the .text segment. There might be some "locality of reference" advantages to putting the strings in .text or .rodata (I guess because of the inline nature of the cmd_xx files, using a separate segment has advantages over just using .text)

On "real hardware", .text and .rodata would go into flash/rom, a significant advantage over .data (in RAM) that would need to be copied at startup and/or manged WRT sharing RAM space with the application.

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

No branches or pull requests

1 participant