This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
ELIMINATE_COPY_RELOCS problems on ppc
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Alan Modra <amodra at bigpond dot net dot au>
- Cc: binutils at sources dot redhat dot com
- Date: Wed, 2 Apr 2003 16:42:28 +0200
- Subject: ELIMINATE_COPY_RELOCS problems on ppc
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
Hi!
cat > bin.s <<EOF
.text
.globl _start
_start: bl foo
.section .gnu.linkonce.t.foo,"ax",@progbits
.align 2
.weak foo
.type foo,@function
foo:
blr
.size foo,.Lfe2-foo
EOF
cat > shlib.s <<EOF
.globl foo
.type foo,@function
.size foo,4
foo: blr
EOF
cat > shlib.map <<EOF
FOO {
global: foo; local: *;
};
EOF
as -o bin.o bin.s
as -o shlib.o shlib.s
ld -shared -o shlib.so shlib.o --version-script shlib.map
ld -o bin bin.o ./shlib.so
segfaults the linker on ppc32 (while it used to work just fine
in hjl's 2.13.90.0.18).
This is distilled from following testcase, but doesn't bring in
libc:
/* gcc -O2 -finline-limit=1 -xc++ */
#include <stdio.h>
int main (void)
{
putchar (' ');
}
Jakub