diff --git a/CHANGELOG.md b/CHANGELOG.md index 26ea86f..848ab0b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased] +### Changed + +- Preserve `.eh_frame` and `.eh_frame_hdr` sections + ## [v0.7.1] - 2020-06-02 ### Added diff --git a/link.x b/link.x index 3698db0..73553cf 100644 --- a/link.x +++ b/link.x @@ -111,11 +111,8 @@ SECTIONS KEEP(*(.got .got.*)); } - /* Discard .eh_frame, we are not doing unwind on panic so it is not needed */ - /DISCARD/ : - { - *(.eh_frame); - } + .eh_frame (INFO) : { KEEP(*(.eh_frame)) } + .eh_frame_hdr (INFO) : { *(.eh_frame_hdr) } } /* Do not exceed this mark in the error messages above | */