From: Anton Blanchard <anton@samba.org>
To: Alan Modra <amodra@gmail.com>
Cc: Michael Neuling <mikey@neuling.org>,
Simon Horman <horms@verge.net.au>,
kexec@lists.infradead.org, Milton Miller <miltonm@bga.com>,
Matt Evans <matt@ozlabs.org>
Subject: Re: [PATCH 1/3] kexec-tools: powerpc: Fix 64bit optimize for size (gcc -Os) build
Date: Tue, 15 Nov 2011 09:24:06 +1100 [thread overview]
Message-ID: <20111115092406.31df5f9e@kryten> (raw)
In-Reply-To: <20111114221402.GJ14325@bubble.grove.modra.org>
Hi Alan,
> > commit 46b2d0b8a719 (kexec/powerpc fix optimization for size (gcc
> > -Os) build) added out of line GPR save/restore handlers for 32bit
> > -Os builds. This patch adds the handlers for 64bit builds.
>
> The linker is supposed to add these functions magically on final link
> for powerpc64. Um, I suppose you're doing something horrible with
> kexec, ld -r instead of normal final link at a guess?
Yeah:
gcc -g -O2 -fno-strict-aliasing -Wall -Wstrict-prototypes
-fno-zero-initialized-in-bss -m64 -Os -fno-builtin -ffreestanding -m64
-Wl,--no-undefined -nostartfiles -nostdlib -nodefaultlibs -e
purgatory_start -r -o purgatory/purgatory.ro purgatory/purgatory.o
purgatory/printf.o purgatory/string.o purgatory/arch/ppc64/v2wrap.o
purgatory/arch/ppc64/hvCall.o purgatory/arch/ppc64/purgatory-ppc64.o
purgatory/arch/ppc64/console-ppc64.o
purgatory/arch/ppc64/crashdump_backup.o purgatory/arch/ppc64/misc.o
purgatory/sha256.o
bin/bin-to-hex purgatory < purgatory/purgatory.ro > kexec/purgatory.c
I wonder why we aren't building and linking an -fpic object, wouldn't
it make the relocation code much simpler?
Anton
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
next prev parent reply other threads:[~2011-11-14 22:24 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-14 7:53 [PATCH 1/3] kexec-tools: powerpc: Fix 64bit optimize for size (gcc -Os) build Anton Blanchard
2011-11-14 7:54 ` [PATCH 2/3] kexec-tools: powerpc: Add more 64bit relocations Anton Blanchard
2011-11-14 7:56 ` [PATCH 3/3] kexec-tools: powerpc: Cleanup relocation code Anton Blanchard
2011-11-14 8:46 ` [PATCH 1/3] kexec-tools: powerpc: Fix 64bit optimize for size (gcc -Os) build Simon Horman
2011-11-14 22:14 ` Alan Modra
2011-11-14 22:24 ` Anton Blanchard [this message]
2011-11-14 22:30 ` Alan Modra
2011-11-17 23:48 ` Simon Horman
2011-11-28 11:49 ` Anton Blanchard
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=20111115092406.31df5f9e@kryten \
--to=anton@samba.org \
--cc=amodra@gmail.com \
--cc=horms@verge.net.au \
--cc=kexec@lists.infradead.org \
--cc=matt@ozlabs.org \
--cc=mikey@neuling.org \
--cc=miltonm@bga.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox