public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* GNU hash-style compatibility problem on x86_64
@ 2007-08-14  7:22 Greg Schafer
  2007-08-14 12:48 ` H.J. Lu
  0 siblings, 1 reply; 14+ messages in thread
From: Greg Schafer @ 2007-08-14  7:22 UTC (permalink / raw)
  To: binutils; +Cc: H.J. Lu

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)

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2007-08-29 16:43 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-14  7:22 GNU hash-style compatibility problem on x86_64 Greg Schafer
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

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).