I keep changing kernels (gentoo, mandrake, lolo-sources, vanilla, linux-beta) and keeping track of the config options I set in each one of them has been impossible so far.
To find out the options set in any kernel image, the kernel has to be compiled with "Kernel .config support" enabled in General Setup. This corresponds to CONFIG_IKCONFIG.

The documentation in Documentation/Configure.help is not very helpful and after spending a few hours before I was able to find out what I had compiled the kernel with, I thought it'd be useful to other Gentoo-ers if I recorded it here.

This extraction is performed by a scripts/ikconfig-extract which has to be made executable with chmod +x scripts/ikconfig-extract . This tool requires a program called binoffset, the source code for which can be found at http://www.osdl.org/archive/rddunlap/patches/binoffset.c . Compile binoffset by doing gcc -o binoffset binoffset.c and cp the resulting binoffset executable to /usr/local/bin.

Type out the following command from /usr/src/linux/scripts (remember to make ikconfig-extract executable)

ikconfig-extract /path/to/bzImage

you'll find a file called bzImage.oldconfig.XXXX in /path/to . that's the kernel config. If you're like me and don't want to page through the entire thing, go to /usr/src/linux, run make menuconfig, select Load Alternate Configuration File and then enter /path/to/bzImage.oldconfig.XXXX