This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: PATCH for i386: --no-copy-relocs
On Sat, Jun 23, 2001 at 02:55:51AM +0930, Alan Modra wrote:
> On Thu, Jun 21, 2001 at 05:33:25PM -0700, Ian Lance Taylor wrote:
> >
> > If a symbol is only referenced from writable sections, then omitting
> > the COPY relocation is OK because those sections can not be shared anyhow.
>
> Here's a first pass at this change. Not overmuch tested yet ;)
> but I need to sleep. HJ, you said you'd happily test this for me,
> so here it is. ChangeLog coming later.
>
>
Here is a testcase.
# make
gcc -O -g -fPIC -c -o main.o main.c
gcc -O -g -fPIC -c -o foo.o foo.c
gcc -static -o foo main.o foo.o
for f in foo; do echo "Running: $f"; ./$f; \
if [ $? != 0 ]; then echo Failed; fi; done
Running: foo
Failed
# ./foo
zsh: 1862 segmentation fault ./foo
I am looking into it now.
H.J.
bug.tar.gz