Browse Source

X1000: x1000_ram.lds: 修复调试时崩溃的问题/Fix crash when debugging.

当ELF文件包含很多gnu_extab*开头的section时(>100),会导致GDB在加载操作
时崩溃。通过创建一个section来对以该名称开头的所有section进行分组可以
解决该问题。

When ELF contains many sectios(>100) starting with name gnu_extab*,
will causing GDB to crash on load action. Solving the problem by
creating a section to group all sections which begin with that name.

Signed-off-by: Zhou Yanjie <zhouyanjie@zoho.com>
Zhou Yanjie 6 years ago
parent
commit
c042427664
1 changed files with 11 additions and 0 deletions
  1. 11 0
      bsp/x1000/x1000_ram.lds

+ 11 - 0
bsp/x1000/x1000_ram.lds

@@ -43,6 +43,11 @@ SECTIONS
 
     .text : 
     {
+        *(.text.unlikely .text.*_unlikely .text.unlikely.*)
+        *(.text.exit .text.exit.*)
+        *(.text.startup .text.startup.*)
+        *(.text.hot .text.hot.*)
+        *(.text .stub .text.* .gnu.linkonce.t.*)
         *(.text)                        /* remaining code */
         *(.text.*)                      /* remaining code */
         *(.rodata)                      /* read-only data (constants) */
@@ -87,6 +92,12 @@ SECTIONS
     } > DRAM
     .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) } > DRAM
 
+    . = ALIGN(4);
+    .gnu_extab :
+    {
+        *(.gnu_extab.*)
+    } > DRAM
+
     . = ALIGN(4);
     .ctors :
     {