emjej@uokvax.UUCP (01/10/86)
Help! I'm busy hacking on a program, and I thought I'd profile it and see where it was spending its time..."OK, so just cc -p and Bob's your uncle!" I said to myself, but when the dust cleared, c.link said Undefined symbol _eprof and stuck its tongue out at me. (I am using Microware's C compiler under OS-9/6809, by the way...) So, what do I need to do to pacify the gods of the linker? What is _eprof? (and why is c.link saying such horrible things about him?) James Jones
kim@mcrware.UUCP (Kim Kempf) (01/30/86)
> In article <3500127@uokvax.UUCP> James Jones writes: > > Help! I'm busy hacking on a program, and I thought I'd profile it and see > where it was spending its time..."OK, so just cc -p and Bob's your uncle!" > I said to myself, but when the dust cleared, c.link said > > Undefined symbol > _eprof > > and stuck its tongue out at me. (I am using Microware's C compiler under > OS-9/6809, by the way...) So, what do I need to do to pacify the gods of > the linker? What is _eprof? (and why is c.link saying such horrible things > about him?) This was a development boo-boo. _eprof is a function used to provide a compiler trace of functions executed. The actual function was ommited from the library. It doesn't matter anyway because the arguments to _eprof wiped out the X register which has the effect of destroying long/double return values. The best way around this bug is to patch out this string from the object code. Dump the binary of c.comp. After approx. $9A00 the string containing _eprof should be found. Backup to the 0 (null) byte at the beginning of this string (which is the end of the previous string) and place a new null byte at the start of the string containing the _eprof. This has the effect of removing the call to _eprof. This problem will be fixed for good in the next release of the 6809 C Compiler. ---------------- Kim Kempf, Microware Systems Corporation {{cornell,decvax,ihnp4,sdcsvax,tektronix}!uw-beaver}\ {allegra,gatech!sb1,hplabs!lbl-csam,decwrl!sun,sunup} >!fluke!mcrware!kim {ssc-vax,hplsla,wavetek,physio,cae780,tikal,telematic}/