* common.rmk (bin_UTILITIES): Add grub-pe2elf.
(grub_pe2elf_SOURCES): New macro.
(CLEANFILES): Add grub-pe2elf.
* include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
(GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
(GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
(GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
(GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
(GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
(GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
(GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
(GRUB_PE32_SCN_ALIGN_MASK): Likewise.
(GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
(GRUB_PE32_SYM_CLASS_STATIC): Likewise.
(GRUB_PE32_SYM_CLASS_FILE): Likewise.
(GRUB_PE32_DT_FUNCTION): Likewise.
(GRUB_PE32_REL_I386_DIR32): Likewise.
(GRUB_PE32_REL_I386_REL32): Likewise.
(grub_pe32_symbol): New structure.
(grub_pe32_reloc): Likewise.
* util/grub-pe2elf.c: New file.
* configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
start symbol in non pc platform.
* genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
The following patches are from Christian Franke.
* include/grub/dl.h: Remove .previous, gas supports this only
for ELF format.
* include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
Remove .type, gas supports this only for ELF format.
* kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
nullbytes in symbol table. This fixes an infinite loop if table is
zero filled.
* Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
TARGET_IMG_LDFLAGS and EXEEXT.
* aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
TARGET_IMG_LDFLAGS_AC.
(grub_CHECK_STACK_ARG_PROBE): New function.
* conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
* conf/i386-pc-cygwin-ld-img.sc: New linker script.
* configure.ac: Add check for linker script "conf/${target}-img-ld.c"
to set TARGET_IMG_LD* accordingly.
Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
Add call to grub_CHECK_STACK_ARG_PROBE.
Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
* genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
* genmk.rb: Add EXEEXT to CLEANFILES.
* kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P. We cannot
load foreign architecture modules correctly anyway. Keep
support for loading host architecture modules, whether we
compile them or not.
* include/grub/dl.h (grub_dl_check_header): New prototype.
(grub_arch_dl_check_header): Change return type to grub_err_t,
remove size parameter and export function. Update all callers.
* kern/dl.c (grub_dl_check_header): New function.
(grub_dl_load_core): Use `grub_dl_check_header' instead of
`grub_arch_dl_check_header'. Check ELF type. Check if sections
are inside the core.
* kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
independent ELF header checks.
* kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
* loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
`grub_dl_check_header' instead of explicit checks. Check for the
ELF type.
* loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
`grub_dl_check_header' instead of explicit checks. Remove arch
specific ELF header checks.
* genmk.rb: Handle the `Program' class in the main loop. Written
by Johan Rydberg <jrydberg@gnu.org>.
(Program): New class.
(programs): New variable.
* boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
instead of "grub/kernel.h". Include <grub/machine/init.h>.
(help_arch): Function removed.
* conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
`powerpc/libgcc.h' and `loader.h'.
(pkgdata_PROGRAMS): New variable.
(sbin_UTILITIES): Variable removed.
(grub_emu_SOURCES): Added kern/powerpc/cache.S.
(grubof_SOURCES): Variable re-defined so it only includes the
core functionality.
(grubof_CFLAGS): Remove `-DGRUBOF'.
(pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
(fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
(ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
(minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
(hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
(iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
(_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
(normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
(hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
(boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
(ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
(cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
(font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
(apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
(pc_mod_CFLAGS): New variables.
* disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
(grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
* include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
* include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
Moved from here...
* include/grub/i386/pc/init.h (grub_os_area_addr)
(rub_os_area_size): ... to here.
* include/grub/powerpc/ieee1275/ieee1275.h
(grub_ieee1275_entry_fn): Export symbol.
* include/grub/powerpc/ieee1275/init.h: New file.
* include/grub/powerpc/libgcc.h: Likewise.
* include/grub/cache.h: Likewise.
* kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
<hollis@penguinppc.org>.
* kern/dl.c: Include <grub/cache.h>.
(grub_dl_flush_cache): New function.
(grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
for this module.
* kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
(grub_console_init): Removed prototypes.
(grub_machine_init): Don't initialize the modules anymore.
* kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
static.
* include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
Macro undef removed.
(GRUB_HOST_WORDS_BIGENDIAN): New macro.
* kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
relocation `R_PPC_REL32'. Return an error when the relocation is
unknown.
* Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
* kern/i386/pc/init.c (grub_arch_sync_caches): New function.
* util/misc.c (grub_arch_sync_caches): Likewise.
All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
and grub_, respectively. Because the conversion is trivial and
mechanical, I omit the details here. Please refer to the CVS
if you need more information.
* commands/boot.c: New file.
* commands/cat.c: Likewise.
* commands/cmp.c: Likewise.
* commands/ls.c: Likewise.
* commands/terminal.c: Likewise.
* normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
(pupa_register_command): Changed interface to match the new
argument parser.
(pupa_command_execute): Changed (almost rewritten) so it uses
pupa_split_command. Added support for setting variables using the
syntax `foo=bar'.
(rescue_command): Changed to work with the new argument parser.
(terminal_command): Moved from here to commands/terminal.c.
(set_command): New function.
(unset_command): New function.
(insmod_command): New function.
(rmmod_command): New function.
(lsmod_command): New function.
(pupa_command_init): Don't initialize the command terminal
anymore. Initialize the commands set, unset, insmod, rmmod and
lsmod.
* conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
(kernel_img_HEADERS): Add arg.h and env.h.
(pupa_mkimage_LDFLAGS): Add kern/env.c.
(pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
normal/arg.c.
(pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
terminal.mod.
(normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
(boot_mod_SOURCES): New variable.
(terminal_mod_SOURCES): Likewise.
(ls_mod_SOURCES): Likewise.
(cmp_mod_SOURCES): Likewise.
(cat_mod_SOURCES): Likewise.
* normal/arg.c: New file.
* kern/env.c: Likewise.
* include/pupa/arg.h: Likewise.
* include/pupa/env.h: Likewise.
* font/manager.c (font_command): Changed to match argument parsing
interface changes.
(PUPA_MOD_INIT): Likewise.
* hello/hello.c (pupa_cmd_hello): Likewise.
(PUPA_MOD_INIT): Likewise.
* include/pupa/disk.h: Include <pupa/device.h>.
(pupa_print_partinfo): New prototype.
* include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
(pupa_dl_get_prefix): Likewise.
* include/pupa/misc.h: Include <pupa/err.h>.
(pupa_isgraph): New prototype.
(pupa_isdigit): Likewise.
(pupa_split_cmdline): Likewise.
* include/pupa/normal.h: Include <pupa/arg.h>.
(pupa_command): Changed the prototype of the member `func' to
match the argument parsing interface. Added member `options'.
(pupa_register_command): Updated to match function.
(pupa_arg_parse): New prototype.
(pupa_hello_init) [PUPA_UTIL]: New prototype.
(pupa_hello_fini) [PUPA_UTIL]: Likewise.
(pupa_ls_init) [PUPA_UTIL]: Likewise.
(pupa_ls_fini) [PUPA_UTIL]: Likewise.
(pupa_cat_init) [PUPA_UTIL]: Likewise.
(pupa_cat_fini) [PUPA_UTIL]: Likewise.
(pupa_boot_init) [PUPA_UTIL]: Likewise.
(pupa_boot_fini) [PUPA_UTIL]: Likewise.
(pupa_cmp_init) [PUPA_UTIL]: Likewise.
(pupa_cmp_fini) [PUPA_UTIL]: Likewise.
(pupa_terminal_init) [PUPA_UTIL]: Likewise.
(pupa_terminal_fini) [PUPA_UTIL]: Likewise.
* kern/disk.c: Include <pupa/file.h>.
(pupa_print_partinfo): New function.
* kern/dl.c: Include <pupa/env.h>.
(pupa_dl_dir): Variable removed.
(pupa_dl_load): Use the environment variable `prefix' instead of
the variable pupa_dl_dir.
(pupa_dl_set_prefix): Function removed.
(pupa_dl_get_prefix): Likewise.
* kern/i386/pc/init.c: Include <pupa/env.h>.
(pupa_machine_init): Use the environment variable `prefix' instead of
using pupa_dl_set_prefix to set the prefix.
* kern/main.c: Include <pupa/env.h>.
(pupa_set_root_dev): Use the environment variable `prefix' instead of
using pupa_dl_get_prefix to get the prefix.
* kern/misc.c: Include <pupa/env.h>.
(pupa_isdigit): New function.
(pupa_isgraph): Likewise.
(pupa_ftoa): Likewise.
(pupa_vsprintf): Added support for printing values of the type
`double'. Make it possible to format variable output when using
formatting like `%1.2%f'.
(pupa_split_cmdline): New function.
* kern/rescue.c: Include <pupa/env.h>.
(next_word): Removed function.
(pupa_rescue_cmd_prefix): Likewise.
(pupa_rescue_cmd_set): New function.
(pupa_rescue_cmd_unset): New function.
(pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
split the command line instead of splitting it here. Added
support for setting variables using the syntax `foo=bar'. Don't
initialize the prefix command anymore. Initialized the set and
unset commands.
* normal/cmdline.c: Include <pupa/env.h>.
(pupa_tab_complete): Added prototypes for print_simple_completion,
print_partition_completion, add_completion, iterate_commands,
iterate_dev, iterate_part and iterate_dir. Moved code to print
partition information from here to kern/disk.c.
(pupa_cmdline_run): Don't check if the funtion exists anymore.
* normal/main.c: Include <pupa/env.h>.
(pupa_rescue_cmd_normal): Use the environment variable `prefix'
instead of using pupa_dl_get_prefix to get the prefix.
* term/i386/pc/vga.c: Include <pupa/arg.h>.
(check_vga_mem): Cast pointers to `void *' to silence a gcc
warning.
(pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
(pupa_vga_setcolor): Declare unused variables with `__attribute__
((unused))' to silence a gcc warning.
(pupa_vga_setcolor): Likewise.
(debug_command): Changed to match argument parsing
interface changes.
* util/pupa-emu.c: Include <pupa/env.h>.
(options): Added 0's for unused fields to silence a gcc warning.
(argp): Likewise.
(main): Use the environment variable `prefix' instead of using
pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
and terminal.
* util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
* util/misc.c: Include <malloc.h>.
(pupa_malloc): Rewritten so errors are correctly reported.
(pupa_realloc): Likewise.
(pupa_memalign): Likewise.
(pupa_mm_init_region): Declare unused variables with
`__attribute__ ((unused))' to silence a gcc warning.
* normal/i386/setjmp.S: Remove tab at the end of the file to
silence a gcc warning.
* loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
variables with `__attribute__ ((unused))' to silence a gcc
warning.
* loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
local variable i unsigned to silence a gcc warning.
* kern/term.c: Include <pupa/misc.h>.
(pupa_more_lines): New variable.
(pupa_more): Likewise.
(pupa_putcode): When the pager is active pause at the end of every
screen.
(pupa_set_more): New function.
* include/pupa/term.h (pupa_set_more): New prototype.
* include/pupa/normal.h: New file.
* include/pupa/setjmp.h: Likewise.
* include/pupa/i386/setjmp.h: Likewise.
* normal/cmdline.c: Likewise.
* normal/command.c: Likewise.
* normal/main.c: Likewise.
* normal/menu.c: Likewise.
* normal/i386/setjmp.S: Likewise.
* loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
(pupa_rescue_cmd_initrd): Likewise.
* loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
Likewise.
* kern/i386/pc/startup.S (translation_table): New variable.
(translate_keycode): New function.
(pupa_console_getkey): Call translate_keycode.
* kern/rescue.c (attempt_normal_mode): New function.
(pupa_enter_rescue_mode): Attempt to execute the normal mode. If
it failed, print a message.
* kern/mm.c (pupa_real_malloc): Print more information when a
free magic is broken.
(pupa_free): If the first free header is not free actually, set
it to P.
* kern/main.c (pupa_load_normal_mode): Just load the module
"normal".
(pupa_main): Don't print the message
"Entering into rescue mode..." here.
* include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
Declared.
(pupa_rescue_cmd_initrd): Likewise.
(pupa_rescue_cmd_initrd): Likewise.
* include/pupa/symbol.h (FUNCTION): Specify the type.
(VARIABLE): Likewise.
* include/pupa/err.h (pupa_err_t): Added
PUPA_ERR_UNKNOWN_COMMAND.
* include/pupa/dl.h (pupa_dl_set_prefix): Exported.
(pupa_dl_get_prefix): Likewise.
* conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
Added _chain.mod and _linux.mod instead of chain.mod and
linux.mod.
(chain_mod_SOURCES): Renamed to ...
(_chain_mod_SOURCES): ... this.
(chain_mod_CFLAGS): Renamed to ...
(_chain_mod_CFLAGS): ... this.
(linux_mod_SOURCES): Renamed to ...
(_linux_mod_SOURCES): ... this.
(linux_mod_CFLAGS): Renamed to ...
(_linux_mod_CFLAGS): ... this.
(normal_mod_SOURCES): New variable.
(normal_mod_CFLAGS): Likewise.
(normal_mod_ASFLAGS): Likewise.
2003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
* kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
possible.
* kern/dl.c (pupa_dl_ref): Refer dependending modules
recursively.
(pupa_dl_unref): Unrefer depending modules recursively.
Don't call pupa_dl_unload implicitly, because PUPA can crash if
a module is unloaded before one depending on that module is
unloaded.
(pupa_dl_unload): Unload depending modules explicitly,
if possible.
* include/pupa/i386/pc/linux.h: New file.
* loader/i386/pc/linux.c: Likewise.
* loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
Removed.
(pupa_chainloader_unload): Return PUPA_ERR_NONE.
(pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
of PUPA_CHAINLOADER_BOOT_SECTOR.
* kern/i386/pc/startup.S: Include pupa/machine/linux.h.
(pupa_linux_prot_size): New variable.
(pupa_linux_tmp_addr): Likewise.
(pupa_linux_real_addr): Likewise.
(pupa_linux_boot_zimage): New function.
(pupa_linux_boot_bzimage): Likewise.
* kern/i386/pc/init.c (struct mem_region): New structure.
(MAX_REGIONS): New macro.
(mem_regions): New variable.
(num_regions): Likewise.
(pupa_os_area_addr): Likewise.
(pupa_os_area_size): Likewise.
(pupa_lower_mem): Likewise.
(pupa_upper_mem): Likewise.
(add_mem_region): New function.
(compact_mem_regions): Likewise.
(pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
the size of the conventional memory and that of so-called upper
memory (before the first memory hole).
Instead of adding each found region to free memory, use
add_mem_region and add them after removing overlaps.
Also, add only 1/4 of the upper memory to free memory. The rest
is used for loading OS images. Maybe this is ad hoc, but this
makes it much easier to relocate OS images when booting.
* kern/rescue.c (pupa_rescue_cmd_module): Removed.
(pupa_enter_rescue_mode): Don't register initrd and module.
* kern/mm.c: Include pupa/dl.h.
* kern/main.c: Include pupa/file.h and pupa/device.h.
* kern/loader.c (pupa_loader_load_module_func): Removed.
(pupa_loader_load_module): Likewise.
* kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
``.o''.
* include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
(pupa_linux_tmp_addr): Likewise.
(pupa_linux_real_addr): Likewise.
(pupa_linux_boot_zimage): Likewise.
(pupa_linux_boot_bzimage): Likewise.
* include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
(pupa_upper_mem): Likewise.
(pupa_gate_a20): Don't export, because turning off Gate A20 in a
module is too dangerous.
* include/pupa/loader.h (pupa_os_area_addr): Declared.
(pupa_os_area_size): Likewise.
(pupa_loader_set): Remove the first argument. Loader doesn't
manage modules or initrd any longer.
(pupa_loader_load_module): Removed.
* conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
(linux_mod_SOURCES): New variable.
(linux_mod_CFLAGS): Likewise.
* util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
(setup): Configure the installed partition information and the
dl prefix.
* loader/i386/pc/chainloader.c (my_mod): New variable.
(pupa_chainloader_unload): New function.
(pupa_rescue_cmd_chainloader): Refer itself.
(PUPA_MOD_INIT): Save its own module in MY_MOD.
* kern/i386/pc/startup.S (install_partition): Removed.
(version_string): Likewise.
(config_file): Likewise.
(pupa_install_dos_part): New variable.
(pupa_install_bsd_part): Likewise.
(pupa_prefix): Likewise.
(pupa_chainloader_real_boot): Call pupa_dl_unload_all.
* kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
and pupa/misc.h.
(make_install_device): New function.
(pupa_machine_init): Set the dl prefix.
* kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
(buf): Renamed to ...
(linebuf): ... this.
(pupa_rescue_cmd_prefix): New function.
(pupa_rescue_cmd_insmod): Likewise.
(pupa_rescue_cmd_rmmod): Likewise.
(pupa_rescue_cmd_lsmod): Likewise.
(pupa_enter_rescue_mode): Register new commands: prefix, insmod,
rmmod and lsmod.
* kern/mm.c (pupa_memalign): If failed even after invalidating
disk caches, unload unneeded modules and retry.
* kern/misc.c (pupa_memmove): New function.
(pupa_memcpy): Removed.
(pupa_strcpy): New function.
(pupa_itoa): Made static.
* kern/dl.c (pupa_dl_iterate): New function.
(pupa_dl_ref): Likewise.
(pupa_dl_unref): Likewise.
(pupa_dl_unload): Return if succeeded or not.
(pupa_dl_unload_unneeded): New function.
(pupa_dl_unload_all): Likewise.
(pupa_dl_init): Renamed to ...
(pupa_dl_set_prefix): ... this.
(pupa_dl_get_prefix): New function.
* include/pupa/i386/pc/kernel.h: Include pupa/types.h.
(PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
(PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
(PUPA_KERNEL_MACHINE_PREFIX): Likewise.
(pupa_install_dos_part): Declared.
(pupa_install_bsd_part): Likewise.
(pupa_prefix): Likewise.
(pupa_boot_drive): Likewise.
* include/pupa/types.h: Fix a typo.
* include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
pupa_memmove.
(pupa_memmove): Declared.
(pupa_strcpy): Likewise.
* include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
pupa_mod_init takes one argument, its own module.
(pupa_dl_unload_unneeded): Declared.
(pupa_dl_unload_all): Likewise.
(pupa_dl_ref): Likewise.
(pupa_dl_unref): Likewise.
(pupa_dl_iterate): Likewise.
(pupa_dl_init): Renamed to ...
(pupa_dl_set_prefix): ... this.
(pupa_dl_get_prefix): Declared.
* fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
(pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
unloaded.
(pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
(pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
* configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
-Wmissing-prototypes, -Wundef and -Wstrict-prototypes.