Bug 9413

Summary: profiling does not work with elf kernels
Product: Base System Reporter: assar <assar>
Component: kernAssignee: Bruce Evans <bde>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 3.0-CURRENT   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description assar 1999-01-10 04:20:00 UTC
When configuring a kernel with profiling (`config -p'), it fails to
build due to duplicate and unresolved symbols.

In the aout-world it looks like this (where if_ex.o is a random object file):

mcount.o
00000000 T _mcount
prof_machdep.o
00000000 T __mcount
         U _mcount
00000010 T mcount
if_ex.o
         U mcount

But in the elf world there's some confusion as to what the different
functions should be called.

mcount.o
00000000 T mcount
prof_machdep.o
0000002c t Lmcount_exit
00000000 T __mcount
         U _mcount
00000010 T mcount
if_ex.o
         U .mcount

How-To-Repeat: 
config -p GENERIC
cd ../../GENERIC
make depend all
Comment 1 anderson 1999-03-08 23:57:15 UTC
I've experience this problem and successfully used the fix.

-Darrell
--
Department of Computer Science, Duke University, Durham, NC 27708-0129
Darrell Anderson, anderson@cs.duke.edu, http://www.cs.duke.edu/~anderson
Comment 2 David E. O'Brien freebsd_committer freebsd_triage 2000-01-22 16:18:15 UTC
Responsible Changed
From-To: freebsd-bugs->bde

I believe BDE is the author of our kernel profiling. 
Comment 3 David E. O'Brien freebsd_committer freebsd_triage 2000-01-24 03:20:39 UTC
Responsible Changed
From-To: bde->obrien

I thought his PR dealt with current, and was not a MFC PR. 
Comment 4 Bruce Evans freebsd_committer freebsd_triage 2000-02-02 04:15:10 UTC
State Changed
From-To: open->closed

Fixed last May in -current. 
Fixes merged from -current to RELENG_3 today. 


Comment 5 Bruce Evans freebsd_committer freebsd_triage 2000-02-02 04:15:10 UTC
Responsible Changed
From-To: obrien->bde

I have more round tuits for RELENG_3 while -current is frozone.