• Russ Cox's avatar
    cmd/link: use current GOROOT for source file paths for standard library · 83746fd5
    Russ Cox authored
    This CL changes the source file information in the
    standard library's .a files to say "$GOROOT/src/runtime/chan.go"
    (with a literal "$GOROOT") instead of spelling out the actual directory.
    The linker then substitutes the actual $GOROOT (or $GOROOT_FINAL)
    as appropriate.
    
    If people download a binary distribution to an alternate location,
    following the instructions at https://golang.org/doc/install#install,
    the code before this CL would end up with source paths pointing to
    /usr/local/go no matter where the actual sources were.
    Now the source paths for built binaries will point to the actual sources
    (hopefully).
    
    The source line information in distributed binaries is not affected:
    those will still say /usr/local/go. But binaries people build themselves
    (their own programs, not the go distribution programs) will be correct.
    
    Fixing this path also fixes the lookup of the runtime-gdb.py file.
    
    Fixes #5533.
    
    Change-Id: I03729baae3fbd8cd636e016275ee5ad2606e4663
    Reviewed-on: https://go-review.googlesource.com/18200
    Run-TryBot: Russ Cox <rsc@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
    83746fd5
Name
Last commit
Last update
..
ar.go Loading commit data...
arch.go Loading commit data...
data.go Loading commit data...
decodesym.go Loading commit data...
dwarf.go Loading commit data...
dwarf_defs.go Loading commit data...
elf.go Loading commit data...
go.go Loading commit data...
ld.go Loading commit data...
ldelf.go Loading commit data...
ldmacho.go Loading commit data...
ldpe.go Loading commit data...
lib.go Loading commit data...
link.go Loading commit data...
macho.go Loading commit data...
macho_combine_dwarf.go Loading commit data...
objfile.go Loading commit data...
pcln.go Loading commit data...
pe.go Loading commit data...
pobj.go Loading commit data...
sym.go Loading commit data...
symtab.go Loading commit data...
util.go Loading commit data...