Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: insmod dvb.o : unresolved symbol memset what is wrong?
>Well , it's propably not a problem in the latest version (0.05) of the
>driver. but when I try to do ' insmod dvb.o' I recive 'unresolved symbol
>memset'
>
>Function memset is used in other modules and they load ok, but dvb.o
>not.
Hi there!
I've just joined your mailing list and read the archive (just for
statistics I have a Hauppauge WinTV DVB-s). I've read a lot of 'memset'
error reports while compiling the driver. The are two ways to fix it: one
is to upgrade your gcc as it was written several times before, the other
way is in the following letter I wrote 2 weeks before (to Ralph Metzler),
it's a personal letter, but since there was no response until now I hope
it's not a problem sending it public:
---------- Forwarded message ----------
Date: Fri, 23 Jun 2000 01:44:08 +0200
From: David Toth <dave@IRIS.geobio.elte.hu>
To: ralph@convergence.de
Subject: Recommended change in dvb.c file for version 0.05
Dear Ralph Metzler!
I want to give you a very-very small advice in your DVB PCI card
project. I have a gcc 2.7.2.3 and while I was trying to insmod the dvb
driver, I've got the following error message:
dvb.o: unresolved symbol memset
After I've compiled the dvb.c whit -S and examined the assembly code,
I've found the memset at the function getMAC. This memset stuff is as far
as I know is a gcc or cpp bug (don't take it 100%), possibly with
newer gcc versions this bug doesn't exists anymore (and it does if
you haven't run into it). To fix this bug there are two arrays in getMAC
function:
u8 k0[5] = { 0x54, 0x7B, 0x9E };
u8 k1[5] = { 0xD3, 0xF1, 0x23 };
In the compiled assembly it is a (2 times) 5 bytes stack allocation a 5
bytes memset (this is the problem) and a 3 bytes load.
If you replace it with:
u8 k0[5] = { 0x54, 0x7B, 0x9E, 0, 0 };
u8 k1[5] = { 0xD3, 0xF1, 0x23, 0, 0 };
This causes a 5 bytes stack allocation and a 5 bytes load (saves up 1
assembly command?!) The memset error message goes away...
(Or there is another solution - I don't know if it is OK -
you just simply change k0,k1 to a 3 members array..
k0[3],k0[4],k1[3],k1[4] never used in this funcion and they are
locals).
Just a small thing, but for some people this change maybe save some
time.. Anyway, I'm glad to see people doing such a great job! Take my
BIG-BIG thanks - I can't find the words - for developing this stuff.
I'm happy watching DVB on my Linux.
Bye,
David Toth
---------- End Forwarded message ----------
Hope it helps a bit.
Home |
Main Index |
Thread Index