I've just hit the problem with relative paths in linker script not working for
gold in 2.21.53.0.2.
Someone else also hit this, so here is fedora bugreport from that person:
https://bugzilla.redhat.com/show_bug.cgi?id=635935
--
Arkadiusz MiĆkiewiczPLD/Linux Team
arekm / maven.pl
On Wednesday 24 of August 2011, Ian Lance Taylor wrote:
> Arkadiusz Miskiewicz writes:
> > Linux x86_64, 64 bit userspace
> >
> > binutils 2.21.53.0.2
> >
> > bfd works fine
> > $ ld.bfd -shared -o ulogd_BASE.so ulogd_BASE_sh.o -lc
> >
> > bu
Linux x86_64, 64 bit userspace
binutils 2.21.53.0.2
bfd works fine
$ ld.bfd -shared -o ulogd_BASE.so ulogd_BASE_sh.o -lc
but gold fails
$ ld.gold -shared -o ulogd_BASE.so ulogd_BASE_sh.o -lc
ld.gold: warning: skipping incompatible /usr/lib/libc.so while searching for c
ld.gold: error: cannot fi
Hi,
[arekm@ixion-pld ~]$ more ~/test/x.c
int main() { return 0; }
[arekm@ixion-pld ~]$ g++ -L/bin/sh ~/test/x.c
/usr/bin/ld: error: /bin/sh: can not read directory: Not a directory
collect2: ld returned 1 exit status
but
[arekm@ixion-pld ~]$ g++ -L/notexistant ~/test/x.c
[arekm@ixion-pld ~]$
(
uClibc does one test and checks exit status. For gold it causes internal
error.
binutils 2.21.51.0.9 on x86_64 linux.
$ ld.gold --hash-style=gnu -o /dev/null -b binary /dev/null
ld.gold: internal error in make_view, at fileread.cc:458
zsh: exit 1 ld.gold --hash-style=gnu -o /dev/null -b bin