aboutsummaryrefslogtreecommitdiffstats
path: root/meta-microblaze/recipes-devtools/binutils
diff options
context:
space:
mode:
Diffstat (limited to 'meta-microblaze/recipes-devtools/binutils')
-rw-r--r--meta-microblaze/recipes-devtools/binutils/binutils-microblaze.inc9
-rw-r--r--meta-microblaze/recipes-devtools/binutils/binutils/0047-bfd-elf64-microblaze.c-Fix-build-failures.patch9
-rw-r--r--meta-microblaze/recipes-devtools/binutils/binutils/0054-Patch-MicroBlaze.patch173
-rw-r--r--meta-microblaze/recipes-devtools/binutils/binutils/0055-Patch-MicroBlaze-these-changes-will-make-64-bit-vect.patch31
4 files changed, 206 insertions, 16 deletions
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils-microblaze.inc b/meta-microblaze/recipes-devtools/binutils/binutils-microblaze.inc
index c1a7bb4c..b0a3f2de 100644
--- a/meta-microblaze/recipes-devtools/binutils/binutils-microblaze.inc
+++ b/meta-microblaze/recipes-devtools/binutils/binutils-microblaze.inc
@@ -54,11 +54,6 @@ SRC_URI_append = " \
file://0051-gdb-microblaze-tdep.c-Remove-unused-functions.patch \
file://0052-sim-Allow-microblaze-architecture.patch \
file://0053-gdb-Fix-microblaze-target-compilation.patch \
+ file://0054-Patch-MicroBlaze.patch \
+ file://0055-Patch-MicroBlaze-these-changes-will-make-64-bit-vect.patch \
"
-
-#
-## file://0048-bfd-gas-Use-standard-method-to-set-the-machine-arch.patch \
-## file://0052-opcodes-microblaze-opc.h-Expand-the-size-to-int-to-d.patch \
-## file://0053-opcodes-microblaze-opc.h-MIN_IMML-is-too-large.patch \
-## file://0054-gas-config-tc-microblaze.c-Resolve-numerous-compiler.patch \
-#
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0047-bfd-elf64-microblaze.c-Fix-build-failures.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0047-bfd-elf64-microblaze.c-Fix-build-failures.patch
index 3bc5f04d..423b224b 100644
--- a/meta-microblaze/recipes-devtools/binutils/binutils/0047-bfd-elf64-microblaze.c-Fix-build-failures.patch
+++ b/meta-microblaze/recipes-devtools/binutils/binutils/0047-bfd-elf64-microblaze.c-Fix-build-failures.patch
@@ -21,15 +21,6 @@ index 338f16eeee..cf84e0db4e 100644
input_bfd);
bfd_set_error (bfd_error_bad_value);
return FALSE;
-@@ -2691,7 +2691,7 @@ microblaze_elf_check_relocs (bfd * abfd,
- /* If this is a global symbol, we count the number of
- relocations we need for this symbol. */
- if (h != NULL)
-- head = &h->dyn_relocs;
-+ head = &((struct elf64_mb_link_hash_entry *) h)->dyn_relocs;
- else
- {
- /* Track dynamic relocs needed for local syms too.
@@ -2911,7 +2911,7 @@ microblaze_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
/* If we didn't find any dynamic relocs in read-only sections, then
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0054-Patch-MicroBlaze.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0054-Patch-MicroBlaze.patch
new file mode 100644
index 00000000..d5cf929a
--- /dev/null
+++ b/meta-microblaze/recipes-devtools/binutils/binutils/0054-Patch-MicroBlaze.patch
@@ -0,0 +1,173 @@
+From 75272152884a0cb003a8e45f8ca9ffa0ac43eea2 Mon Sep 17 00:00:00 2001
+From: Mahesh Bodapati <mbodapat@xilinx.com>
+Date: Thu, 15 Apr 2021 16:16:11 +0530
+Subject: [PATCH 54] [Patch,MicroBlaze]: 1. set BFD machine to
+ bfd_mach_microblaze64 for 64 bit elf. 2. XSDB and QEMU : agreed to append r
+ to all special registers except slr/shr
+
+---
+ bfd/elf64-microblaze.c | 11 +++++++++++
+ gdb/features/microblaze-core.xml | 4 ++--
+ gdb/features/microblaze-stack-protect.xml | 4 ++--
+ gdb/features/microblaze-with-stack-protect.c | 4 ++--
+ gdb/features/microblaze.c | 4 ++--
+ gdb/features/microblaze64-core.xml | 4 ++--
+ gdb/features/microblaze64-stack-protect.xml | 4 ++--
+ gdb/features/microblaze64-with-stack-protect.c | 4 ++--
+ gdb/features/microblaze64.c | 4 ++--
+ gdb/microblaze-tdep.c | 2 +-
+ 10 files changed, 28 insertions(+), 17 deletions(-)
+
+Index: gdb-9.2/bfd/elf64-microblaze.c
+===================================================================
+--- gdb-9.2.orig/bfd/elf64-microblaze.c
++++ gdb-9.2/bfd/elf64-microblaze.c
+@@ -3631,6 +3631,16 @@ microblaze_elf_finish_dynamic_sections (
+ return TRUE;
+ }
+
++static bfd_boolean
++microblaze_elf64_object_p (bfd *abfd)
++{
++ bfd_default_set_arch_mach (abfd, bfd_arch_microblaze,
++ bfd_mach_microblaze64);
++ return TRUE;
++}
++
++
++
+ /* Hook called by the linker routine which adds symbols from an object
+ file. We use it to put .comm items in .sbss, and not .bss. */
+
+@@ -3698,5 +3708,6 @@ microblaze_elf_add_symbol_hook (bfd *abf
+ #define elf_backend_finish_dynamic_symbol microblaze_elf_finish_dynamic_symbol
+ #define elf_backend_size_dynamic_sections microblaze_elf_size_dynamic_sections
+ #define elf_backend_add_symbol_hook microblaze_elf_add_symbol_hook
++/* #define elf_backend_object_p microblaze_elf64_object_p */
+
+ #include "elf64-target.h"
+Index: gdb-9.2/gdb/features/microblaze-core.xml
+===================================================================
+--- gdb-9.2.orig/gdb/features/microblaze-core.xml
++++ gdb-9.2/gdb/features/microblaze-core.xml
+@@ -64,6 +64,6 @@
+ <reg name="rtlbsx" bitsize="32"/>
+ <reg name="rtlblo" bitsize="32"/>
+ <reg name="rtlbhi" bitsize="32"/>
+- <reg name="rslr" bitsize="32"/>
+- <reg name="rshr" bitsize="32"/>
++ <reg name="slr" bitsize="32"/>
++ <reg name="shr" bitsize="32"/>
+ </feature>
+Index: gdb-9.2/gdb/features/microblaze-stack-protect.xml
+===================================================================
+--- gdb-9.2.orig/gdb/features/microblaze-stack-protect.xml
++++ gdb-9.2/gdb/features/microblaze-stack-protect.xml
+@@ -7,6 +7,6 @@
+
+ <!DOCTYPE feature SYSTEM "gdb-target.dtd">
+ <feature name="org.gnu.gdb.microblaze.stack-protect">
+- <reg name="rslr" bitsize="32"/>
+- <reg name="rshr" bitsize="32"/>
++ <reg name="slr" bitsize="32"/>
++ <reg name="shr" bitsize="32"/>
+ </feature>
+Index: gdb-9.2/gdb/features/microblaze-with-stack-protect.c
+===================================================================
+--- gdb-9.2.orig/gdb/features/microblaze-with-stack-protect.c
++++ gdb-9.2/gdb/features/microblaze-with-stack-protect.c
+@@ -72,8 +72,8 @@ initialize_tdesc_microblaze_with_stack_p
+ tdesc_create_reg (feature, "rtlbhi", 56, 1, NULL, 32, "int");
+
+ feature = tdesc_create_feature (result, "org.gnu.gdb.microblaze.stack-protect");
+- tdesc_create_reg (feature, "rslr", 57, 1, NULL, 32, "int");
+- tdesc_create_reg (feature, "rshr", 58, 1, NULL, 32, "int");
++ tdesc_create_reg (feature, "slr", 57, 1, NULL, 32, "int");
++ tdesc_create_reg (feature, "shr", 58, 1, NULL, 32, "int");
+
+ tdesc_microblaze_with_stack_protect = result;
+ }
+Index: gdb-9.2/gdb/features/microblaze.c
+===================================================================
+--- gdb-9.2.orig/gdb/features/microblaze.c
++++ gdb-9.2/gdb/features/microblaze.c
+@@ -70,8 +70,8 @@ initialize_tdesc_microblaze (void)
+ tdesc_create_reg (feature, "rtlbsx", 54, 1, NULL, 32, "int");
+ tdesc_create_reg (feature, "rtlblo", 55, 1, NULL, 32, "int");
+ tdesc_create_reg (feature, "rtlbhi", 56, 1, NULL, 32, "int");
+- tdesc_create_reg (feature, "rslr", 57, 1, NULL, 64, "uint64");
+- tdesc_create_reg (feature, "rshr", 58, 1, NULL, 64, "uint64");
++ tdesc_create_reg (feature, "slr", 57, 1, NULL, 64, "uint64");
++ tdesc_create_reg (feature, "shr", 58, 1, NULL, 64, "uint64");
+
+ tdesc_microblaze = result;
+ }
+Index: gdb-9.2/gdb/features/microblaze64-core.xml
+===================================================================
+--- gdb-9.2.orig/gdb/features/microblaze64-core.xml
++++ gdb-9.2/gdb/features/microblaze64-core.xml
+@@ -64,6 +64,6 @@
+ <reg name="rtlbsx" bitsize="32"/>
+ <reg name="rtlblo" bitsize="32"/>
+ <reg name="rtlbhi" bitsize="32"/>
+- <reg name="rslr" bitsize="64"/>
+- <reg name="rshr" bitsize="64"/>
++ <reg name="slr" bitsize="64"/>
++ <reg name="shr" bitsize="64"/>
+ </feature>
+Index: gdb-9.2/gdb/features/microblaze64-stack-protect.xml
+===================================================================
+--- gdb-9.2.orig/gdb/features/microblaze64-stack-protect.xml
++++ gdb-9.2/gdb/features/microblaze64-stack-protect.xml
+@@ -7,6 +7,6 @@
+
+ <!DOCTYPE feature SYSTEM "gdb-target.dtd">
+ <feature name="org.gnu.gdb.microblaze64.stack-protect">
+- <reg name="rslr" bitsize="64"/>
+- <reg name="rshr" bitsize="64"/>
++ <reg name="slr" bitsize="64"/>
++ <reg name="shr" bitsize="64"/>
+ </feature>
+Index: gdb-9.2/gdb/features/microblaze64-with-stack-protect.c
+===================================================================
+--- gdb-9.2.orig/gdb/features/microblaze64-with-stack-protect.c
++++ gdb-9.2/gdb/features/microblaze64-with-stack-protect.c
+@@ -72,8 +72,8 @@ initialize_tdesc_microblaze64_with_stack
+ tdesc_create_reg (feature, "rtlbhi", 56, 1, NULL, 32, "int");
+
+ feature = tdesc_create_feature (result, "org.gnu.gdb.microblaze64.stack-protect");
+- tdesc_create_reg (feature, "rslr", 57, 1, NULL, 64, "uint64");
+- tdesc_create_reg (feature, "rshr", 58, 1, NULL, 64, "uint64");
++ tdesc_create_reg (feature, "slr", 57, 1, NULL, 64, "uint64");
++ tdesc_create_reg (feature, "shr", 58, 1, NULL, 64, "uint64");
+
+ tdesc_microblaze64_with_stack_protect = result;
+ }
+Index: gdb-9.2/gdb/features/microblaze64.c
+===================================================================
+--- gdb-9.2.orig/gdb/features/microblaze64.c
++++ gdb-9.2/gdb/features/microblaze64.c
+@@ -70,8 +70,8 @@ initialize_tdesc_microblaze64 (void)
+ tdesc_create_reg (feature, "rtlbsx", 54, 1, NULL, 32, "int");
+ tdesc_create_reg (feature, "rtlblo", 55, 1, NULL, 32, "int");
+ tdesc_create_reg (feature, "rtlbhi", 56, 1, NULL, 32, "int");
+- tdesc_create_reg (feature, "rslr", 57, 1, NULL, 64, "uint64");
+- tdesc_create_reg (feature, "rshr", 58, 1, NULL, 64, "uint64");
++ tdesc_create_reg (feature, "slr", 57, 1, NULL, 64, "uint64");
++ tdesc_create_reg (feature, "shr", 58, 1, NULL, 64, "uint64");
+
+ tdesc_microblaze64 = result;
+ }
+Index: gdb-9.2/gdb/microblaze-tdep.c
+===================================================================
+--- gdb-9.2.orig/gdb/microblaze-tdep.c
++++ gdb-9.2/gdb/microblaze-tdep.c
+@@ -77,7 +77,7 @@ static const char *microblaze_register_n
+ "rpvr0", "rpvr1", "rpvr2", "rpvr3", "rpvr4", "rpvr5", "rpvr6",
+ "rpvr7", "rpvr8", "rpvr9", "rpvr10", "rpvr11",
+ "redr", "rpid", "rzpr", "rtlbx", "rtlbsx", "rtlblo", "rtlbhi",
+- "rslr", "rshr"
++ "slr", "shr"
+ };
+
+ #define MICROBLAZE_NUM_REGS ARRAY_SIZE (microblaze_register_names)
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0055-Patch-MicroBlaze-these-changes-will-make-64-bit-vect.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0055-Patch-MicroBlaze-these-changes-will-make-64-bit-vect.patch
new file mode 100644
index 00000000..b8e9e17c
--- /dev/null
+++ b/meta-microblaze/recipes-devtools/binutils/binutils/0055-Patch-MicroBlaze-these-changes-will-make-64-bit-vect.patch
@@ -0,0 +1,31 @@
+From 6b29e1a8ff62e01299ee07840b4443cbda5b8c61 Mon Sep 17 00:00:00 2001
+From: Mahesh Bodapati <mbodapat@xilinx.com>
+Date: Mon, 19 Apr 2021 14:33:27 +0530
+Subject: [PATCH 2/2] [Patch,MicroBlaze] : these changes will make 64 bit
+ vectors as default target types when we built gdb with microblaze 64 bit type
+ targets,for instance microblaze-xilinx-elf64/microblazeel-xilinx-elf64
+
+---
+ bfd/config.bfd | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+Index: gdb-9.2/bfd/config.bfd
+===================================================================
+--- gdb-9.2.orig/bfd/config.bfd
++++ gdb-9.2/bfd/config.bfd
+@@ -838,7 +838,15 @@ case "${targ}" in
+ targ_defvec=metag_elf32_vec
+ targ_underscore=yes
+ ;;
++ microblazeel*-*64)
++ targ_defvec=microblaze_elf64_le_vec
++ targ_selvecs=microblaze_elf64_vec
++ ;;
+
++ microblaze*-*64)
++ targ_defvec=microblaze_elf64_vec
++ targ_selvecs=microblaze_elf64_le_vec
++ ;;
+ microblazeel*-*)
+ targ_defvec=microblaze_elf32_le_vec
+ targ_selvecs=microblaze_elf32_vec