package/binutils: disable binutils >= 2.33.1 for configurations using BR2_BINFMT_FLAT
PATCH 1/2 package/binutils: disable binutils >= 2.33.1 for configurations using BR2_BINFMT_FLAT
The patch added by [1] to fix a segfault with elf2flt when binutils 2.33.1 is used on ARM, introduce a regression with previous binutils version on m68k and ARM.
Theses issues has been reported upstreme [2] [3].
For now, disable binutils >= 2.33.1 for configurations using BR2_BINFMT_FLAT.
[1] 2b064f86b6a0fd683f307b51f12d9d919fcaa386
[2] https://github.com/uclinux-dev/elf2flt/pull/16
[3] https://github.com/uclinux-dev/elf2flt/issues/12
--- package/binutils/Config.in.host | 3 +++ 1 file changed, 3 insertions(+)
package/binutils/Config.in.host +3 -0
@@ -24,6 +24,9 @@ config BR2_BINUTILS_VERSION_2_32_X config BR2_BINUTILS_VERSION_2_33_X bool "binutils 2.33.1" depends on !BR2_csky + # https://github.com/uclinux-dev/elf2flt/pull/16 + # https://github.com/uclinux-dev/elf2flt/issues/12 + depends on !BR2_BINFMT_FLAT config BR2_BINUTILS_VERSION_ARC bool "binutils arc (2.31)"
Signature · 1 line
2.24.1
PATCH 2/2 package/elf2flt: remove backported patch
The patch added by [1] to fix a segfault with elf2flt when binutils 2.33.1 is used on ARM, introduce a regression with previous binutils version on m68k and ARM.
Theses issues has been reported upstream [2] [3] but there is no definitive solution.
The binutils 2.33.1 has been disabled for configurations using BR2_BINFMT_FLAT by the previous commit, so we can safely remove the patch.
Fixes:
[acpica-20191018]
http://autobuild.buildroot.net/results/81ee33eb606062a62765d95b66a26f130d280c53
[augeas-1.12.0]
http://autobuild.buildroot.net/results/4e1f7f335d2c853e2a5e6ad96c14157ba8f003c7
[cairo-1.16.0]
http://autobuild.buildroot.net/results/976d99bc9b052f8d9429e666ac7fff7768ffff6b
[fontconfig-2.13.1]
http://autobuild.buildroot.net/results/4a5a8cb6411d709acb7ea8c83b3c8e45fdc0a10b
[gptfdisk-1.0.4]
http://autobuild.buildroot.net/results/6db5f9d8663730a54b04c1e624438095598b2573
[libopenssl-1.1.1d]
http://autobuild.buildroot.net/results/acf87e81130e85e7fb05edf5f6dedf095f16e226
[mimic-1.1.0]
http://autobuild.buildroot.net/results/61f53630ed85ee0d0d6dbf71012db77f4d7986ad
Maybe more...
[1] 2b064f86b6a0fd683f307b51f12d9d919fcaa386
[2] https://github.com/uclinux-dev/elf2flt/pull/16
[3] https://github.com/uclinux-dev/elf2flt/issues/12
--- ...t-fix-relocations-for-read-only-data.patch | 58 ------------------- 1 file changed, 58 deletions(-) delete mode 100644 package/elf2flt/0002-elf2flt-fix-relocations-for-read-only-data.patch
package/elf2flt/0002-elf2flt-fix-relocations-for-read-only-data.patch deleted +0 -58
@@ -1,58 +0,0 @@ -From 6006e8d789f7a1129414fb3a8c930b094af0cafa Mon Sep 17 00:00:00 2001 -From: Greg Ungerer <[email protected]> -Date: Wed, 6 Nov 2019 21:19:24 +0100 -Subject: [PATCH] elf2flt: fix relocations for read-only data - -Readonly data sections are mapped into the "text" section in the -elf2flt.ld linker script. The relocation generation code is not handling -that case properly though, and is actually mapping any data section type -into the "data" section of the target binary. - -This problem case has been detected with elf2flt core dumping when used -with binutils-2.33.1 (on ARM architecture targets). See thread at: - - https://sourceware.org/ml/binutils/2019-10/msg00132.html - -Tested by Christophe Priouzeau [1] - -* binutils 2.33.1 -* buildroot 2019.11-rc1 -* patch on top of elf2flt (patch available on this thread) -* configuration: stm32f469-disco with initramfs configuration on buildroot - -Result: -Build: OK, all the binaries are generated -Runtime test on stm32f469-disco: OK - -[1] https://github.com/uclinux-dev/elf2flt/issues/12 - -Signed-off-by: Greg Ungerer <[email protected]> -Signed-off-by: Romain Naour <[email protected]> -Cc: Christophe Priouzeau <[email protected]> ---- - elf2flt.c | 8 +++++--- - 1 file changed, 5 insertions(+), 3 deletions(-) - -diff --git a/elf2flt.c b/elf2flt.c -index 67f720a..8973cef 100644 ---- a/elf2flt.c -+++ b/elf2flt.c -@@ -418,10 +418,12 @@ output_relocs ( - // continue; - - /* -- * Only relocate things in the data sections if we are PIC/GOT. -- * otherwise do text as well -+ * Only relocate things in the writable data sections if we are PIC/GOT. -+ * Otherwise do text (and read only data) as well. - */ -- if ((!pic_with_got || ALWAYS_RELOC_TEXT) && (a->flags & SEC_CODE)) -+ if ((!pic_with_got || ALWAYS_RELOC_TEXT) && -+ ((a->flags & SEC_CODE) || -+ ((a->flags & (SEC_DATA | SEC_READONLY)) == (SEC_DATA | SEC_READONLY)))) - sectionp = text + (a->vma - text_vma); - else if (a->flags & SEC_DATA) - sectionp = data + (a->vma - data_vma); --- -2.21.0 -
Signature · 1 line
2.24.1
PATCH 2/2 package/elf2flt: remove backported patch
Quoted 30 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Romain" == Romain Naour <[email protected]> writes:
The patch added by [1] to fix a segfault with elf2flt when binutils 2.33.1 is used on ARM, introduce a regression with previous binutils version on m68k and ARM.
Theses issues has been reported upstream [2] [3] but there is no definitive solution.
The binutils 2.33.1 has been disabled for configurations using
BR2_BINFMT_FLATby the previous commit, so we can safely remove the patch.Fixes:
[acpica-20191018]
http://autobuild.buildroot.net/results/81ee33eb606062a62765d95b66a26f130d280c53
[augeas-1.12.0]
http://autobuild.buildroot.net/results/4e1f7f335d2c853e2a5e6ad96c14157ba8f003c7
[cairo-1.16.0]
http://autobuild.buildroot.net/results/976d99bc9b052f8d9429e666ac7fff7768ffff6b
[fontconfig-2.13.1]
http://autobuild.buildroot.net/results/4a5a8cb6411d709acb7ea8c83b3c8e45fdc0a10b
[gptfdisk-1.0.4]
http://autobuild.buildroot.net/results/6db5f9d8663730a54b04c1e624438095598b2573
[libopenssl-1.1.1d]
http://autobuild.buildroot.net/results/acf87e81130e85e7fb05edf5f6dedf095f16e226
[mimic-1.1.0]
http://autobuild.buildroot.net/results/61f53630ed85ee0d0d6dbf71012db77f4d7986ad
Maybe more...
Quoted 5 lines
[1]
2b064f86b6a0fd683f307b51f12d9d919fcaa386
[2] https://github.com/uclinux-dev/elf2flt/pull/16
[3] https://github.com/uclinux-dev/elf2flt/issues/12Signed-off-by Romain Naour <[email protected]>
Committed, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 2/2 package/elf2flt: remove backported patch
In reply to Romain NaourQuoted 30 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Romain" == Romain Naour <[email protected]> writes:
The patch added by [1] to fix a segfault with elf2flt when binutils 2.33.1 is used on ARM, introduce a regression with previous binutils version on m68k and ARM.
Theses issues has been reported upstream [2] [3] but there is no definitive solution.
The binutils 2.33.1 has been disabled for configurations using
BR2_BINFMT_FLATby the previous commit, so we can safely remove the patch.Fixes:
[acpica-20191018]
http://autobuild.buildroot.net/results/81ee33eb606062a62765d95b66a26f130d280c53
[augeas-1.12.0]
http://autobuild.buildroot.net/results/4e1f7f335d2c853e2a5e6ad96c14157ba8f003c7
[cairo-1.16.0]
http://autobuild.buildroot.net/results/976d99bc9b052f8d9429e666ac7fff7768ffff6b
[fontconfig-2.13.1]
http://autobuild.buildroot.net/results/4a5a8cb6411d709acb7ea8c83b3c8e45fdc0a10b
[gptfdisk-1.0.4]
http://autobuild.buildroot.net/results/6db5f9d8663730a54b04c1e624438095598b2573
[libopenssl-1.1.1d]
http://autobuild.buildroot.net/results/acf87e81130e85e7fb05edf5f6dedf095f16e226
[mimic-1.1.0]
http://autobuild.buildroot.net/results/61f53630ed85ee0d0d6dbf71012db77f4d7986ad
Maybe more...
Quoted 5 lines
[1]
2b064f86b6a0fd683f307b51f12d9d919fcaa386
[2] https://github.com/uclinux-dev/elf2flt/pull/16
[3] https://github.com/uclinux-dev/elf2flt/issues/12Signed-off-by Romain Naour <[email protected]>
Committed to 2019.11.x, thanks. For 2019.11.x we don't offer binutils 2.33.x anyway.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 1/2 package/binutils: disable binutils >= 2.33.1 for configurations using BR2_BINFMT_FLAT
In reply to Romain NaourQuoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Romain" == Romain Naour <[email protected]> writes:
The patch added by [1] to fix a segfault with elf2flt when binutils 2.33.1 is used on ARM, introduce a regression with previous binutils version on m68k and ARM.
Theses issues has been reported upstreme [2] [3].
Quoted 8 lines
For now, disable binutils >= 2.33.1 for configurations using
BR2_BINFMT_FLAT.[1]
2b064f86b6a0fd683f307b51f12d9d919fcaa386
[2] https://github.com/uclinux-dev/elf2flt/pull/16
[3] https://github.com/uclinux-dev/elf2flt/issues/12Signed-off-by Romain Naour <[email protected]>
Committed, thanks.
Signature · 1 line
Bye, Peter Korsgaard