Set entry point when text segment is missing.

This commit is contained in:
roy 2024-04-09 11:58:59 +08:00
parent d19644a6b4
commit 577de8a848
2 changed files with 35 additions and 1 deletions

View File

@ -0,0 +1,30 @@
https://sourceware.org/PR25678
https://bugs.gentoo.org/724614
From: mlimber <mlimber@gmail.com>
Date: Thu, 14 May 2020 13:09:05 -0400
Subject: [PATCH] PR symtab/25678: Set entry point when text segment is
missing. From patch by Jeremie Courreges-Anglas.
PR symtab/25678
* symfile.c: Set entry point when text segment is missing.
From patch by Jeremie Courreges-Anglas:
https://marc.info/?l=openbsd-ports&m=146569238229407&w=2
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -878,7 +878,12 @@ struct symfile_segment_data *
}
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;
+ }
}
}
--
1.9.1

View File

@ -1,6 +1,6 @@
Name: gdb
Version: 9.2
Release: 7
Release: 8
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
@ -151,6 +151,7 @@ Patch102: backport-CVE-2023-39128.patch
# Fedora patch end
Patch103: backport-CVE-2023-39129.patch
Patch104: backport-CVE-2023-39130.patch
Patch105: gdb-Set-entry-point-when-text-segment-is.patch
BuildRequires: rpm-libs autoconf
BuildRequires: readline-devel >= 6.2-4
@ -397,6 +398,9 @@ rm -f $RPM_BUILD_ROOT%{_datadir}/gdb/python/gdb/command/backtrace.py
%{_infodir}/gdb.info*
%changelog
* Tue Apr 09 2024 Yu Peng <yupeng@kylinos.cn> - 9.2-8
- Set entry point when text segment is missing.
* Wed Nov 22 2023 liningjie <liningjie@xfusion.com> - 9.2-7
- fix CVE-2023-39130