diff options
| author | Russ Cox <rsc@golang.org> | 2014-07-23 10:17:59 -0400 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2014-07-23 10:17:59 -0400 |
| commit | b916dc19921a799c3fc9d1bcc704cfd0b0bf08d0 (patch) | |
| tree | 2838501e2556dd44ac3ad6e9349df39f93334d50 /src | |
| parent | d4d50b5f01e65e664d63bd18a4e545465df03143 (diff) | |
| download | go-b916dc19921a799c3fc9d1bcc704cfd0b0bf08d0.tar.xz | |
liblink: more precise literal word comparison on arm
There are fields in the Addr that do not matter for the
purpose of deciding that the same word is already
in the current literal pool. Copy only the fields that
do matter.
This came up when comparing against the Go version
because the way it is invoked doesn't copy a few fields
(like node) that are never directly used by liblink itself.
Also remove a stray print that is not well-defined in
the new liblink. (Cannot use %D outside of %P, because
%D needs the outer Prog*.)
LGTM=minux
R=minux
CC=golang-codereviews
https://golang.org/cl/119000043
Diffstat (limited to 'src')
| -rw-r--r-- | src/liblink/asm5.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/liblink/asm5.c b/src/liblink/asm5.c index 6ff29f2e60..73a31862f5 100644 --- a/src/liblink/asm5.c +++ b/src/liblink/asm5.c @@ -953,7 +953,11 @@ addpool(Link *ctxt, Prog *p, Addr *a) switch(c) { default: - t.to = *a; + t.to.offset = a->offset; + t.to.sym = a->sym; + t.to.type = a->type; + t.to.name = a->name; + if(ctxt->flag_shared && t.to.sym != nil) t.pcrel = p; break; @@ -1102,7 +1106,6 @@ aclass(Link *ctxt, Addr *a) case D_STATIC: if(a->sym == 0 || a->sym->name == 0) { print("null sym external\n"); - print("%D\n", a); return C_GOK; } ctxt->instoffset = 0; // s.b. unused but just in case |
