From: Pete L. <pet...@st...> - 2002-05-13 15:14:53
|
> -----Original Message----- > From: mr...@0x... [mailto:mr...@0x...] > Sent: Friday, May 10, 2002 1:48 PM > To: pet...@st... > Cc: lin...@m1...; lin...@li... > Subject: [linux-sh:02353] Re: performance data from modules. > > > * Pete LeMasters <pet...@st...> on Fri, May 10, 2002: > > > > > I have been attempting to generate profile data from a loadable > module under > > 2.4.17 on an SH4 based development board. > > > > Why do you need profile data from a loadable module? What's wrong with > getting the data with the driver compiled into the kernel? Does your > module execute differently than when compiled in? > Well, since you asked. This is a development driver that has not been set up to compile into the kernel yet. I originally tried to link the driver into the kernel to get the profiling information but, the driver makes use of C++ which demands a generated constructor and destructor list. This also means that I need to link with the -Ur option for my final pass at the object, while this isn't a big deal for the loadable module, it has given me some trouble getting things linked into the kernel. According to the man page on the LD utility, once you use -Ur, your constructor table address can't change, which has resulted in my constructor table entries being unresolved for the final kernel link. I don't fully understand why the symbols can't be found for the kernel link when they can be found for the module link, unless an address is somehow tied to the constructor table symbols?? I'm still looking into getting the module linked into the kernel so if anyone has seen similar problems and knows the correct manner to approach the link, I would enjoy hearing it. > > > > Separately, I have also tried to making use of the -pg option > provided by > > gcc but upon trying to load the module, I get an undefined > symbol "mcount", > > which I believe is supposed to be provided by linking a profile specific > > library?? I can't find a reference to mcount in the 2.4.17 > kernel source, > > so it's location is an assumption on my part. > > > > You need profiling support as provided by the C library (this > usually comes > with pgcrt0.o or similiar). > > M. R. > |