Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

robyale
Copy link
Contributor

@robyale robyale commented Aug 10, 2023

Pull Request Overview

The current kernel_layout does not remove all sections related to the eh_frame. This PR removes all eh_frame related sections.

I was observing a section called eh_frame_hdr within my own project. Removing this section had a 15% decrease to the size of my project. While I did not observe this section on the qemu "board", it could potentially be present on other projects and is worth removing.

Testing Strategy

This pull request was tested by compiling and running the kernel for the qemu_rv32_virt board, as well as 2 other custom boards.

TODO or Help Wanted

Documentation Updated

  • No updates are required.

Formatting

  • Ran make prepush.

Copy link
Contributor

@brghena brghena left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes sense to me. There's no way we want eh_frame anything in the binary.

It looks like the flags -fno-asynchronous-unwind-tables and -fno-unwind-tables should also prevent the creation of those DWARF Exception Handling Frames, but even if we added those it should be harmless to also discard them in the LD file.

@brghena brghena added the P-Upkeep This a relatively minor change, or one that is limited in scope, and requires less scrutiny. label Aug 10, 2023
@robyale robyale closed this Aug 10, 2023
@robyale robyale reopened this Aug 10, 2023
@bradjc bradjc merged commit eac79e4 into tock:master Aug 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P-Upkeep This a relatively minor change, or one that is limited in scope, and requires less scrutiny.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants