I didn't actually try this, but it might work that way:
- Backup anything that is going to be installed, in particular
/usr/bin/gcc, /usr/bin/as, /usr/bin/ld
- install gcc 2.7.2. You probably need to do stage 1 only, otherwise
you might end up with an ELF binary.
- Restore gcc. It will now continue to use 2.5.8 by default (if that
is your current compiler). To generate for ELF, use gcc -V 2.7.2.
- Install the binutitls. You might want to give a different --prefix.
That way, you keep your original installation, while still having the
right tools to compile the kernel - you need to change the kernel
Makefile to actually use them, though.
OTOH, if you are willing to accept that ELF is built *by default*, and
a.out only when giving the '-b i486-linuxaout' option, you can use the
standard installation of gcc and binutils.
Hope this helps,
Martin