diff options
Diffstat (limited to 'meta-microblaze/recipes-devtools/gdb/gdb/0021-Adding-new-relocation-to-support-64bit-rodata.patch')
-rw-r--r-- | meta-microblaze/recipes-devtools/gdb/gdb/0021-Adding-new-relocation-to-support-64bit-rodata.patch | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb/0021-Adding-new-relocation-to-support-64bit-rodata.patch b/meta-microblaze/recipes-devtools/gdb/gdb/0021-Adding-new-relocation-to-support-64bit-rodata.patch index 0d212ccc..abfdd8d0 100644 --- a/meta-microblaze/recipes-devtools/gdb/gdb/0021-Adding-new-relocation-to-support-64bit-rodata.patch +++ b/meta-microblaze/recipes-devtools/gdb/gdb/0021-Adding-new-relocation-to-support-64bit-rodata.patch | |||
@@ -1,17 +1,18 @@ | |||
1 | From a485fdf959afb6cd079f482eeea9d3186e6393f8 Mon Sep 17 00:00:00 2001 | 1 | From 14a54cced8062343b83d7ff0e68f00bca562a509 Mon Sep 17 00:00:00 2001 |
2 | From: Nagaraju Mekala <nmekala@xilix.com> | 2 | From: Nagaraju Mekala <nmekala@xilix.com> |
3 | Date: Sat, 13 Oct 2018 21:17:01 +0530 | 3 | Date: Sat, 13 Oct 2018 21:17:01 +0530 |
4 | Subject: [PATCH 21/40] Adding new relocation to support 64bit rodata | 4 | Subject: [PATCH 21/52] Adding new relocation to support 64bit rodata |
5 | 5 | ||
6 | --- | 6 | --- |
7 | bfd/elf64-microblaze.c | 11 +++++++-- | 7 | bfd/elf64-microblaze.c | 11 +++++++-- |
8 | gas/config/tc-microblaze.c | 49 ++++++++++++++++++++++++++++++++++---- | ||
8 | 2 files changed, 54 insertions(+), 6 deletions(-) | 9 | 2 files changed, 54 insertions(+), 6 deletions(-) |
9 | 10 | ||
10 | diff --git a/bfd/elf64-microblaze.c b/bfd/elf64-microblaze.c | 11 | Index: gdb-9.2/bfd/elf64-microblaze.c |
11 | index 17e58748a0b..b62c47e8514 100644 | 12 | =================================================================== |
12 | --- a/bfd/elf64-microblaze.c | 13 | --- gdb-9.2.orig/bfd/elf64-microblaze.c |
13 | +++ b/bfd/elf64-microblaze.c | 14 | +++ gdb-9.2/bfd/elf64-microblaze.c |
14 | @@ -1463,6 +1463,7 @@ microblaze_elf_relocate_section (bfd *output_bfd, | 15 | @@ -1473,6 +1473,7 @@ microblaze_elf_relocate_section (bfd *ou |
15 | case (int) R_MICROBLAZE_64_PCREL : | 16 | case (int) R_MICROBLAZE_64_PCREL : |
16 | case (int) R_MICROBLAZE_64: | 17 | case (int) R_MICROBLAZE_64: |
17 | case (int) R_MICROBLAZE_32: | 18 | case (int) R_MICROBLAZE_32: |
@@ -19,16 +20,16 @@ index 17e58748a0b..b62c47e8514 100644 | |||
19 | { | 20 | { |
20 | /* r_symndx will be STN_UNDEF (zero) only for relocs against symbols | 21 | /* r_symndx will be STN_UNDEF (zero) only for relocs against symbols |
21 | from removed linkonce sections, or sections discarded by | 22 | from removed linkonce sections, or sections discarded by |
22 | @@ -1472,6 +1473,8 @@ microblaze_elf_relocate_section (bfd *output_bfd, | 23 | @@ -1482,6 +1483,8 @@ microblaze_elf_relocate_section (bfd *ou |
23 | relocation += addend; | 24 | relocation += addend; |
24 | if (r_type == R_MICROBLAZE_32) | 25 | if (r_type == R_MICROBLAZE_32)// || r_type == R_MICROBLAZE_IMML_64) |
25 | bfd_put_32 (input_bfd, relocation, contents + offset); | 26 | bfd_put_32 (input_bfd, relocation, contents + offset); |
26 | + else if (r_type == R_MICROBLAZE_IMML_64) | 27 | + else if (r_type == R_MICROBLAZE_IMML_64) |
27 | + bfd_put_64 (input_bfd, relocation, contents + offset); | 28 | + bfd_put_64 (input_bfd, relocation, contents + offset); |
28 | else | 29 | else |
29 | { | 30 | { |
30 | if (r_type == R_MICROBLAZE_64_PCREL) | 31 | if (r_type == R_MICROBLAZE_64_PCREL) |
31 | @@ -1549,7 +1552,7 @@ microblaze_elf_relocate_section (bfd *output_bfd, | 32 | @@ -1560,7 +1563,7 @@ microblaze_elf_relocate_section (bfd *ou |
32 | } | 33 | } |
33 | else | 34 | else |
34 | { | 35 | { |
@@ -37,7 +38,7 @@ index 17e58748a0b..b62c47e8514 100644 | |||
37 | { | 38 | { |
38 | outrel.r_info = ELF64_R_INFO (0, R_MICROBLAZE_REL); | 39 | outrel.r_info = ELF64_R_INFO (0, R_MICROBLAZE_REL); |
39 | outrel.r_addend = relocation + addend; | 40 | outrel.r_addend = relocation + addend; |
40 | @@ -1575,6 +1578,8 @@ microblaze_elf_relocate_section (bfd *output_bfd, | 41 | @@ -1586,6 +1589,8 @@ microblaze_elf_relocate_section (bfd *ou |
41 | relocation += addend; | 42 | relocation += addend; |
42 | if (r_type == R_MICROBLAZE_32) | 43 | if (r_type == R_MICROBLAZE_32) |
43 | bfd_put_32 (input_bfd, relocation, contents + offset); | 44 | bfd_put_32 (input_bfd, relocation, contents + offset); |
@@ -46,7 +47,7 @@ index 17e58748a0b..b62c47e8514 100644 | |||
46 | else | 47 | else |
47 | { | 48 | { |
48 | if (r_type == R_MICROBLAZE_64_PCREL) | 49 | if (r_type == R_MICROBLAZE_64_PCREL) |
49 | @@ -2072,7 +2077,8 @@ microblaze_elf_relax_section (bfd *abfd, | 50 | @@ -2098,7 +2103,8 @@ microblaze_elf_relax_section (bfd *abfd, |
50 | microblaze_bfd_write_imm_value_32 (abfd, ocontents + irelscan->r_offset, | 51 | microblaze_bfd_write_imm_value_32 (abfd, ocontents + irelscan->r_offset, |
51 | irelscan->r_addend); | 52 | irelscan->r_addend); |
52 | } | 53 | } |
@@ -56,7 +57,7 @@ index 17e58748a0b..b62c47e8514 100644 | |||
56 | { | 57 | { |
57 | isym = isymbuf + ELF64_R_SYM (irelscan->r_info); | 58 | isym = isymbuf + ELF64_R_SYM (irelscan->r_info); |
58 | 59 | ||
59 | @@ -2568,6 +2574,7 @@ microblaze_elf_check_relocs (bfd * abfd, | 60 | @@ -2606,6 +2612,7 @@ microblaze_elf_check_relocs (bfd * abfd, |
60 | case R_MICROBLAZE_64: | 61 | case R_MICROBLAZE_64: |
61 | case R_MICROBLAZE_64_PCREL: | 62 | case R_MICROBLAZE_64_PCREL: |
62 | case R_MICROBLAZE_32: | 63 | case R_MICROBLAZE_32: |
@@ -64,6 +65,3 @@ index 17e58748a0b..b62c47e8514 100644 | |||
64 | { | 65 | { |
65 | if (h != NULL && !bfd_link_pic (info)) | 66 | if (h != NULL && !bfd_link_pic (info)) |
66 | { | 67 | { |
67 | -- | ||
68 | 2.17.1 | ||
69 | |||