Incorrect address after link

Leon Pollak leonp at plris.com
Tue Sep 2 14:36:24 UTC 2003


Hello,
	I finally have my new tool suit running and can debug the BSP via bdm on my 
MPC860 board.
	The problem occurs when the printk function tries to call my BSP_output_char 
via vprintk.
	Below is the assembler of the call:

    0x17a14 <vprintk+1056>:	lis	r11,3	                    R11=0x30000
    0x17a18 <vprintk+1060>:	lwz	r9,8(r31)
    0x17a1c <vprintk+1064>:	lbz	r0,0(r9)
    0x17a20 <vprintk+1068>:	clrlwi	r0,r0,24
    0x17a24 <vprintk+1072>:	lwz	r11,17200(r11)       R11=0x9421ffe0 ?????
    0x17a28 <vprintk+1076>:	mtctr	r11
    0x17a2c <vprintk+1080>:	mr	r3,r0
    0x17a30 <vprintk+1084>:	bctrl
  
	When I follow the execution, I see that R11 in the line at 0x17a24 is 
calculated as 0x9421ffe0, while the function resides at 0x34330 according to 
the map of linker. And 0x30000+17200=0x34330 - the correct address!!!
	It seems to be some problem of linker (call convention?), but I am not 
experienced enough to guess.

Any help will be very highly appreciated...

-- 
leonp at plris dot com




More information about the users mailing list