diff options
author | Alexey Neyman <stilor@att.net> | 2022-02-10 18:00:59 -0800 |
---|---|---|
committer | Alexey Neyman <stilor@att.net> | 2022-02-11 00:47:51 -0800 |
commit | 86c2982568de1ad4d4cc12a65b19231331484405 (patch) | |
tree | 2e0b3fb78c30877c0c152d59d0e0fff817b73822 /packages/binutils/2.37/0012-ld-pru-fix-resource_table-output-section-alignment.patch | |
parent | 1210b0c2f45e32ef0867ca00e16b6aadb6a81bf9 (diff) | |
download | crosstool-ng-86c2982568de1ad4d4cc12a65b19231331484405.tar.gz crosstool-ng-86c2982568de1ad4d4cc12a65b19231331484405.tar.bz2 crosstool-ng-86c2982568de1ad4d4cc12a65b19231331484405.zip |
Run patches thru `manage-packages -P`
This refreshes the line numbers, removes any fuzz (which would make any
future forward ports easier) and standardizes the patch/file headers
(which makes them easier to read).
Signed-off-by: Alexey Neyman <stilor@att.net>
Diffstat (limited to 'packages/binutils/2.37/0012-ld-pru-fix-resource_table-output-section-alignment.patch')
-rw-r--r-- | packages/binutils/2.37/0012-ld-pru-fix-resource_table-output-section-alignment.patch | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/packages/binutils/2.37/0012-ld-pru-fix-resource_table-output-section-alignment.patch b/packages/binutils/2.37/0012-ld-pru-fix-resource_table-output-section-alignment.patch new file mode 100644 index 00000000..863253e9 --- /dev/null +++ b/packages/binutils/2.37/0012-ld-pru-fix-resource_table-output-section-alignment.patch @@ -0,0 +1,53 @@ +From a9c3934f6cb4407c5aaae82ada3b859d8ca9df83 Mon Sep 17 00:00:00 2001 +From: Dimitar Dimitrov <dimitar@dinux.eu> +Date: Mon, 27 Sep 2021 22:43:24 +0300 +Subject: [PATCH] ld: pru: Fix resource_table output section alignment + +My commit 261980de18b added alignment for the resource table symbol. +But it is wrong. The Linux remoteproc driver loads and interprets the +contents of the .resource_table ELF section, not of a table symbol. + +Without this patch, if the linker happens to output padding for symbol +alignment, then the resource table contents as viewed by the kernel +loader would "shift" and look corrupted. + +ld/ChangeLog: + + * scripttempl/pru.sc (.resource_table): Align the output + section, not the first symbol. + +Signed-off-by: Dimitar Dimitrov <dimitar@dinux.eu> +(cherry picked from commit 5109a7bd9b87bdad530f2ebf97036e6087b4504d) +--- + ld/ChangeLog | 5 +++++ + ld/scripttempl/pru.sc | 7 +++---- + 2 files changed, 8 insertions(+), 4 deletions(-) + +--- a/ld/ChangeLog ++++ b/ld/ChangeLog +@@ -1,3 +1,8 @@ ++2021-09-30 Dimitar Dimitrov <dimitar@dinux.eu> ++ ++ * scripttempl/pru.sc (.resource_table): Align the output ++ section, not the first symbol. ++ + 2021-07-18 Nick Clifton <nickc@redhat.com> + + * 2.37 release. +--- a/ld/scripttempl/pru.sc ++++ b/ld/scripttempl/pru.sc +@@ -151,11 +151,10 @@ + ${RELOCATING+ PROVIDE (_data_end = .) ; } + } ${RELOCATING+ > dmem } + +- .resource_table ${RELOCATING-0} : ++ /* Linux remoteproc loader requires the resource_table section ++ start address to be aligned to 8 bytes. */ ++ .resource_table ${RELOCATING-0} ${RELOCATING+ ALIGN(8)} : + { +- /* Linux remoteproc loader requires the resource table address +- to be aligned to 8 bytes. */ +- ${RELOCATING+. = ALIGN(8);} + KEEP (*(.resource_table)) + } ${RELOCATING+ > dmem} + |