Go patch committed: Rationalize external symbol names

Jakub Jelinek jakub@redhat.com
Thu Jan 25 21:07:00 GMT 2018


On Thu, Jan 25, 2018 at 12:40:13PM -0800, Ian Lance Taylor wrote:
> >> Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu.  Committed
> >> to mainline.
> >
> > this patch almost certainly (i.e. I didn't reghunt, but it's the only
> > plausible candidate between r257023 and r257057) Solaris/x86 bootstrap
> > with /bin/as:
> >
> > Assembler: doc.go
> >         "/var/tmp//ccbyjwCc.s", line 1043 : Syntax error
> >         Near line: "    .globl  .1fmt.fmt.clearflags"
> >         "/var/tmp//ccbyjwCc.s", line 1044 : Syntax error
> >         Near line: "    .type   .1fmt.fmt.clearflags, @function"
> >         "/var/tmp//ccbyjwCc.s", line 1045 : Illegal mnemonic
> >         Near line: ".1fmt.fmt.clearflags:"
> >         "/var/tmp//ccbyjwCc.s", line 1045 : Syntax error
> >         Near line: ".1fmt.fmt.clearflags:"
> >         "/var/tmp//ccbyjwCc.s", line 1045 : Syntax error
> >         Near line: ".1fmt.fmt.clearflags:"
> >         "/var/tmp//ccbyjwCc.s", line 1058 : Syntax error
> >         Near line: "    .size   .1fmt.fmt.clearflags, .-.1fmt.fmt.clearflags"
> >         "/var/tmp//ccbyjwCc.s", line 1060 : Syntax error
> >         Near line: "    .globl  .1fmt.pp.Width"
> >         "/var/tmp//ccbyjwCc.s", line 1061 : Syntax error
> >         Near line: "    .type   .1fmt.pp.Width, @function"
> >         "/var/tmp//ccbyjwCc.s", line 1062 : Illegal mnemonic
> >         Near line: ".1fmt.pp.Width:"
> >         "/var/tmp//ccbyjwCc.s", line 1062 : Syntax error
> >         Near line: ".1fmt.pp.Width:"
> >         "/var/tmp//ccbyjwCc.s", line 1062 : Syntax error
> >         Near line: ".1fmt.pp.Width:"
> >         "/var/tmp//ccbyjwCc.s", line 1082 : Syntax error
> >         Near line: "    .size   .1fmt.pp.Width, .-.1fmt.pp.Width"
> >         "/var/tmp//ccbyjwCc.s", line 1084 : Syntax error
> >         Near line: "    .globl  .1fmt.pp.Precision"
> >         "/var/tmp//ccbyjwCc.s", line 1085 : Syntax error
> >         Near line: "    .type   .1fmt.pp.Precision, @function"
> >         "/var/tmp//ccbyjwCc.s", line 1086 : Illegal mnemonic
> >         Near line: ".1fmt.pp.Precision:"
> >         "/var/tmp//ccbyjwCc.s", line 1086 : Syntax error
> >         Near line: ".1fmt.pp.Precision:"
> >         "/var/tmp//ccbyjwCc.s", line 1086 : Syntax error
> >         Near line: ".1fmt.pp.Precision:"
> >         "/var/tmp//ccbyjwCc.s", line 1106 : Syntax error
> >         Near line: "    .size   .1fmt.pp.Precision, .-.1fmt.pp.Precision"
> >         "/var/tmp//ccbyjwCc.s", line 1108 : Syntax error
> >         Near line: "    .globl  .1fmt.ss.Width"
> >         "/var/tmp//ccbyjwCc.s", line 1109 : Syntax error
> >         Near line: "    .type   .1fmt.ss.Width, @function"
> >         "/var/tmp//ccbyjwCc.s", line 1110 : Illegal mnemonic
> >         Near line: ".1fmt.ss.Width:"
> >         "/var/tmp//ccbyjwCc.s", line 1110 : Syntax error
> >         Near line: ".1fmt.ss.Width:"
> >         "/var/tmp//ccbyjwCc.s", line 1110 : Syntax error
> >         Near line: ".1fmt.ss.Width:"
> >         "/var/tmp//ccbyjwCc.s", line 1149 : Syntax error
> >         Near line: "    .size   .1fmt.ss.Width, .-.1fmt.ss.Width"
> >         "/var/tmp//ccbyjwCc.s", line 1151 : Syntax error
> >         Near line: "    .globl  .1fmt.ss.UnreadRune"
> >         "/var/tmp//ccbyjwCc.s", line 1152 : Syntax error
> >         Near line: "    .type   .1fmt.ss.UnreadRune, @function"
> >         "/var/tmp//ccbyjwCc.s", line 1153 : Illegal mnemonic
> >         Near line: ".1fmt.ss.UnreadRune:"
> >         "/var/tmp//ccbyjwCc.s", line 1153 : Syntax error
> >         Near line: ".1fmt.ss.UnreadRune:"
> >         "/var/tmp//ccbyjwCc.s", line 1153 : Syntax error
> >         Near line: ".1fmt.ss.UnreadRune:"
> >         "/var/tmp//ccbyjwCc.s", line 1209 : Syntax error
> >         Near line: "    .size   .1fmt.ss.UnreadRune, .-.1fmt.ss.UnreadRune"
> >         "/var/tmp//ccbyjwCc.s", line 1908 : Syntax error
> >         Near line: "    .globl  .1fmt.fmt.init"
> > Too many errors - Goodbye
> > make[4]: *** [Makefile:3322: fmt.lo] Error 1
> >
> > Solaris/SPARC with /bin/as is fine, but that's not too astonishing since
> > both assemblers are mostly different code bases.
> 
> >From the error messages I guess the problem is that the assembler
> doesn't like symbols that start with ".1".  Do you know what names the
> assembler permits?

It isn't just Solaris/SPARC, I saw bootstrap failure with go on
powerpc64-linux and powerpc64le-linux too, similar errors.
/tmp/cc9hDRO7.s: Assembler messages:
/tmp/cc9hDRO7.s:128: Error: symbol `.1errors.errorString.Error' is already defined
/tmp/cc9hDRO7.s: Error: .size expression for .1errors.errorString.Error does not evaluate to a constant

/home/jakub/gcc/obj22/gotools/../../gotools/../libgo/go/cmd/vet/unsafeptr.go:60: undefined reference to `.1go_types.Package.Path'
/home/jakub/gcc/obj22/gotools/../../gotools/../libgo/go/cmd/vet/unsafeptr.go:61: undefined reference to `.1go_types.Named.Obj'
/home/jakub/gcc/obj22/gotools/../../gotools/../libgo/go/cmd/vet/unsafeptr.go:61: undefined reference to `.1go_types.TypeName.Name..stub'
/home/jakub/gcc/obj22/gotools/../../gotools/../libgo/go/cmd/vet/unsafeptr.go:80: undefined reference to `.1go_types.Named.Obj'
/usr/bin/ld: /home/jakub/gcc/obj22/gotools/../../gotools/../libgo/go/cmd/vet/unsafeptr.go:80:(.text+0x2bec): unresolvable R_PPC64_REL24 against `.1
go_types.TypeName.Pkg..stub'

etc.

	Jakub



More information about the Gcc-patches mailing list