From: Ralf Baechle <ralf@linux-mips.org>
To: Matthew Fortune <Matthew.Fortune@imgtec.com>
Cc: Aaro Koskinen <aaro.koskinen@iki.fi>,
"linux-mips@linux-mips.org" <linux-mips@linux-mips.org>,
David Daney <ddaney.cavm@gmail.com>
Subject: Re: old OCTEON bootloaders and .MIPS.abiflags
Date: Thu, 29 Oct 2015 22:35:45 +0100 [thread overview]
Message-ID: <20151029213544.GL26009@linux-mips.org> (raw)
In-Reply-To: <6D39441BF12EF246A7ABCE6654B0235361C6AA6F@LEMAIL01.le.imgtec.org>
On Wed, Oct 28, 2015 at 09:02:43PM +0000, Matthew Fortune wrote:
> Aaro Koskinen <aaro.koskinen@iki.fi> writes:
> > Current binutils adds .MIPS.abiflags section to the kernel vmlinux.
> >
> > This seems break the boot on some old (buggy) OCTEON bootloaders:
> >
> > ELF file is 64 bit
> > Attempting to allocate memory for ELF segment: addr: 0xffffffff816e67f0 (adjusted to:
> > 0x00000000016e67f0), size 0x18
> > Allocated memory for ELF segment: addr: 0xffffffff816e67f0, size 0x18
> > Attempting to allocate memory for ELF segment: addr: 0xffffffff81100000 (adjusted to:
> > 0x0000000001100000), size 0x1b86360
> > Error allocating memory for elf image!
> > ## ERROR loading File!
> >
> > The workaround is to remove the .MIPS.abiflags with "strip" - I guess that
> > is safe for the kernel... Not sure if there is nothing much else to be
> > done, and already a similar hack needs to be done for the .notes section.
> >
> > I just wanted to post this in case some else faces the same issue.
>
> It seems reasonably sensible to /DISCARD/ the .MIPS.abiflags section in the kernel link
> scripts as I don't think the kernel needs that information for any purpose. I assume
> .reginfo is discarded as well at some point.
Historically discarding .reginfo didn't work because it is generated
by ld after it has generated all the output sections according to the
linker script. So no matter what, one always ended up with a .reginfo.
This has been fixed at some point but I'm concerned the same behaviour
might have existed for .MIPS.abiflags as well and versions that do the
same thing with .MIPS.abiflags might still be around.
Ralf
next prev parent reply other threads:[~2015-10-29 21:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-28 19:54 FYI: old OCTEON bootloaders and .MIPS.abiflags Aaro Koskinen
2015-10-28 21:02 ` Matthew Fortune
2015-10-29 21:35 ` Ralf Baechle [this message]
2015-10-29 22:15 ` Matthew Fortune
2015-10-29 22:15 ` Matthew Fortune
2015-10-29 22:35 ` Ralf Baechle
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=20151029213544.GL26009@linux-mips.org \
--to=ralf@linux-mips.org \
--cc=Matthew.Fortune@imgtec.com \
--cc=aaro.koskinen@iki.fi \
--cc=ddaney.cavm@gmail.com \
--cc=linux-mips@linux-mips.org \
/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.