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

Kernel: Increase the ksyms section size to 8 MiB #25692

Merged
merged 1 commit into from
Feb 9, 2025

Conversation

spholz
Copy link
Member

@spholz spholz commented Feb 7, 2025

The x86 kernel.map is 6.1 MiB big when building with GCC and ENABLE_EXTRA_KERNEL_DEBUG_SYMBOLS is enabled.

I had this patch applied locally for quite a long time now and didn't want to upstream it.
But solving this properly (instead of hardcoding the size) isn't very easy, since calculating the size needed for the symbol table is a chicken and egg problem.
We could maybe link the kernel multiple times: First with an empty symbol table, then with the symbol table from the first linked kernel and finally replace the section contents with the real symbol table.
But the linker could potentially move things around and cause the symbol table to grow too much.

The x86 kernel.map is 6.1 MiB big when building with GCC and
ENABLE_EXTRA_KERNEL_DEBUG_SYMBOLS is enabled.
@github-actions github-actions bot added the 👀 pr-needs-review PR needs review from a maintainer or community member label Feb 7, 2025
@spholz spholz merged commit 30c3175 into SerenityOS:master Feb 9, 2025
12 checks passed
@spholz spholz deleted the kernel-increase-ksyms-size branch February 9, 2025 02:35
@github-actions github-actions bot removed the 👀 pr-needs-review PR needs review from a maintainer or community member label Feb 9, 2025
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

Successfully merging this pull request may close these issues.

1 participant