summaryrefslogtreecommitdiffstats
path: root/meta-xilinx-bsp/recipes-microblaze/gdb/files/0013-LOCAL-Fix-relaxation-of-assembler-resolved-reference.patch
diff options
context:
space:
mode:
authorManjukumar Matha <manjukumar.harthikote-matha@xilinx.com>2017-12-06 16:06:35 -0800
committerManjukumar Matha <manjukumar.harthikote-matha@xilinx.com>2017-12-13 16:11:14 -0800
commita18947c20dba2c0c38db8bde1ad4684995df4bbd (patch)
tree917bf2abbe439a6f99ede8cfafb25812dca54a9a /meta-xilinx-bsp/recipes-microblaze/gdb/files/0013-LOCAL-Fix-relaxation-of-assembler-resolved-reference.patch
parent6ddc5873b0ede30e6542f0ab151a6236acc37944 (diff)
downloadmeta-xilinx-a18947c20dba2c0c38db8bde1ad4684995df4bbd.tar.gz
meta-xilinx: Restructuring meta-xilinx to support multiple layers
As discussed previously on mailing list, we are proceeding with layer restructuring. For rocko release we will have the following layers meta-xilinx ->meta-xilinx-bsp (current meta-xilinx) ->meta-xilinx-contrib In the subsequent releases we will add other layers from Xilinx meta-xilinx ->meta-xilinx-bsp (current meta-xilinx) ->meta-petalinux ->meta-xilinx-tools ->meta-xilinx-contrib This will provide one clone to get all the required meta layers from Xilinx for a complete solution, and the users can blacklist any layer which they don't want to use using bblayer.conf. This will enables us to help our vendors/partners to add their reference designs, board definitions etc. Recipe changes : * Move reference design zybo-linux-bd.bb to meta-xilinx-contrib * Move kernel patches realted to zybo-linux-bd-zynq7 board to meta-xilinx-contrib * Update README Signed-off-by: Manjukumar Matha <manjukumar.harthikote-matha@xilinx.com>
Diffstat (limited to 'meta-xilinx-bsp/recipes-microblaze/gdb/files/0013-LOCAL-Fix-relaxation-of-assembler-resolved-reference.patch')
-rw-r--r--meta-xilinx-bsp/recipes-microblaze/gdb/files/0013-LOCAL-Fix-relaxation-of-assembler-resolved-reference.patch64
1 files changed, 64 insertions, 0 deletions
diff --git a/meta-xilinx-bsp/recipes-microblaze/gdb/files/0013-LOCAL-Fix-relaxation-of-assembler-resolved-reference.patch b/meta-xilinx-bsp/recipes-microblaze/gdb/files/0013-LOCAL-Fix-relaxation-of-assembler-resolved-reference.patch
new file mode 100644
index 00000000..3a0eae83
--- /dev/null
+++ b/meta-xilinx-bsp/recipes-microblaze/gdb/files/0013-LOCAL-Fix-relaxation-of-assembler-resolved-reference.patch
@@ -0,0 +1,64 @@
1From c9f1f07e5b0756069e3d4b04eb9505027f09677f Mon Sep 17 00:00:00 2001
2From: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
3Date: Tue, 14 Feb 2012 01:00:22 +0100
4Subject: [PATCH 13/16] [LOCAL]: Fix relaxation of assembler resolved
5 references
6
7Upstream-Status: Pending
8---
9 bfd/elf32-microblaze.c | 39 +++++++++++++++++++++++++++++++++++++++
10 1 file changed, 39 insertions(+)
11
12diff --git a/bfd/elf32-microblaze.c b/bfd/elf32-microblaze.c
13index cbd18f0..f90df47 100644
14--- a/bfd/elf32-microblaze.c
15+++ b/bfd/elf32-microblaze.c
16@@ -1968,6 +1968,45 @@ microblaze_elf_relax_section (bfd *abfd,
17 irelscanend = irelocs + o->reloc_count;
18 for (irelscan = irelocs; irelscan < irelscanend; irelscan++)
19 {
20+ if (ELF32_R_TYPE (irelscan->r_info) == (int) R_MICROBLAZE_NONE)
21+ {
22+ unsigned int val;
23+
24+ isym = isymbuf + ELF32_R_SYM (irelscan->r_info);
25+
26+ /* This was a PC-relative instruction that was completely resolved. */
27+ if (ocontents == NULL)
28+ {
29+ if (elf_section_data (o)->this_hdr.contents != NULL)
30+ ocontents = elf_section_data (o)->this_hdr.contents;
31+ else
32+ {
33+ /* We always cache the section contents.
34+ Perhaps, if info->keep_memory is FALSE, we
35+ should free them, if we are permitted to. */
36+
37+ if (o->rawsize == 0)
38+ o->rawsize = o->size;
39+ ocontents = (bfd_byte *) bfd_malloc (o->rawsize);
40+ if (ocontents == NULL)
41+ goto error_return;
42+ if (!bfd_get_section_contents (abfd, o, ocontents,
43+ (file_ptr) 0,
44+ o->rawsize))
45+ goto error_return;
46+ elf_section_data (o)->this_hdr.contents = ocontents;
47+ }
48+ }
49+
50+ irelscan->r_addend -= calc_fixup (irelscan->r_addend
51+ + isym->st_value, sec);
52+ val = bfd_get_32 (abfd, ocontents + irelscan->r_offset);
53+ microblaze_bfd_write_imm_value_32 (abfd, ocontents + irelscan->r_offset,
54+ irelscan->r_addend);
55+ }
56+ if (ELF32_R_TYPE (irelscan->r_info) == (int) R_MICROBLAZE_64_NONE) {
57+ fprintf(stderr, "Unhandled NONE 64\n");
58+ }
59 if (ELF32_R_TYPE (irelscan->r_info) == (int) R_MICROBLAZE_32)
60 {
61 isym = isymbuf + ELF32_R_SYM (irelscan->r_info);
62--
631.9.0
64