All of lore.kernel.org
 help / color / mirror / Atom feed
From: Niklas Cassel via buildroot <buildroot@buildroot.org>
To: Waldemar Brodkorb <mail@waldemar-brodkorb.de>
Cc: Damien Le Moal <Damien.LeMoal@wdc.com>,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	"buildroot@buildroot.org" <buildroot@buildroot.org>
Subject: Re: [Buildroot] [PATCH 0/2] fix elf2flt on m68k
Date: Thu, 11 Aug 2022 08:04:23 +0000	[thread overview]
Message-ID: <YvS4BqvVGdBTNqje@x1-carbon> (raw)
In-Reply-To: <YvRBefZJhyhGU5ie@waldemar-brodkorb.de>

On Thu, Aug 11, 2022 at 01:38:33AM +0200, Waldemar Brodkorb wrote:
> Hi Niklas,
> 
> it still fails for qemu_xtensa_lx60_nommu_defconfig with:
> /home/wbx/buildroot/output/host/xtensa-buildroot-uclinux-uclibc/bin/elf2flt:
> ERROR: text=0x69904 overlaps data=0x569a0 ?

This is because of the same bad upstream elf2flt commit
ba379d08bb78 ("elf2flt: fix for segfault on some ARM ELFs"),
which fixed segfaults on ARM, but seems to have introduced
segfaults on some previously working archs.

The solution is to also include xtensa in my patch:

+  if ((s->flags & (SEC_DATA | SEC_READONLY | SEC_RELOC)) ==
+      (SEC_DATA | SEC_READONLY | SEC_RELOC)) {
+#if defined(TARGET_m68k) || defined(TARGET_riscv64) || defined(TARGET_xtensa)
+    if (!strcmp(".eh_frame", s->name))
+      return false;
+#endif
+    return true;
+  }
+  return false;

Let me send a v2 with this shortly.

However, if we keep adding additional, then we might
eventually be able to change it into a:

+#if defined (TARGET_arm)
+#else
+#endif


Kind regards,
Niklas

> 
> best regards
>  Waldemar
> 
> Niklas Cassel via buildroot wrote,
> 
> > Hello buildroot folks,
> > 
> > This series fixes a segfault at link time on m68k.
> > 
> > With this series, we have bootable m68k and riscv64.
> > 
> > (riscv64 was booting with the previous patch, but we
> > were simply lucky that we didn't observe the same
> > segfault there as well.)
> > 
> > 
> > Kind regards,
> > Niklas
> > 
> > Niklas Cassel (2):
> >   package/elf2flt: remove broken patch
> >   package/elf2flt: add another .eh_frame section handling patch
> > 
> >  ...3-elf2flt-add-riscv-64-bits-support.patch} |  0
> >  ...f2flt-fix-.eh_frame-section-handling.patch | 73 ------------------
> >  ...2flt-create-a-common-helper-function.patch | 76 +++++++++++++++++++
> >  ...l-error-regression-on-m68k-and-riscv.patch | 72 ++++++++++++++++++
> >  4 files changed, 148 insertions(+), 73 deletions(-)
> >  rename package/elf2flt/{0004-elf2flt-add-riscv-64-bits-support.patch => 0003-elf2flt-add-riscv-64-bits-support.patch} (100%)
> >  delete mode 100644 package/elf2flt/0003-elf2flt-fix-.eh_frame-section-handling.patch
> >  create mode 100644 package/elf2flt/0004-elf2flt-create-a-common-helper-function.patch
> >  create mode 100644 package/elf2flt/0005-elf2flt-fix-fatal-error-regression-on-m68k-and-riscv.patch
> > 
> > -- 
> > 2.37.1
> > 
> > _______________________________________________
> > buildroot mailing list
> > buildroot@buildroot.org
> > https://lists.buildroot.org/mailman/listinfo/buildroot
> > 
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

      reply	other threads:[~2022-08-11  8:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-10 10:09 [Buildroot] [PATCH 0/2] fix elf2flt on m68k Niklas Cassel via buildroot
2022-08-10 10:09 ` [Buildroot] [PATCH 1/2] package/elf2flt: remove broken patch Niklas Cassel via buildroot
2022-08-10 10:09 ` [Buildroot] [PATCH 2/2] package/elf2flt: add another .eh_frame section handling patch Niklas Cassel via buildroot
2022-08-10 23:38 ` [Buildroot] [PATCH 0/2] fix elf2flt on m68k Waldemar Brodkorb
2022-08-11  8:04   ` Niklas Cassel via buildroot [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YvS4BqvVGdBTNqje@x1-carbon \
    --to=buildroot@buildroot.org \
    --cc=Damien.LeMoal@wdc.com \
    --cc=Niklas.Cassel@wdc.com \
    --cc=mail@waldemar-brodkorb.de \
    --cc=thomas.petazzoni@bootlin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.