[project @ 2005-01-14 22:12:54 by wolfgang]
authorwolfgang <unknown>
Fri, 14 Jan 2005 22:12:55 +0000 (22:12 +0000)
committerwolfgang <unknown>
Fri, 14 Jan 2005 22:12:55 +0000 (22:12 +0000)
When -dynamic is specified but -fPIC is not, generate code that works around
the ELF dynamic linker's misguided attempts to keep the main program unaware
of dynamic linking.

This involves generating indirect references and computed jumps for position
dependent code, too, and making all constant data sections writable in order
to persuade ld to not use "COPY" relocations.

Tested on powerpc-linux; in theory, it also applies to i386-linux, but other
parts of the PIC story are missing there.

Note that the writable-const-data hack could be improved a bit by
distinguishing between "really" constant data and "relocatable" constant data,
which would be a nice thing to do anyway.


No differences found