Commit 98cc8b4c authored by Rhys Hiltner's avatar Rhys Hiltner Committed by Ian Lance Taylor

cmd/link/internal/ld: remove unused call to os.Getwd

This call to os.Getwd (or getwd) has been part of the linker since the C
implementation in 7d507dc6. It stopped being used in 26438d4d, and
survived the conversion to Go in 1f9dbb60.

Its return value goes unused (the linker gets the value for AT_comp_dir in
dwarf.go), remove it.

Change-Id: I3d4594813bb4ee0a6af31a36e19d99ec4b863677
Reviewed-on: https://go-review.googlesource.com/19655Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent 7555f7f2
...@@ -34,8 +34,6 @@ package ld ...@@ -34,8 +34,6 @@ package ld
import ( import (
"cmd/internal/obj" "cmd/internal/obj"
"log" "log"
"os"
"path/filepath"
"strconv" "strconv"
) )
...@@ -70,13 +68,6 @@ func linknew(arch *LinkArch) *Link { ...@@ -70,13 +68,6 @@ func linknew(arch *LinkArch) *Link {
log.Fatalf("invalid goarch %s (want %s)", p, arch.Name) log.Fatalf("invalid goarch %s (want %s)", p, arch.Name)
} }
var buf string
buf, _ = os.Getwd()
if buf == "" {
buf = "/???"
}
buf = filepath.ToSlash(buf)
ctxt.Headtype = headtype(obj.Getgoos()) ctxt.Headtype = headtype(obj.Getgoos())
if ctxt.Headtype < 0 { if ctxt.Headtype < 0 {
log.Fatalf("unknown goos %s", obj.Getgoos()) log.Fatalf("unknown goos %s", obj.Getgoos())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment