[PATCH RSB 5] gdb-9-1: Add patch for linker error
Vijay Kumar Banerjee
vijay at rtems.org
Tue Mar 30 21:55:46 UTC 2021
Close #4366
---
rtems/config/tools/rtems-gdb-9.1-1.cfg | 3 +
.../patches/gdb-9-1-linker-error-fix.diff | 67 +++++++++++++++++++
2 files changed, 70 insertions(+)
create mode 100644 source-builder/patches/gdb-9-1-linker-error-fix.diff
diff --git a/rtems/config/tools/rtems-gdb-9.1-1.cfg b/rtems/config/tools/rtems-gdb-9.1-1.cfg
index 99e6571..3c398af 100644
--- a/rtems/config/tools/rtems-gdb-9.1-1.cfg
+++ b/rtems/config/tools/rtems-gdb-9.1-1.cfg
@@ -9,4 +9,7 @@
%define gdb_src_ext xz
%hash sha512 gdb-%{gdb_version}.tar.xz hM3UCNgKP8V3neRZxbJhVNMbMp695+OqeHmfseskXYtkuMjuckI4Kh29lbTm+dhP70HRKgZGqnXT3uRwnqH25w==
+%patch add gdb file://gdb-9-1-linker-error-fix.diff
+%hash sha512 gdb-9-1-linker-error-fix.diff QAtNCgJsDdfKno+IqHwqRGz1SR3YdTm34ERox2fqpgaGHI6H4GqNfmkJcJaIvSgzNxif24vqWO+bF/Djqa6wNg==
+
%include %{_configdir}/gdb-common-1.cfg
diff --git a/source-builder/patches/gdb-9-1-linker-error-fix.diff b/source-builder/patches/gdb-9-1-linker-error-fix.diff
new file mode 100644
index 0000000..d9b57d3
--- /dev/null
+++ b/source-builder/patches/gdb-9-1-linker-error-fix.diff
@@ -0,0 +1,67 @@
+diff --git a/sim/ppc/ld-insn.c b/sim/ppc/ld-insn.c
+index e39131ca133..585071a861f 100644
+--- a/sim/ppc/ld-insn.c
++++ b/sim/ppc/ld-insn.c
+@@ -28,6 +28,24 @@
+
+ #include "igen.h"
+
++static model *last_model;
++
++static insn *last_model_macro;
++static insn *last_model_function;
++static insn *last_model_internal;
++static insn *last_model_static;
++static insn *last_model_data;
++
++model *models;
++
++insn *model_macros;
++insn *model_functions;
++insn *model_internal;
++insn *model_static;
++insn *model_data;
++
++int max_model_fields_len;
++
+ static void
+ update_depth(insn_table *entry,
+ lf *file,
+diff --git a/sim/ppc/ld-insn.h b/sim/ppc/ld-insn.h
+index 88318ffa2b3..52baeaa2d84 100644
+--- a/sim/ppc/ld-insn.h
++++ b/sim/ppc/ld-insn.h
+@@ -200,25 +200,15 @@ extern insn_table *load_insn_table
+ table_include *includes,
+ cache_table **cache_rules);
+
+-model *models;
+-model *last_model;
++extern model *models;
+
+-insn *model_macros;
+-insn *last_model_macro;
++extern insn *model_macros;
++extern insn *model_functions;
++extern insn *model_internal;
++extern insn *model_static;
++extern insn *model_data;
+
+-insn *model_functions;
+-insn *last_model_function;
+-
+-insn *model_internal;
+-insn *last_model_internal;
+-
+-insn *model_static;
+-insn *last_model_static;
+-
+-insn *model_data;
+-insn *last_model_data;
+-
+-int max_model_fields_len;
++extern int max_model_fields_len;
+
+ extern void insn_table_insert_insn
+ (insn_table *table,
+--
--
2.26.2
More information about the devel
mailing list