summaryrefslogtreecommitdiff
path: root/0001-set-entry-point-when-text-segment-is-missing.patch
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2024-08-06 05:48:09 +0000
committerCoprDistGit <infra@openeuler.org>2024-08-06 05:48:09 +0000
commitab322c77aab87050c6ca0ce58e18f31e269e519b (patch)
tree7ff9c6a18efd867f35cb6f8fb08893c6b655376f /0001-set-entry-point-when-text-segment-is-missing.patch
parent19677e130f0cd283f7884cc4b6b3d52f8812dae5 (diff)
automatic import of gdbopeneuler24.03_LTS
Diffstat (limited to '0001-set-entry-point-when-text-segment-is-missing.patch')
-rw-r--r--0001-set-entry-point-when-text-segment-is-missing.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/0001-set-entry-point-when-text-segment-is-missing.patch b/0001-set-entry-point-when-text-segment-is-missing.patch
new file mode 100644
index 0000000..aa6ef9a
--- /dev/null
+++ b/0001-set-entry-point-when-text-segment-is-missing.patch
@@ -0,0 +1,30 @@
+From 6490b5d2ec9c575757308c860c48b75c8e824bfe Mon Sep 17 00:00:00 2001
+From: cenhuilin <cenhuilin@kylinos.cn>
+Date: Fri, 8 Jul 2022 03:22:14 +0000
+Subject: [PATCH] gdb set entry point when text segment is missing
+
+---
+ gdb/symfile.c | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/gdb/symfile.c b/gdb/symfile.c
+index 0eb48d0..9137183 100644
+--- a/gdb/symfile.c
++++ b/gdb/symfile.c
+@@ -863,7 +863,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
+