golang / go

The Go programming language

Home Page:https://go.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cmd/asm: unactionable "invalid local variable type 0"

dvyukov opened this issue · comments

cmd/asm produces the following error message on the program:

TEXT T(SB),$0
TYPE
asm: T: invalid local variable type 0

The error message should contain file name and line number, otherwise it is unactionable.

go version devel +5512ac2 Wed Sep 16 17:56:14 2015 +0000 linux/amd64

The TYPE pseudo is not implemented by the assembler, nor was it implemented in the 1.4 assembler. The compiler emits it though. It needs to be brought into the assembler and parsed there. Or, more likely, not.

The error message here is not the real issue.

FWIW, I've got whole bunch of such messages without any location information:

    287 duplicate TEXT for C    
    198 C: invalid local variable type 0  
    176 T: invalid local variable type 0  
    126 duplicate TEXT for T    
    121 unknown TLS base register for linux  
     56 duplicate TEXT for _    
     24 "".: invalid local variable type 0  
     19 duplicate TEXT for "".    
     15 symbol T listed multiple times   
      3 duplicate TEXT for n    
      2 symbol O listed multiple times   

Those are all coming from the obj library, not the assembler itself. The obj library could profit by printing location information.