From: Michael Chang <mchang@suse.com>
To: The development of GNU GRUB <grub-devel@gnu.org>
Subject: Re: [PATCH] Fix build error in binutils 2.36
Date: Mon, 9 Aug 2021 12:37:59 +0800 [thread overview]
Message-ID: <20210809043759.GA13488@mercury> (raw)
In-Reply-To: <20210805130721.ajskggdw6ma6emzj@tomti.i.net-space.pl>
On Thu, Aug 05, 2021 at 03:07:21PM +0200, Daniel Kiper wrote:
> On Mon, Aug 02, 2021 at 05:41:15PM +0800, Michael Chang via Grub-devel wrote:
> > The xen build fails on binutils 2.36 with the following error.
> >
> > /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld:
> > section .note.gnu.property VMA [0000000000400158,0000000000400187]
> > overlaps section .bss VMA [000000000000f000,000000000041e1af]
>
> Could you send us full command which is failing?
It is reproducible on xen platfrom with all defaults.
git clone https://git.savannah.gnu.org/git/grub.git
cd grub
./bootstrap
mkdir build-xen
cd build-xen
../configure --with-platform=xen
make
> Anyway, I would consider writing our own linker script which is dropping
> .note.gnu.property if we do not need it.
Dropping it from the assembler output is a cleaner cleanup than linker
script IMHO. We also faced similar issue in the past to stripping off
this section from soruces of objcopy to produce correct binary.
6643507ce build: Fix GRUB i386-pc build with Ubuntu gcc
To avoid falling into such trap again when manipulating on object files
we'd better use assmbler option as the fix once and for all.
> > The most significant factor is that new assembler (gnu as) generates the
>
> Could you give us gas version which does that?
# as --version
GNU assembler (GNU Binutils; openSUSE Tumbleweed) 2.36.1.20210326-4
Copyright (C) 2021 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or later.
This program has absolutely no warranty.
This assembler was configured for a target of `x86_64-suse-linux'.
> > .note.gnu.property section as default. This note section overlaps with
> > .bss because it doesn't reposition with -Wl,-Ttext,0 with which the base
> > address of .text section is set, rather the address of
> > .note.gnu.property is calculated for some reason from 0x400000 where the
> > elf executable defaults to start.
>
> Is not it linker bug?
The binutils upstream apparently doesn't seem to consider this as a bug ...
https://sourceware.org/bugzilla/show_bug.cgi?id=27377
Thanks,
Michael
>
> Daniel
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
next prev parent reply other threads:[~2021-08-09 4:38 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-02 9:41 [PATCH] Fix build error in binutils 2.36 Michael Chang
2021-08-05 13:07 ` Daniel Kiper
2021-08-09 4:37 ` Michael Chang [this message]
2021-09-14 14:13 ` Mike Gilbert
2021-09-15 11:17 ` Michael Chang
2021-09-16 21:47 ` Daniel Kiper
2021-09-17 7:55 ` Michael Chang
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=20210809043759.GA13488@mercury \
--to=mchang@suse.com \
--cc=grub-devel@gnu.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.