linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* eldk bug?how to fix
@ 2005-12-18  8:20 zengshuai
  2005-12-18 14:44 ` Wolfgang Denk
  2005-12-29 21:48 ` Theo Gjaltema
  0 siblings, 2 replies; 6+ messages in thread
From: zengshuai @ 2005-12-18  8:20 UTC (permalink / raw)
  To: ppc

[root@localhost atmlz]# ppc_6xx-gcc -c -o temp atm_aalx.c         
atm_aalx.c: In function `main':                                   
atm_aalx.c:201: warning: return type of `main' is not `int'       
/tmp/cciJlehe.s: Assembler messages:                              
/tmp/cciJlehe.s:916: Error: unsupported relocation against r3     
/tmp/cciJlehe.s:917: Error: unsupported relocation against r3     
/tmp/cciJlehe.s:917: Error: unsupported relocation against r3     
/tmp/cciJlehe.s:918: Error: unsupported relocation against r3     
/tmp/cciJlehe.s:918: Error: unsupported relocation against r3     
/tmp/cciJlehe.s:919: Error: unsupported relocation against r3     
/tmp/cciJlehe.s:3655: Error: unsupported relocation against r3    
[root@localhost atmlz]# ppc_6xx-gcc -S -o temp.s atm_aalx.c
[root@localhost atmlz]# vi temp.s
...................
        stw 0,4(9)                 
.L36:                              
#APP                               
         mfmsr r3                  
         ori r3,r3,0x8000          
         andi. r3,r3,0xffbf        
         mtmsr r3                  
#NO_APP                            
        lwz 11,0(1)                
..............................
I must change those "r3" to "3" manually.
How to fix?

------------------------------
我现在使用Sogou.com的2G邮箱了,你也来试试吧! 
http://mail.sogou.com/recommend/sogoumail_invite_reg1.jsp?from=sogouinvitation&s_EMAIL=zengshuai%40sogou.com&username=linuxppc-embedded&FullName=linuxppc-embedded&Email=linuxppc-embedded%40ozlabs.org&verify=755eff4e640bdcfc57d93cbd8b0a9cb7

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: eldk bug?how to fix
  2005-12-18  8:20 eldk bug?how to fix zengshuai
@ 2005-12-18 14:44 ` Wolfgang Denk
  2005-12-29 21:48 ` Theo Gjaltema
  1 sibling, 0 replies; 6+ messages in thread
From: Wolfgang Denk @ 2005-12-18 14:44 UTC (permalink / raw)
  To: zengshuai; +Cc: ppc

In message <4440987.1134894054475.JavaMail.postfix@mx3.mail.sohu.com> you wrote:
> [root@localhost atmlz]# ppc_6xx-gcc -c -o temp atm_aalx.c         
> atm_aalx.c: In function `main':                                   
> atm_aalx.c:201: warning: return type of `main' is not `int'       
> /tmp/cciJlehe.s: Assembler messages:                              
> /tmp/cciJlehe.s:916: Error: unsupported relocation against r3     
> /tmp/cciJlehe.s:917: Error: unsupported relocation against r3     
> /tmp/cciJlehe.s:917: Error: unsupported relocation against r3     
> /tmp/cciJlehe.s:918: Error: unsupported relocation against r3     
> /tmp/cciJlehe.s:918: Error: unsupported relocation against r3     
> /tmp/cciJlehe.s:919: Error: unsupported relocation against r3     
> /tmp/cciJlehe.s:3655: Error: unsupported relocation against r3    

Are you by any chance using inline  assembler  code  in  your  source
file?  This  is  the  only  explanation  I  have,  since GCC does not
generate "r3" references in it's assembler code.

It would have been a good idea if you had included your  source  code
so we could see what you are doing...

> [root@localhost atmlz]# ppc_6xx-gcc -S -o temp.s atm_aalx.c
> [root@localhost atmlz]# vi temp.s
> ...................
>         stw 0,4(9)                 
> .L36:                              
> #APP                               
>          mfmsr r3                  
>          ori r3,r3,0x8000          
>          andi. r3,r3,0xffbf        
>          mtmsr r3                  
> #NO_APP                            
>         lwz 11,0(1)                
> ..............................

I see. This is your own assembler code, not something generated  from
C source code.

> I must change those "r3" to "3" manually.
> How to fix?

Don't write incorrect assembler code,  or  use  the  required  header
files (like ppc_asm.tmpl).

And while we are at it: be careful not to try privileged instructions
in user space.



This is your own error, not a problem with ELDK.


Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
If I had to live my life again,  I'd  make  the  same  mistakes, only
sooner.                                          -- Tallulah Bankhead

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: eldk bug?how to fix
  2005-12-18  8:20 eldk bug?how to fix zengshuai
  2005-12-18 14:44 ` Wolfgang Denk
@ 2005-12-29 21:48 ` Theo Gjaltema
  2005-12-30 21:13   ` Wolfgang Denk
  1 sibling, 1 reply; 6+ messages in thread
From: Theo Gjaltema @ 2005-12-29 21:48 UTC (permalink / raw)
  To: linuxppc-embedded

Hmm...
I've seen these messages before. They were gone when I compiled using
ppc_8xx-gcc compiler of a different ELDK version.
What version of ELDK are you using? Which gcc version?

Succes,
Theo Gjaltema.

zengshuai@sogou.com schreef:

>[root@localhost atmlz]# ppc_6xx-gcc -c -o temp atm_aalx.c         
>atm_aalx.c: In function `main':                                   
>atm_aalx.c:201: warning: return type of `main' is not `int'       
>/tmp/cciJlehe.s: Assembler messages:                              
>/tmp/cciJlehe.s:916: Error: unsupported relocation against r3     
>/tmp/cciJlehe.s:917: Error: unsupported relocation against r3     
>/tmp/cciJlehe.s:917: Error: unsupported relocation against r3     
>/tmp/cciJlehe.s:918: Error: unsupported relocation against r3     
>/tmp/cciJlehe.s:918: Error: unsupported relocation against r3     
>/tmp/cciJlehe.s:919: Error: unsupported relocation against r3     
>/tmp/cciJlehe.s:3655: Error: unsupported relocation against r3    
>[root@localhost atmlz]# ppc_6xx-gcc -S -o temp.s atm_aalx.c
>[root@localhost atmlz]# vi temp.s
>...................
>        stw 0,4(9)                 
>.L36:                              
>#APP                               
>         mfmsr r3                  
>         ori r3,r3,0x8000          
>         andi. r3,r3,0xffbf        
>         mtmsr r3                  
>#NO_APP                            
>        lwz 11,0(1)                
>..............................
>I must change those "r3" to "3" manually.
>How to fix?
>
>------------------------------
>我现在使用Sogou.com的2G邮箱了,你也来试试吧! 
>http://mail.sogou.com/recommend/sogoumail_invite_reg1.jsp?from=sogouinvitation&s_EMAIL=zengshuai%40sogou.com&username=linuxppc-embedded&FullName=linuxppc-embedded&Email=linuxppc-embedded%40ozlabs.org&verify=755eff4e640bdcfc57d93cbd8b0a9cb7
>
>_______________________________________________
>Linuxppc-embedded mailing list
>Linuxppc-embedded@ozlabs.org
>https://ozlabs.org/mailman/listinfo/linuxppc-embedded
>
>  
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: eldk bug?how to fix
  2005-12-29 21:48 ` Theo Gjaltema
@ 2005-12-30 21:13   ` Wolfgang Denk
  0 siblings, 0 replies; 6+ messages in thread
From: Wolfgang Denk @ 2005-12-30 21:13 UTC (permalink / raw)
  To: Theo Gjaltema; +Cc: linuxppc-embedded

In message <43B459C5.1060206@chello.nl> you wrote:
>
> I've seen these messages before. They were gone when I compiled using
> ppc_8xx-gcc compiler of a different ELDK version.
> What version of ELDK are you using? Which gcc version?

This has nothing to do with ELDK versions,  or  any  other  toolchain
issues.

> >[root@localhost atmlz]# ppc_6xx-gcc -c -o temp atm_aalx.c         
> >atm_aalx.c: In function `main':                                   
> >atm_aalx.c:201: warning: return type of `main' is not `int'       
> >/tmp/cciJlehe.s: Assembler messages:                              
> >/tmp/cciJlehe.s:916: Error: unsupported relocation against r3     
...
> >         mfmsr r3                  
> >         ori r3,r3,0x8000          
> >         andi. r3,r3,0xffbf        
> >         mtmsr r3                  

It's a user only problem (using symbolic names like  "r3"  in  inline
assember  statements  without  incuding  the  proper  header files to
resolve thise names).

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
We fight only when there is no other choice. We prefer  the  ways  of
peaceful contact.
	-- Kirk, "Spectre of the Gun", stardate 4385.3

^ permalink raw reply	[flat|nested] 6+ messages in thread

* eldk bug?how to fix
@ 2006-02-09  7:35 S. Egbert
  2006-02-09  9:07 ` Wolfgang Denk
  0 siblings, 1 reply; 6+ messages in thread
From: S. Egbert @ 2006-02-09  7:35 UTC (permalink / raw)
  To: linuxppc-embedded

> In message <43B459C5.1060206 at chello.nl> you wrote:
> >
> > I've seen these messages before. They were gone when I compiled > using
> > ppc_8xx-gcc compiler of a different ELDK version.
> > What version of ELDK are you using? Which gcc version?
>
> This has nothing to do with ELDK versions,  or  any  other  toolchain
> issues.
>
> > >[root at localhost atmlz]# ppc_6xx-gcc -c -o temp atm_aalx.c
> > >atm_aalx.c: In function `main':
> > >atm_aalx.c:201: warning: return type of `main' is not `int'
> > >/tmp/cciJlehe.s: Assembler messages:
> > >/tmp/cciJlehe.s:916: Error: unsupported relocation against r3
> ...
> > >         mfmsr r3
> > >         ori r3,r3,0x8000
> > >         andi. r3,r3,0xffbf
> > >         mtmsr r3
>
> It's a user only problem (using symbolic names like  "r3"  in  inline
> assember  statements  without  incuding  the  proper  header files to
> resolve thise names).

I had that exact same problem, ESPECIALLY when pulling in a fresh kernel
tree from kernel.org.

Fixed it by defining the CROSS_COMPILE environment variable or modifying
the Makefile's CROSS_COMPILE to the correct file prefix name, in your
case, it is probaly either

    # export CROSS_COMPILE=ppc_8xx-  (DENK gcc 3.3.3)
or
    # export CROSS_COMPILE=powerpc-linux-  (GNU gcc)

Check your PATH... make sure its picking up the right version...

  # whereis ppc_8xx-gcc

  # ppc_8xx-gcc --version
or
  # powerpc-linux-gcc --version


S. Egbert

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: eldk bug?how to fix
  2006-02-09  7:35 S. Egbert
@ 2006-02-09  9:07 ` Wolfgang Denk
  0 siblings, 0 replies; 6+ messages in thread
From: Wolfgang Denk @ 2006-02-09  9:07 UTC (permalink / raw)
  To: S. Egbert; +Cc: linuxppc-embedded

In message <43EAF0B2.2070902@sbcglobal.net> you wrote:
>
>     # export CROSS_COMPILE=ppc_8xx-  (DENK gcc 3.3.3)
> or
>     # export CROSS_COMPILE=powerpc-linux-  (GNU gcc)

Ummm.... the compiler included with the ELDK is GNU gcc, too.

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
An expert is a person who avoids the small errors while  sweeping  on
to the grand fallacy.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-02-09  9:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-18  8:20 eldk bug?how to fix zengshuai
2005-12-18 14:44 ` Wolfgang Denk
2005-12-29 21:48 ` Theo Gjaltema
2005-12-30 21:13   ` Wolfgang Denk
  -- strict thread matches above, loose matches on Subject: below --
2006-02-09  7:35 S. Egbert
2006-02-09  9:07 ` Wolfgang Denk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).