Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
flat.lds: discard .comment and .note
Compilers like gcc may place information like compiler versions, build IDs, etc. into dedicate sections called .comment or .note. These sections may be placed even before the entry point if the linker script does not specify how these sections shall be handled. This can be problematic as it is assumed that the beginning of the image is a 12-byte multiboot header, followed by the entry point of the image. It has also been met that ignoring these sections in the linker script leads to a very small bss_start (mostly <1K), which leads the test program to crash when it tries to initialize its .bss section. Discard these sections as these sections contain compiler/linker-specific information which is mostyl useless at runtime. Signed-off-by: Junjie Mao <[email protected]>
- Loading branch information