From c0424276648e54776cfc86a38c0a60082882384d Mon Sep 17 00:00:00 2001 From: Zhou Yanjie Date: Sat, 20 Jul 2019 13:52:22 +0800 Subject: [PATCH 1/2] =?UTF-8?q?X1000:=20x1000=5Fram.lds:=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E8=B0=83=E8=AF=95=E6=97=B6=E5=B4=A9=E6=BA=83=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98/Fix=20crash=20when=20debugging.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 当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 --- bsp/x1000/x1000_ram.lds | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/bsp/x1000/x1000_ram.lds b/bsp/x1000/x1000_ram.lds index 8cab15bb57..712f3d4b62 100644 --- a/bsp/x1000/x1000_ram.lds +++ b/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 : { From b6e8269cd612c77d5f054e02dee86290c362e865 Mon Sep 17 00:00:00 2001 From: Zhou Yanjie Date: Sat, 20 Jul 2019 14:19:15 +0800 Subject: [PATCH 2/2] =?UTF-8?q?X1000:=20x1000=5Fram.lds:=20=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E7=89=88=E6=9D=83=E4=BF=A1=E6=81=AF/Update=20copyrigh?= =?UTF-8?q?t=20information.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 更新版权信息。 Update copyright information. Signed-off-by: Zhou Yanjie --- bsp/x1000/x1000_ram.lds | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/bsp/x1000/x1000_ram.lds b/bsp/x1000/x1000_ram.lds index 712f3d4b62..45d5616fb0 100644 --- a/bsp/x1000/x1000_ram.lds +++ b/bsp/x1000/x1000_ram.lds @@ -1,23 +1,12 @@ /* - * File : x1000_ram.lds - * COPYRIGHT (C) 2015, RT-Thread Development Team + * Copyright (c) 2006-2019, RT-Thread Development Team * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * SPDX-License-Identifier: Apache-2.0 * * Change Logs: - * 2015-12-12 bernard first version + * Date Author Notes + * 2015-12-12 bernard first version + * 2019-04-04 Jean-Luc add support for large number of sections. */ OUTPUT_FORMAT("elf32-tradlittlemips", "elf32-tradlittlemips", "elf32-tradlittlemips")