Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1297837
| Path | csiph.com!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | James Hogan <james.hogan@imgtec.com> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH -next] MIPS: VDSO: Fix build error with binutils 2.24 and earlier |
| Date | Thu, 24 Dec 2015 13:50:01 +0100 |
| Message-ID | <qJdvb-6KI-1@gated-at.bofh.it> (permalink) |
| References | <qJ6k1-2vP-1@gated-at.bofh.it> |
| X-Original-To | Guenter Roeck <linux@roeck-us.net> |
| X-PGP-Universal | processed; by imgpgp01.kl.imgtec.org on Thu, 24 Dec 2015 12:48:13 +0000 |
| MIME-Version | 1.0 |
| Content-Type | multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="azLHFNyN32YCQGCU" |
| Content-Disposition | inline |
| User-Agent | Mutt/1.5.23 (2014-03-12) |
| X-Originating-IP | [192.168.154.110] |
| X-Esg-Encrypt-Tag | 30575414 |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 126 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | Ralf Baechle <ralf@linux-mips.org>, <linux-mips@linux-mips.org>, <linux-kernel@vger.kernel.org>, Qais Yousef <qais.yousef@imgtec.com> |
| X-Original-Date | Thu, 24 Dec 2015 12:48:12 +0000 |
| X-Original-Message-ID | <20151224124812.GA5376@jhogan-linux.le.imgtec.org> |
| X-Original-References | <1450933471-7357-1-git-send-email-linux@roeck-us.net> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1297837 |
Show key headers only | View raw
[Multipart message — attachments visible in raw view] - view raw
Hi Guenter,
On Wed, Dec 23, 2015 at 09:04:31PM -0800, Guenter Roeck wrote:
> Commit 2a037f310bab ("MIPS: VDSO: Fix build error") tries to fix a build
> error seen with binutils 2.24 and earlier. However, the fix does not work,
> and again results in the already known build errors if the kernel is built
> with an earlier version of binutils.
>
> CC arch/mips/vdso/gettimeofday.o
> /tmp/ccnOVbHT.s: Assembler messages:
> /tmp/ccnOVbHT.s:50: Error: can't resolve `_start' {*UND* section} - `L0 {.text section}
> /tmp/ccnOVbHT.s:374: Error: can't resolve `_start' {*UND* section} - `L0 {.text section}
> scripts/Makefile.build:258: recipe for target 'arch/mips/vdso/gettimeofday.o' failed
> make[2]: *** [arch/mips/vdso/gettimeofday.o] Error 1
>
> Fixes: 2a037f310bab ("MIPS: VDSO: Fix build error")
> Cc: Qais Yousef <qais.yousef@imgtec.com>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> ---
> Tested with binutils 2.25 and 2.22.
>
> arch/mips/vdso/Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/mips/vdso/Makefile b/arch/mips/vdso/Makefile
> index 018f8c7b94f2..14568900fc1d 100644
> --- a/arch/mips/vdso/Makefile
> +++ b/arch/mips/vdso/Makefile
> @@ -26,7 +26,7 @@ aflags-vdso := $(ccflags-vdso) \
> # the comments on that file.
> #
> ifndef CONFIG_CPU_MIPSR6
> - ifeq ($(call ld-ifversion, -lt, 22500000, y),)
> + ifeq ($(call ld-ifversion, -lt, 22500000, y),y)
I agree this is semantically correct, but there is something more evil
going on here.
Originally the check was version <= 2.24
Qais' patch changed it to version >= 2.25 (intending version < 2.25)
Your patch changes it to version < 2.25
I think the reason this fixed the problem for Qais is actually that he
probably had a similar toolchain version to what I'm using:
GNU ld (Codescape GNU Tools 2015.06-05 for MIPS MTI Linux) 2.24.90
./scripts/ld-version.sh does this:
print a[1]*10000000 + a[2]*100000 + a[3]*10000 + a[4]*100 + a[5];
which changes that version number into:
20000000
+ 2400000
+ 900000 = 23300000
I.e. it doesn't expect a[3] to be >= 10.
Should we do something like this (increase multipliers on a[1] and
a[2])?:
diff --git a/scripts/ld-version.sh b/scripts/ld-version.sh
index 198580d245e0..0b67edc5bc6f 100755
--- a/scripts/ld-version.sh
+++ b/scripts/ld-version.sh
@@ -3,6 +3,6 @@
{
gsub(".*)", "");
split($1,a, ".");
- print a[1]*10000000 + a[2]*100000 + a[3]*10000 + a[4]*100 + a[5];
+ print a[1]*100000000 + a[2]*1000000 + a[3]*10000 + a[4]*100 + a[5];
exit
}
which gives 2.24.90 => 224900000.
All call sites would need updating too to add the extra 0, but a quick
git grep isn't showing any other ones than this one.
Cheers
James
> $(warning MIPS VDSO requires binutils >= 2.25)
> obj-vdso-y := $(filter-out gettimeofday.o, $(obj-vdso-y))
> ccflags-vdso += -DDISABLE_MIPS_VDSO
> --
> 2.1.4
>
>
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH -next] MIPS: VDSO: Fix build error with binutils 2.24 and earlier Guenter Roeck <linux@roeck-us.net> - 2015-12-24 06:10 +0100
Re: [PATCH -next] MIPS: VDSO: Fix build error with binutils 2.24 and earlier James Hogan <james.hogan@imgtec.com> - 2015-12-24 13:50 +0100
Re: [PATCH -next] MIPS: VDSO: Fix build error with binutils 2.24 and earlier James Hogan <james.hogan@imgtec.com> - 2015-12-24 14:00 +0100
Re: [PATCH -next] MIPS: VDSO: Fix build error with binutils 2.24 and earlier Guenter Roeck <linux@roeck-us.net> - 2015-12-24 16:30 +0100
csiph-web