PATCH for i386: --no-copy-relocs

H . J . Lu hjl@lucon.org
Sat Jun 23 15:21:00 GMT 2001


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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bug.tar.gz
Type: application/x-gzip
Size: 536 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20010623/ef85efad/attachment.bin>


More information about the Binutils mailing list