From 9632fa83d1bb690ff26035a2745625b370bd86e1 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Fri, 22 Oct 2021 19:41:46 +0200 Subject: bfin: unbreak build, elf2flt patch isn't bfin safe --- target/config/Config.in.binfmt | 3 ++ .../0005-arm.patch | 46 ---------------------- 2 files changed, 3 insertions(+), 46 deletions(-) delete mode 100644 toolchain/elf2flt/patches/453398f917d167f8c308c8f997270c48ae8f8b12/0005-arm.patch diff --git a/target/config/Config.in.binfmt b/target/config/Config.in.binfmt index bb837f730..61414d98d 100644 --- a/target/config/Config.in.binfmt +++ b/target/config/Config.in.binfmt @@ -11,6 +11,7 @@ config ADK_TARGET_BINFMT_ELF config ADK_TARGET_BINFMT_FLAT bool "FLAT" + select BUSYBOX_NOMMU select ADK_TARGET_UCLINUX if ADK_TARGET_ARCH_BFIN || ADK_TARGET_ARCH_ARM depends on ADK_TARGET_LIB_UCLIBC_NG depends on !ADK_TARGET_WITH_MMU @@ -19,10 +20,12 @@ config ADK_TARGET_BINFMT_FLAT config ADK_TARGET_BINFMT_FDPIC bool "FDPIC" + select BUSYBOX_NOMMU depends on ADK_TARGET_ARCH_ARM || ADK_TARGET_ARCH_BFIN || ADK_TARGET_ARCH_FRV || ADK_TARGET_ARCH_SH config ADK_TARGET_BINFMT_DSBT bool "DSBT" + select BUSYBOX_NOMMU depends on ADK_TARGET_ARCH_C6X endchoice diff --git a/toolchain/elf2flt/patches/453398f917d167f8c308c8f997270c48ae8f8b12/0005-arm.patch b/toolchain/elf2flt/patches/453398f917d167f8c308c8f997270c48ae8f8b12/0005-arm.patch deleted file mode 100644 index 247ff2b35..000000000 --- a/toolchain/elf2flt/patches/453398f917d167f8c308c8f997270c48ae8f8b12/0005-arm.patch +++ /dev/null @@ -1,46 +0,0 @@ -diff -Nur elf2flt-453398f917d167f8c308c8f997270c48ae8f8b12.orig/elf2flt.c elf2flt-453398f917d167f8c308c8f997270c48ae8f8b12/elf2flt.c ---- elf2flt-453398f917d167f8c308c8f997270c48ae8f8b12.orig/elf2flt.c 2021-02-08 14:02:15.000000000 +0100 -+++ elf2flt-453398f917d167f8c308c8f997270c48ae8f8b12/elf2flt.c 2021-04-09 20:40:19.386179197 +0200 -@@ -424,7 +424,8 @@ - */ - if ((!pic_with_got || ALWAYS_RELOC_TEXT) && - ((a->flags & SEC_CODE) || -- ((a->flags & (SEC_DATA | SEC_READONLY)) == (SEC_DATA | SEC_READONLY)))) -+ ((a->flags & (SEC_DATA | SEC_READONLY | SEC_RELOC)) == -+ (SEC_DATA | SEC_READONLY | SEC_RELOC)))) - sectionp = text + (a->vma - text_vma); - else if (a->flags & SEC_DATA) - sectionp = data + (a->vma - data_vma); -@@ -1861,7 +1862,9 @@ - bfd_size_type sec_size; - bfd_vma sec_vma; - -- if (s->flags & SEC_CODE) { -+ if ((s->flags & SEC_CODE) || -+ ((s->flags & (SEC_DATA | SEC_READONLY | SEC_RELOC)) == -+ (SEC_DATA | SEC_READONLY | SEC_RELOC))) { - vma = &text_vma; - len = &text_len; - } else if (s->flags & SEC_DATA) { -@@ -1896,7 +1899,9 @@ - - /* Read in all text sections. */ - for (s = abs_bfd->sections; s != NULL; s = s->next) -- if (s->flags & SEC_CODE) -+ if ((s->flags & SEC_CODE) || -+ ((s->flags & (SEC_DATA | SEC_READONLY | SEC_RELOC)) == -+ (SEC_DATA | SEC_READONLY | SEC_RELOC))) - if (!bfd_get_section_contents(abs_bfd, s, - text + (s->vma - text_vma), 0, - bfd_section_size(abs_bfd, s))) -@@ -1922,7 +1927,9 @@ - - /* Read in all data sections. */ - for (s = abs_bfd->sections; s != NULL; s = s->next) -- if (s->flags & SEC_DATA) -+ if ((s->flags & SEC_DATA) && -+ ((s->flags & (SEC_READONLY | SEC_RELOC)) != -+ (SEC_READONLY | SEC_RELOC))) - if (!bfd_get_section_contents(abs_bfd, s, - data + (s->vma - data_vma), 0, - bfd_section_size(abs_bfd, s))) -- cgit v1.2.3