Selaa lähdekoodia

Merge #62

62: Preserve .eh_frame and .eh_frame_hdr r=almindor a=Disasm

Preserving the `.eh_frame` section improves gdb stack traces on nightly.
Preserving the `.eh_frame_hdr` section fixes the linker problem `rust-lld: error: no memory region specified for section '.eh_frame_hdr'` introduced in https://github.com/rust-lang/rust/pull/73564

Co-authored-by: Vadim Kaushan <admin@disasm.info>
bors[bot] 4 vuotta sitten
vanhempi
commit
db65c40013
2 muutettua tiedostoa jossa 6 lisäystä ja 5 poistoa
  1. 4 0
      riscv-rt/CHANGELOG.md
  2. 2 5
      riscv-rt/link.x

+ 4 - 0
riscv-rt/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

+ 2 - 5
riscv-rt/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                                    | */