From 48a690d5240ca5320f80dccc21dec1071b0015ff Mon Sep 17 00:00:00 2001 From: roy Date: Wed, 13 Aug 2025 17:29:49 +0800 Subject: [PATCH] Set entry point when text segment is missing. --- ...Set-entry-point-when-text-segment-is.patch | 33 +++++++++++++++++++ gdb.spec | 6 +++- 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 gdb-Set-entry-point-when-text-segment-is.patch diff --git a/gdb-Set-entry-point-when-text-segment-is.patch b/gdb-Set-entry-point-when-text-segment-is.patch new file mode 100644 index 0000000..1a697c6 --- /dev/null +++ b/gdb-Set-entry-point-when-text-segment-is.patch @@ -0,0 +1,33 @@ +From db9db842dc669f5c77f183a17d35f2b6a8011097 Mon Sep 17 00:00:00 2001 +From: YuPeng +Date: Tue, 12 Nov 2024 17:04:38 +0800 +Subject: [PATCH] gdb-Set-entry-point-when-text-segment-is + +Signed-off-by: YuPeng +Confilct:NA +Reference:https://724614.bugs.gentoo.org/attachment.cgi?id=642002 +--- + gdb/symfile.c | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/gdb/symfile.c b/gdb/symfile.c +index a2d9980..09a6bd7 100644 +--- a/gdb/symfile.c ++++ b/gdb/symfile.c +@@ -883,7 +883,12 @@ init_entry_point_info (struct objfile *objfile) + } + + if (!found) +- ei->the_bfd_section_index = SECT_OFF_TEXT (objfile); ++ { ++ if (objfile->sect_index_text == -1) ++ ei->entry_point_p = 0; ++ else ++ ei->the_bfd_section_index = objfile->sect_index_text; ++ } + } + } + +-- +2.33.0 + diff --git a/gdb.spec b/gdb.spec index 676ad02..f44377c 100644 --- a/gdb.spec +++ b/gdb.spec @@ -1,6 +1,6 @@ Name: gdb Version: 11.1 -Release: 10 +Release: 11 License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and LGPLv3+ and BSD and Public Domain and GFDL-1.3 Source: ftp://sourceware.org/pub/gdb/releases/gdb-%{version}.tar.xz @@ -107,6 +107,7 @@ Patch88: backport-CVE-2023-39128.patch Patch89: backport-CVE-2023-39129.patch Patch90: backport-CVE-2023-39130.patch Patch91: backport-CVE-2022-48064.patch +Patch92: gdb-Set-entry-point-when-text-segment-is.patch %global gdb_src gdb-%{version} %global gdb_build build-%{_target_platform} @@ -383,6 +384,9 @@ rm -f $RPM_BUILD_ROOT%{_datadir}/gdb/python/gdb/command/backtrace.py %{_infodir}/gdb.info* %changelog +* Wed Aug 13 2025 Yu Peng - 11.1-11 +- Set entry point when text segment is missing. + * Mon Jul 14 2025 wangxiao - 11.1-10 - fix CVE-2022-48064 -- Gitee