[kernel] Hide kernel symbols by default

Using `-fvisibility=hidden` when building the kernel, and then
`--discard-all` when stripping it, we shave almost 100KiB off of the
resulting ELF file.

Also dropped some unused symbols from the linker script, and rearranged
the sections so that the file is able to be mapped directly into memory
instead of having each section copied.
This commit is contained in:
Justin C. Miller
2023-01-29 19:36:20 -08:00
parent e2e1696b7e
commit 5ea5978ee8
17 changed files with 126 additions and 120 deletions

View File

@@ -155,7 +155,7 @@ allocator::memset(void *start, size_t size, uint8_t value)
}
void
allocator::copy(void *to, void *from, size_t size)
allocator::copy(void *to, const void *from, size_t size)
{
m_bs.copy_mem(to, from, size);
}