From: Tim Deegan <tim@xen.org>
To: Daniel Kiper <daniel.kiper@oracle.com>
Cc: Simon Horman <horms@verge.net.au>,
kexec@lists.infradead.org, David Vrabel <david.vrabel@citrix.com>,
xen-devel@lists.xen.org
Subject: Re: [Xen-devel] [PATCH 1/5] purgatory: put variables altered by kexec in .data not .bss
Date: Tue, 17 Sep 2013 09:17:04 +0100 [thread overview]
Message-ID: <20130917081704.GA25707@ocelot.phlegethon.org> (raw)
In-Reply-To: <20130917013309.GA301@debian70-amd64.local.net-space.pl>
At 03:33 +0200 on 17 Sep (1379388789), Daniel Kiper wrote:
> On Mon, Sep 16, 2013 at 01:48:07PM +0100, David Vrabel wrote:
> > On 16/09/13 13:43, Daniel Kiper wrote:
> > > On Thu, Sep 12, 2013 at 09:00:38PM +0100, David Vrabel wrote:
> > >> From: David Vrabel <david.vrabel@citrix.com>
> > >>
> > >> elf_rel_set_symbol() fails if the symbol is in the .bss section.
> > >>
> > >> Signed-off-by: David Vrabel <david.vrabel@citrix.com>
> > >> ---
> > >> purgatory/arch/i386/console-x86.c | 6 +++---
> > >> purgatory/arch/i386/crashdump_backup.c | 8 +++++---
> > >> purgatory/arch/x86_64/purgatory-x86_64.c | 6 +++---
> > >> purgatory/include/purgatory.h | 4 ++++
> > >> purgatory/purgatory.c | 4 ++--
> > >> 5 files changed, 17 insertions(+), 11 deletions(-)
> > >>
> > >> diff --git a/purgatory/arch/i386/console-x86.c b/purgatory/arch/i386/console-x86.c
> > >> index 9773573..40a734b 100644
> > >> --- a/purgatory/arch/i386/console-x86.c
> > >> +++ b/purgatory/arch/i386/console-x86.c
> > >> @@ -55,9 +55,9 @@ static void putchar_vga(int ch)
> > >> */
> > >>
> > >> /* Base Address */
> > >> -uint8_t console_serial = 0;
> > >> -uint16_t serial_base = 0x3f8; /* TTYS0 */
> > >> -uint32_t serial_baud = 0;
> > >> +uint8_t console_serial __data = 0;
> > >> +uint16_t serial_base __data = 0x3f8; /* TTYS0 */
> > >> +uint32_t serial_baud __data = 0;
> > >
> > > Hmmm... I do not know why we need this patch. I can build kexec-tools
> > > in my env without it. I suppose that most of people can too.
> > > Could you check what is wrong with your build system?
> >
> > Regardless of whether it works with some tools, it doesn't make a whole
> > lot of sense to try and set the value of symbols in the .bss section.
> > .bss is only for symbols with a value of zero.
>
> To be precise .bss is only for uninitialized symbols. Anyway, probably
> your compiler is screwed. In my case it sees that a given symbol is
> initialized and places it in .data section itself.
David, are you using a compiler that doesn't support
-fno-zero-initialized-in-bss? If that's a supported optoin, then the
__data markers are indeed necessary.
Tim.
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
next prev parent reply other threads:[~2013-09-17 8:17 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-12 20:00 [PATCHv4 0/5] kexec-tools: add support for Xen 4.3 David Vrabel
2013-09-12 20:00 ` [PATCH 1/5] purgatory: put variables altered by kexec in .data not .bss David Vrabel
2013-09-16 12:43 ` Daniel Kiper
2013-09-16 12:48 ` David Vrabel
2013-09-17 1:33 ` Daniel Kiper
2013-09-17 8:17 ` Tim Deegan [this message]
2013-09-17 9:59 ` [Xen-devel] " David Vrabel
2013-09-17 10:02 ` David Vrabel
2013-09-12 20:00 ` [PATCH 2/5] kexec/xen: require libxc from Xen 4.4 David Vrabel
2013-09-12 20:00 ` [PATCH 3/5] kexec/xen: use libxc to get location of crash notes David Vrabel
2013-09-23 14:05 ` [Xen-devel] " Konrad Rzeszutek Wilk
2013-09-12 20:00 ` [PATCH 4/5] kexec/xen: switch to use xc_kexec_get_range for get_xen_vmcoreinfo David Vrabel
2013-09-12 20:00 ` [PATCH 5/5] kexec/xen: directly load images images into Xen David Vrabel
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=20130917081704.GA25707@ocelot.phlegethon.org \
--to=tim@xen.org \
--cc=daniel.kiper@oracle.com \
--cc=david.vrabel@citrix.com \
--cc=horms@verge.net.au \
--cc=kexec@lists.infradead.org \
--cc=xen-devel@lists.xen.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox