modutils-2.1.121 + Netwinder = crash
Because the new 'insmod.elf' from Corel does not work on my Debian
Netwinder (with self-built ELF kernel), I was trying to create the
modutils package to provide support for kerneld, insmod and so on.
The problems are:
- 'sys_qm.c' needs the following two lines, right where the
defines for other architectures are:
# elif defined(__arm__)
# define __NR_query_module __NR_SYSCALL_BASE+167
- In 'sys_cm.c', the line
#if defined(__i386__) || defined(__m68k__)
#if defined(__i386__) || defined(__m68k__) || defined(__arm__)
I believe this is right, because create_module() returns an
address that may be interpreted as a negative long (error)
otherwise also on Arm. (I found this empirically).
- But now, after 'create_module()' actually succeeds, the program
flow in 'insmod.c' goes to:
- Test for obj_relocate() -- works fine
- Possibly delete_module() -- works fine also
- old_init_module(n_name, f, m_size) --- **CRASH**
At this point, the message given on the console is that the pc
(program counter) is in non-code space (or something to that
effect). The netwinder hangs, and a hard reset is neccessary.
It would be interesting to know:
- What sources did Corel use to create 'insmod'?
- If they based it on 2.1.121, how did they overcome this problem?
- Would it be possible to obtain sources from them that work?
Thanks in advance for any insight,