• Russ Cox's avatar
    cmd/gc: implement -pack flag · b0223340
    Russ Cox authored
    The -pack flag causes 5g, 6g, 8g to write a Go archive directly,
    instead of requiring the use of 'go tool pack' to convert the .5/.6/.8
    to .a format.
    
    Writing directly avoids the copy and also avoids having the
    export data stored twice in the archive (once in __.PKGDEF,
    once in .5/.6/.8).
    
    A separate CL will enable the use of this flag by cmd/go.
    
    Other build systems that do not know about -pack will be unaffected.
    
    The changes to cmd/ld handle a minor simplification to the format:
    an unused section is removed.
    
    R=iant, r
    CC=golang-dev
    https://golang.org/cl/42880043
    b0223340
lib.c 29.5 KB