Skip to contentSkip to conversation

m68k: binfmt flat configuration fixes

PATCH New Waldemar Brodkorb 2 participants 2 messages Jul 4, 2016 – Jul 5, 2016

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 m68k: binfmt flat configuration fixes

The situation looks like following for elf2flt and binfmt FLAT: Only gcc for bfin/m68k implements -msep-data so we should depend on m68k and bfin. When the default is used on m68k, broken binaries are produced, which mainly end up in SIGILL, so do not use it for m68k.

---
v1 -> v2:
- bfin has sep-data support, recognized by Thomas Petazzoni

---
 arch/Config.in | 2 ++
 1 file changed, 2 insertions(+)
arch/Config.in +2 -0
index 1fdd36a..08cffdb 100644
@@ -360,11 +360,13 @@ choice
 
 config BR2_BINFMT_FLAT_ONE
 	bool "One memory region"
+	depends on !BR2_m68k
 	help
 	  All segments are linked into one memory region.
 
 config BR2_BINFMT_FLAT_SEP_DATA
 	bool "Separate data and code region"
+	depends on BR2_m68k || BR2_bfin
 	help
 	  Allow for the data and text segments to be separated and placed in
 	  different regions of memory.
Signature · 1 line
2.1.4
#1 lore raw

PATCH v2 1/1 m68k: binfmt flat configuration fixes

Hello,

Quoted 18 lines · Waldemar Brodkorb

The situation looks like following for elf2flt and binfmt FLAT: Only gcc for bfin/m68k implements -msep-data so we should depend on m68k and bfin. When the default is used on m68k, broken binaries are produced, which mainly end up in SIGILL, so do not use it for m68k.

---
v1 -> v2:
- bfin has sep-data support, recognized by Thomas Petazzoni

---
 arch/Config.in | 2 ++
 1 file changed, 2 insertions(+)
arch/Config.in +0 -0
index 1fdd36a..08cffdb 100644

arch/Config.in choice · line 369

Quoted 10 lines
arch/Config.in +2 -0
@@ -360,11 +360,13 @@ choice
 
 config BR2_BINFMT_FLAT_ONE
 	bool "One memory region"
+	depends on !BR2_m68k
 	help
 	  All segments are linked into one memory region.
 
 config BR2_BINFMT_FLAT_SEP_DATA
 	bool "Separate data and code region"
+	depends on BR2_m68k || BR2_bfin

This dependency also applies to BR2_BINFMT_FLAT_SHARED, so I've fixed that, changed the commit log to reflect this additional change and applied.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com