kernel/Makefile:
config.o:
sed -n 's/^COFIG_//p' $TOPDIR/.config | gzip -9 >config.gz.tmp
echo "SECTIONS { .data : { config_gz_len = .; \
LONG(config_gz_end - config_gz) \
config_gz = .; *(.data) \
config_gz_end = .; }}" > config.lnk
$(LD) -r -o config.o -b binary config.gz.tmp \
-b elf32-i386 -T config.lnk
and get_proc_config (goes somewhere into fs/proc/array.c) becomes:
extern char* config_gz[];
extern long config_gz_len;
int get_proc_config(char *page) {
memcpy(page, config_gz, config_gz_len);
return config_gz_len;
}
The only problem with this is that the ld option `-b elf32-i386' is
architecture specific and nobody has put it (yet) into a make variable
to be set in arch/$(ARCH)/Makefile.
Cheers, Roderich
-- "Report all obscene mail to your Potsmaster" Roderich Schupp mailto:rsch@ExperTeam.de ExperTeam GmbH http://www.experteam.de/ Munich, Germany linux:2.1.103
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu