Worm and virus free code.
Alexandre Oliva
aoliva@redhat.com
Mon Sep 29 16:59:00 GMT 2003
On Sep 28, 2003, Ian Lance Taylor <ian@wasabisystems.com> wrote:
> This could be done at load time on an ELF system. It doesn't require
> any compiler work. The relatively easy way is to compile all your
> code with -fPIC, perhaps tweak the linker slightly to preserve all
> relocations in the executable, and tell the loader to randomize the
> load address.
That's called PIE (position-independent executable), and it has been
done before. GCC supports -fPIE, and recent versions of GNU ld
support -pie. There are patches for Linux (the kernel) that randomize
the load address of PIEs. These patches are available in the kernel
that ships with the Fedora Core test2 release. More information about
this feature is available in the release notes.
http://fedora.redhat.com/
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{redhat.com, gcc.gnu.org}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist Professional serial bug killer
More information about the Gcc
mailing list