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 0000000000000000000000000000000000000000..ad3e1a28dc239f9c591ec9ae970b43881450437d --- /dev/null +++ b/gdb-Set-entry-point-when-text-segment-is.patch @@ -0,0 +1,30 @@ +https://sourceware.org/PR25678 +https://bugs.gentoo.org/724614 + +From: mlimber +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 diff --git a/gdb.spec b/gdb.spec index 01f8d6636f5b709ea988b457753e0d96aeccff02..d91a876b858e4d36b00ed4b272a7ba22f6d79506 100644 --- a/gdb.spec +++ b/gdb.spec @@ -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 - 9.2-8 +- Set entry point when text segment is missing. + * Wed Nov 22 2023 liningjie - 9.2-7 - fix CVE-2023-39130