Browse Source

Preserve .eh_frame and .eh_frame_hdr

Vadim Kaushan 4 years ago
parent
commit
2880a75b23
1 changed files with 2 additions and 5 deletions
  1. 2 5
      riscv-rt/link.x

+ 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                                    | */