[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [rtl] Problem loading modules
>>>>> "Kulwinder" == Kulwinder Atwal <kalatwal@home.com> writes:
Kulwinder> Paul Koning wrote:
>> >>>>> "Dresner," == Dresner, Norman A
>> <norman_a_dresner@md.northgrum.com> writes:
>>
>> Dresner,> It has to be possible to "re-create" functions like
>> strcat Dresner,> et al that are usable in the kernel, and I have
>> difficulty Dresner,> believing that someone hasn't already done
>> just that.
>>
>> You don't need to re-create anything. All you need is to link the
>> relevant object library with your module.
>>
>> That assumes, of course, that the library doesn't need to do
>> system calls (like malloc). For example, the strings stuff should
>> be fine except for "strstr". Math should be fine unless there's
>> some exception related stuff in it.
Kulwinder> Use the functions in include/asm-i386/string-486.h
Kulwinder> Although the call 'strstr' does not appear in string.h it
Kulwinder> is in this file.
Oops, I meant "strdup" as one likely to cause trouble. There's
nothing about "strstr" that suggests you can't use it in an RTL.
I don't know why (other than performance) it's important to use asm
versions... the C versions should be pure functions just as much as
the asm versions.
paul