//----------------------------------------------------------------------------
//--------modutils module.h, lines 45-242
//----------------------------------------------------------------------------
//--------modutils module.h, lines 45-242
/* This file contains the structures used by the 2.0 and 2.1 kernels.
We do not use the kernel headers directly because we do not wish
/* This file contains the structures used by the 2.0 and 2.1 kernels.
We do not use the kernel headers directly because we do not wish
_syscall5(int, old_sys_init_module, const char *, name, char *, code,
unsigned, codesize, struct old_mod_routines *, routines,
struct old_symbol_table *, symtab)
_syscall5(int, old_sys_init_module, const char *, name, char *, code,
unsigned, codesize, struct old_mod_routines *, routines,
struct old_symbol_table *, symtab)
_syscall5(int, query_module, const char *, name, int, which,
void *, buf, size_t, bufsize, size_t*, ret);
#ifndef BB_RMMOD
_syscall5(int, query_module, const char *, name, int, which,
void *, buf, size_t, bufsize, size_t*, ret);
#ifndef BB_RMMOD
m_size | (flag_autoclean ? OLD_MOD_AUTOCLEAN
: 0), &routines, symtab);
if (ret)
m_size | (flag_autoclean ? OLD_MOD_AUTOCLEAN
: 0), &routines, symtab);
if (ret)
syms = xrealloc(syms, bufsize = ret);
goto retry_kern_sym_load;
}
syms = xrealloc(syms, bufsize = ret);
goto retry_kern_sym_load;
}
fseek(fp, 0, SEEK_SET);
if (fread(&f->header, sizeof(f->header), 1, fp) != 1) {
fseek(fp, 0, SEEK_SET);
if (fread(&f->header, sizeof(f->header), 1, fp) != 1) {
section_headers = alloca(sizeof(ElfW(Shdr)) * shnum);
fseek(fp, f->header.e_shoff, SEEK_SET);
if (fread(section_headers, sizeof(ElfW(Shdr)), shnum, fp) != shnum) {
section_headers = alloca(sizeof(ElfW(Shdr)) * shnum);
fseek(fp, f->header.e_shoff, SEEK_SET);
if (fread(section_headers, sizeof(ElfW(Shdr)), shnum, fp) != shnum) {
sec->contents = xmalloc(sec->header.sh_size);
fseek(fp, sec->header.sh_offset, SEEK_SET);
if (fread(sec->contents, sec->header.sh_size, 1, fp) != 1) {
sec->contents = xmalloc(sec->header.sh_size);
fseek(fp, sec->header.sh_offset, SEEK_SET);
if (fread(sec->contents, sec->header.sh_size, 1, fp) != 1) {
if (m_filename[0] == '\0'
|| ((fp = fopen(m_filename, "r")) == NULL))
{
if (m_filename[0] == '\0'
|| ((fp = fopen(m_filename, "r")) == NULL))
{