From: Greg Schafer <gschafer@zip.com.au>
To: binutils@sourceware.org
Cc: "H.J. Lu" <hjl@lucon.org>
Subject: GNU hash-style compatibility problem on x86_64
Date: Tue, 14 Aug 2007 07:22:00 -0000 [thread overview]
Message-ID: <20070814072231.GA1370@eyo32.local> (raw)
Hi,
Host platform is current x86_64:
HJL binutils-2.17.50.0.18
gcc-4.2.1
glibc-2.6.1 (glibc defaults to compiling with --hash-style=both)
The problem strikes on this host when attempting to natively bootstrap an
older toolchain (eg: with FSF binutils-2.17):
$ echo 'main(){}' | stage1/xgcc -Bstage1/ -xc -o /dev/null -
/lib64/libc.so.6: file not recognized: File format not recognized
collect2: ld returned 1 exit status
Essentially, the older ld chokes on the newer libc ie: the one compiled with
--hash-style=both (it affects any dso with --hash-style=gnu actually).
The weird thing is, it only happens on x86_64. I've tested the exact same
scenario on x86 and ppc and those arches both work fine. Why should x86_64
behave any differently here? This is all above my head so I would really
appreciate your help in understanding the root cause.
You should be able to easily reproduce this if your x86_64 host has a libc
that was compiled with --hash-style=both (latest Fedora, Debian lenny etc),
just build binutils-2.17 then try to link using its ld. Note: you might have
to fiddle with gcc specs if your host gcc is hardwired for --hash-style=gnu
Thanks
Greg
(yes, I could just use a newer binutils, or even cross compile, but that's
not the point)
next reply other threads:[~2007-08-14 7:22 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-14 7:22 Greg Schafer [this message]
2007-08-14 12:48 ` H.J. Lu
2007-08-14 12:56 ` Daniel Jacobowitz
2007-08-14 13:02 ` H.J. Lu
2007-08-14 13:07 ` Mike Frysinger
2007-08-14 13:23 ` Jakub Jelinek
2007-08-14 13:31 ` Mike Frysinger
2007-08-14 13:39 ` Daniel Jacobowitz
2007-08-14 22:45 ` Greg Schafer
2007-08-14 23:35 ` DJ Delorie
2007-08-15 0:58 ` Greg Schafer
2007-08-15 1:01 ` DJ Delorie
2007-08-25 0:05 ` Eric Botcazou
2007-08-29 17:12 ` Mike Frysinger
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=20070814072231.GA1370@eyo32.local \
--to=gschafer@zip.com.au \
--cc=binutils@sourceware.org \
--cc=hjl@lucon.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).