diff options
| author | Nathan Rossi <nathan@nathanrossi.com> | 2017-03-10 18:23:24 +1000 |
|---|---|---|
| committer | Nathan Rossi <nathan@nathanrossi.com> | 2017-03-24 20:50:49 +1000 |
| commit | 45ac3391fe68fd69bc3c305f4a108766dcfc22c3 (patch) | |
| tree | aae72f1521a3947a0fe54f8c27dd6e7fa51c8539 /recipes-microblaze | |
| parent | 775e4105898ce193f82ad7d7ca2b6f2361ea888f (diff) | |
| download | meta-xilinx-45ac3391fe68fd69bc3c305f4a108766dcfc22c3.tar.gz | |
binutils: Drop MicroBlaze RELA patch, fixed in 2.28
The MicroBlaze RELA issue is resolved in binutils 2.28, the patch is no
longer required, drop the patch from SRC_URI and delete the patch.
Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
Diffstat (limited to 'recipes-microblaze')
| -rw-r--r-- | recipes-microblaze/binutils/binutils%.bbappend | 1 | ||||
| -rw-r--r-- | recipes-microblaze/binutils/files/bfd-elf32-microblaze.c-Fix-regression-with-RELA.patch | 103 |
2 files changed, 0 insertions, 104 deletions
diff --git a/recipes-microblaze/binutils/binutils%.bbappend b/recipes-microblaze/binutils/binutils%.bbappend index 0f3b0ef7..2a53ab74 100644 --- a/recipes-microblaze/binutils/binutils%.bbappend +++ b/recipes-microblaze/binutils/binutils%.bbappend | |||
| @@ -3,6 +3,5 @@ | |||
| 3 | FILESEXTRAPATHS_append := "${THISDIR}/files:" | 3 | FILESEXTRAPATHS_append := "${THISDIR}/files:" |
| 4 | SRC_URI_append_microblaze = " \ | 4 | SRC_URI_append_microblaze = " \ |
| 5 | file://upstream-change-to-garbage-collection-s.patch \ | 5 | file://upstream-change-to-garbage-collection-s.patch \ |
| 6 | file://bfd-elf32-microblaze.c-Fix-regression-with-RELA.patch \ | ||
| 7 | " | 6 | " |
| 8 | 7 | ||
diff --git a/recipes-microblaze/binutils/files/bfd-elf32-microblaze.c-Fix-regression-with-RELA.patch b/recipes-microblaze/binutils/files/bfd-elf32-microblaze.c-Fix-regression-with-RELA.patch deleted file mode 100644 index 3f572a20..00000000 --- a/recipes-microblaze/binutils/files/bfd-elf32-microblaze.c-Fix-regression-with-RELA.patch +++ /dev/null | |||
| @@ -1,103 +0,0 @@ | |||
| 1 | From 86090b41b2fd86c5b5391fac9f5785e79fe177c2 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Nathan Rossi <nathan@nathanrossi.com> | ||
| 3 | Date: Sat, 24 Sep 2016 22:07:42 +1000 | ||
| 4 | Subject: [PATCH] bfd/elf32-microblaze.c: Fix regression with RELA* values | ||
| 5 | being wrong | ||
| 6 | |||
| 7 | Commit 4ade44b727ee77adaa9c22719935d012e253a5e6 introduced a change | ||
| 8 | to microblaze where the section was accessed from dynamic sections | ||
| 9 | instead of from the output bfd. This meant that for some shared objects | ||
| 10 | (mainly executables) the .rela.dyn section was not available, causing | ||
| 11 | the DT_RELA* table entries to be set to 0. | ||
| 12 | |||
| 13 | This change modifies how microblaze handles the setting of the various | ||
| 14 | dynamic table values. Specifically it lets the generic final function | ||
| 15 | handle setting RELA* values and modifies the RELASZ value of the dynamic | ||
| 16 | table by subtracting the size of other DT_RELA type sections (this is | ||
| 17 | how other targets handle the RELASZ value needing to only be the size of | ||
| 18 | the .rela.dyn section). This resolves the regression mentioned above. | ||
| 19 | |||
| 20 | Additionally this patch changes code for how dynamic table entries are | ||
| 21 | modified for microblaze specific requirements. This makes the microblaze | ||
| 22 | handling match how other targets modify the values. | ||
| 23 | |||
| 24 | Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> | ||
| 25 | Upstream-Status: Pending | ||
| 26 | --- | ||
| 27 | bfd/elf32-microblaze.c | 52 +++++++++++++++++++++++++++++--------------------- | ||
| 28 | 1 file changed, 30 insertions(+), 22 deletions(-) | ||
| 29 | |||
| 30 | diff --git a/bfd/elf32-microblaze.c b/bfd/elf32-microblaze.c | ||
| 31 | index 5496d1613a..34e8ae4261 100644 | ||
| 32 | --- a/bfd/elf32-microblaze.c | ||
| 33 | +++ b/bfd/elf32-microblaze.c | ||
| 34 | @@ -3381,36 +3381,44 @@ microblaze_elf_finish_dynamic_sections (bfd *output_bfd, | ||
| 35 | for (; dyncon < dynconend; dyncon++) | ||
| 36 | { | ||
| 37 | Elf_Internal_Dyn dyn; | ||
| 38 | - const char *name; | ||
| 39 | - bfd_boolean size; | ||
| 40 | + asection *s; | ||
| 41 | |||
| 42 | bfd_elf32_swap_dyn_in (dynobj, dyncon, &dyn); | ||
| 43 | |||
| 44 | switch (dyn.d_tag) | ||
| 45 | { | ||
| 46 | - case DT_PLTGOT: name = ".got.plt"; size = FALSE; break; | ||
| 47 | - case DT_PLTRELSZ: name = ".rela.plt"; size = TRUE; break; | ||
| 48 | - case DT_JMPREL: name = ".rela.plt"; size = FALSE; break; | ||
| 49 | - case DT_RELA: name = ".rela.dyn"; size = FALSE; break; | ||
| 50 | - case DT_RELASZ: name = ".rela.dyn"; size = TRUE; break; | ||
| 51 | - default: name = NULL; size = FALSE; break; | ||
| 52 | - } | ||
| 53 | + default: | ||
| 54 | + break; | ||
| 55 | |||
| 56 | - if (name != NULL) | ||
| 57 | - { | ||
| 58 | - asection *s; | ||
| 59 | + case DT_PLTGOT: | ||
| 60 | + s = bfd_get_linker_section (dynobj, ".got.plt"); | ||
| 61 | + if (s != NULL) | ||
| 62 | + dyn.d_un.d_ptr = s->output_section->vma + s->output_offset; | ||
| 63 | + bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon); | ||
| 64 | + break; | ||
| 65 | |||
| 66 | - s = bfd_get_linker_section (dynobj, name); | ||
| 67 | - if (s == NULL) | ||
| 68 | - dyn.d_un.d_val = 0; | ||
| 69 | - else | ||
| 70 | - { | ||
| 71 | - if (! size) | ||
| 72 | - dyn.d_un.d_ptr = s->output_section->vma + s->output_offset; | ||
| 73 | - else | ||
| 74 | - dyn.d_un.d_val = s->size; | ||
| 75 | - } | ||
| 76 | + case DT_PLTRELSZ: | ||
| 77 | + s = bfd_get_linker_section (dynobj, ".rela.plt"); | ||
| 78 | + if (s != NULL) | ||
| 79 | + dyn.d_un.d_val = s->size; | ||
| 80 | + bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon); | ||
| 81 | + break; | ||
| 82 | + | ||
| 83 | + case DT_JMPREL: | ||
| 84 | + s = bfd_get_linker_section (dynobj, ".rela.plt"); | ||
| 85 | + if (s != NULL) | ||
| 86 | + dyn.d_un.d_ptr = s->output_section->vma + s->output_offset; | ||
| 87 | + bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon); | ||
| 88 | + break; | ||
| 89 | + | ||
| 90 | + case DT_RELASZ: | ||
| 91 | + /* The PLT relocs are not counted in the RELASZ value of the | ||
| 92 | + * .dynamic table. */ | ||
| 93 | + s = bfd_get_linker_section (dynobj, ".rela.plt"); | ||
| 94 | + if (s != NULL) | ||
| 95 | + dyn.d_un.d_val -= s->size; | ||
| 96 | bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon); | ||
| 97 | + break; | ||
| 98 | } | ||
| 99 | } | ||
| 100 | |||
| 101 | -- | ||
| 102 | 2.9.3 | ||
| 103 | |||
