• David Crawshaw's avatar
    cmd/link: remove coutbuf global variable · 5fe9bbcf
    David Crawshaw authored
    Begin passing coutbuf by as a parameter. To make the initial plumbing
    pass easier, it is also a field in the standard ctxt parameter.
    
    Consolidate the byte writing functions into the OutBuf object.
    The result is less architecture-dependent initialization.
    
    To avoid plumbing out everywhere we want to report an error, move
    handling of out file deletion to an AtExit function.
    
    For #22095
    
    Change-Id: I0863695241562e0662ae3669666c7922b8c846f9
    Reviewed-on: https://go-review.googlesource.com/67318
    Run-TryBot: David Crawshaw <crawshaw@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
    5fe9bbcf
obj.go 3.04 KB