]> Cypherpunks repositories - gostls13.git/commit
cmd/gc: add space to export data to match linker expectations
authorRémy Oudompheng <oudomphe@phare.normalesup.org>
Wed, 9 Jan 2013 21:02:53 +0000 (22:02 +0100)
committerRémy Oudompheng <oudomphe@phare.normalesup.org>
Wed, 9 Jan 2013 21:02:53 +0000 (22:02 +0100)
commit8fff2525cb37a71703b2e54efd3cfc74f7b96414
treed34b1eade0b578bc259b654f0b593702f0f71a47
parent4ba27df69c4bf9ce00eb34bb69860a248319be11
cmd/gc: add space to export data to match linker expectations

The linker split PKGDEF into (prefix, name, def) pairs,
and defines def to begin after a space following the identifier.
This is totally wrong for the following export data:

        func "".FunctionName()
        var SomethingCompletelyUnrelated int

The linker would parse
    name=`"".FunctionName()\n\tvar`
    def=`SomethingCompletelyUnrelated int`
since there is no space after FunctionName.

R=minux.ma, rsc
CC=golang-dev
https://golang.org/cl/7068051
src/cmd/gc/export.c
test/fixedbugs/bug472.dir/p1.go [new file with mode: 0644]
test/fixedbugs/bug472.dir/p2.go [new file with mode: 0644]
test/fixedbugs/bug472.dir/z.go [new file with mode: 0644]
test/fixedbugs/bug472.go [new file with mode: 0644]