diff options
author | Mark Hatle <mark.hatle@kernel.crashing.org> | 2020-08-13 15:25:54 -0500 |
---|---|---|
committer | Mark Hatle <mark.hatle@kernel.crashing.org> | 2020-08-14 11:56:34 -0500 |
commit | 276f2a014483170cfbcbf391c6350426e0a19fdc (patch) | |
tree | b68a8b36c7d5df81fa6adff396e1f255715dc0b2 /meta-microblaze/recipes-devtools/gdb/gdb/0020-Various-fixes.patch | |
parent | 559d46390c65d34c14b56a7f8690b1ac705430ac (diff) | |
download | meta-xilinx-276f2a014483170cfbcbf391c6350426e0a19fdc.tar.gz |
meta-microblaze: toolchains
Resync the microblaze toolchain items to match the latest YP master version.
binutils and gdb are based on the same patch set, but the release version
are based on slightly different sources, thus the patches are a bit
different.
Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org>
Diffstat (limited to 'meta-microblaze/recipes-devtools/gdb/gdb/0020-Various-fixes.patch')
-rw-r--r-- | meta-microblaze/recipes-devtools/gdb/gdb/0020-Various-fixes.patch | 98 |
1 files changed, 98 insertions, 0 deletions
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb/0020-Various-fixes.patch b/meta-microblaze/recipes-devtools/gdb/gdb/0020-Various-fixes.patch new file mode 100644 index 00000000..eb0bc982 --- /dev/null +++ b/meta-microblaze/recipes-devtools/gdb/gdb/0020-Various-fixes.patch | |||
@@ -0,0 +1,98 @@ | |||
1 | From 188a60b441711f663f07dc3c3902c8c5d590eb6c Mon Sep 17 00:00:00 2001 | ||
2 | From: Nagaraju Mekala <nmekala@xilix.com> | ||
3 | Date: Tue, 9 Oct 2018 10:14:22 +0530 | ||
4 | Subject: [PATCH 20/40] Various fixes | ||
5 | |||
6 | - Fixed address computation issues with 64bit address | ||
7 | - Fixed imml dissassamble issue | ||
8 | --- | ||
9 | bfd/bfd-in2.h | 5 +++ | ||
10 | bfd/elf64-microblaze.c | 14 ++++---- | ||
11 | opcodes/microblaze-dis.c | 2 +- | ||
12 | 4 files changed, 79 insertions(+), 16 deletions(-) | ||
13 | |||
14 | diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h | ||
15 | index 3899352b1d5..91761bf6964 100644 | ||
16 | --- a/bfd/bfd-in2.h | ||
17 | +++ b/bfd/bfd-in2.h | ||
18 | @@ -5378,6 +5378,11 @@ value in two words (with an imml instruction). No relocation is | ||
19 | done here - only used for relaxing */ | ||
20 | BFD_RELOC_MICROBLAZE_64, | ||
21 | |||
22 | +/* This is a 64 bit reloc that stores the 32 bit relative | ||
23 | +value in two words (with an imml instruction). No relocation is | ||
24 | +done here - only used for relaxing */ | ||
25 | + BFD_RELOC_MICROBLAZE_EA64, | ||
26 | + | ||
27 | /* This is a 64 bit reloc that stores the 32 bit pc relative | ||
28 | value in two words (with an imm instruction). No relocation is | ||
29 | done here - only used for relaxing */ | ||
30 | diff --git a/bfd/elf64-microblaze.c b/bfd/elf64-microblaze.c | ||
31 | index f8f52870639..17e58748a0b 100644 | ||
32 | --- a/bfd/elf64-microblaze.c | ||
33 | +++ b/bfd/elf64-microblaze.c | ||
34 | @@ -121,15 +121,15 @@ static reloc_howto_type microblaze_elf_howto_raw[] = | ||
35 | 0, /* Rightshift. */ | ||
36 | 4, /* Size (0 = byte, 1 = short, 2 = long). */ | ||
37 | 64, /* Bitsize. */ | ||
38 | - TRUE, /* PC_relative. */ | ||
39 | + FALSE, /* PC_relative. */ | ||
40 | 0, /* Bitpos. */ | ||
41 | complain_overflow_dont, /* Complain on overflow. */ | ||
42 | bfd_elf_generic_reloc,/* Special Function. */ | ||
43 | "R_MICROBLAZE_IMML_64", /* Name. */ | ||
44 | FALSE, /* Partial Inplace. */ | ||
45 | 0, /* Source Mask. */ | ||
46 | - 0x0000ffff, /* Dest Mask. */ | ||
47 | - TRUE), /* PC relative offset? */ | ||
48 | + 0xffffffffffffff, /* Dest Mask. */ | ||
49 | + FALSE), /* PC relative offset? */ | ||
50 | |||
51 | /* A 64 bit relocation. Table entry not really used. */ | ||
52 | HOWTO (R_MICROBLAZE_64, /* Type. */ | ||
53 | @@ -585,9 +585,9 @@ microblaze_elf_reloc_type_lookup (bfd * abfd ATTRIBUTE_UNUSED, | ||
54 | case BFD_RELOC_32: | ||
55 | microblaze_reloc = R_MICROBLAZE_32; | ||
56 | break; | ||
57 | - /* RVA is treated the same as 32 */ | ||
58 | + /* RVA is treated the same as 64 */ | ||
59 | case BFD_RELOC_RVA: | ||
60 | - microblaze_reloc = R_MICROBLAZE_32; | ||
61 | + microblaze_reloc = R_MICROBLAZE_IMML_64; | ||
62 | break; | ||
63 | case BFD_RELOC_32_PCREL: | ||
64 | microblaze_reloc = R_MICROBLAZE_32_PCREL; | ||
65 | @@ -619,7 +619,7 @@ microblaze_elf_reloc_type_lookup (bfd * abfd ATTRIBUTE_UNUSED, | ||
66 | case BFD_RELOC_VTABLE_ENTRY: | ||
67 | microblaze_reloc = R_MICROBLAZE_GNU_VTENTRY; | ||
68 | break; | ||
69 | - case BFD_RELOC_MICROBLAZE_64: | ||
70 | + case BFD_RELOC_MICROBLAZE_EA64: | ||
71 | microblaze_reloc = R_MICROBLAZE_IMML_64; | ||
72 | break; | ||
73 | case BFD_RELOC_MICROBLAZE_64_GOTPC: | ||
74 | @@ -1956,7 +1956,7 @@ microblaze_elf_relax_section (bfd *abfd, | ||
75 | efix = calc_fixup (target_address, 0, sec); | ||
76 | |||
77 | /* Validate the in-band val. */ | ||
78 | - val = bfd_get_32 (abfd, contents + irel->r_offset); | ||
79 | + val = bfd_get_64 (abfd, contents + irel->r_offset); | ||
80 | if (val != irel->r_addend && ELF64_R_TYPE (irel->r_info) == R_MICROBLAZE_32_NONE) { | ||
81 | fprintf(stderr, "%d: CORRUPT relax reloc %x %lx\n", __LINE__, val, irel->r_addend); | ||
82 | } | ||
83 | diff --git a/opcodes/microblaze-dis.c b/opcodes/microblaze-dis.c | ||
84 | index 437f536e96a..24ede714858 100644 | ||
85 | --- a/opcodes/microblaze-dis.c | ||
86 | +++ b/opcodes/microblaze-dis.c | ||
87 | @@ -78,7 +78,7 @@ get_field_imml (struct string_buf *buf, long instr) | ||
88 | { | ||
89 | char *p = strbuf (buf); | ||
90 | |||
91 | - sprintf (p, "%d", (short)((instr & IMML_MASK) >> IMM_LOW)); | ||
92 | + sprintf (p, "%d", (int)((instr & IMML_MASK) >> IMM_LOW)); | ||
93 | return p; | ||
94 | } | ||
95 | |||
96 | -- | ||
97 | 2.17.1 | ||
98 | |||