summaryrefslogtreecommitdiff
path: root/src/cmd
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2012-09-13 10:26:21 -0400
committerRuss Cox <rsc@golang.org>2012-09-13 10:26:21 -0400
commit6ee91ced92fc27f8c93b0589484923593cad240f (patch)
treebad6a4ea4b6c9287c13be53c5337d79e040f99f1 /src/cmd
parentec9967ff11851facad48bb0c11639e52a77f79b9 (diff)
downloadgo-git-6ee91ced92fc27f8c93b0589484923593cad240f.tar.gz
cmd/pack: rename __.SYMDEF to __.GOSYMDEF
This fixes a problem with ELF tools thinking they know the format of the symbol table, as we do not use any of the standard formats for that table. This change will probably annoy the Plan 9 users, but I believe there are other incompatibilities already that mean they have to use a Go-specific nm. Fixes #3473. R=golang-dev, iant CC=golang-dev https://golang.org/cl/6500117
Diffstat (limited to 'src/cmd')
-rw-r--r--src/cmd/5l/5.out.h2
-rw-r--r--src/cmd/6l/6.out.h2
-rw-r--r--src/cmd/8l/8.out.h2
-rw-r--r--src/cmd/gc/lex.c2
-rw-r--r--src/cmd/ld/lib.c4
-rw-r--r--src/cmd/nm/nm.c2
-rw-r--r--src/cmd/pack/ar.c2
7 files changed, 8 insertions, 8 deletions
diff --git a/src/cmd/5l/5.out.h b/src/cmd/5l/5.out.h
index 1dea18c49e..23ff6210e3 100644
--- a/src/cmd/5l/5.out.h
+++ b/src/cmd/5l/5.out.h
@@ -276,7 +276,7 @@ enum as
/*
* this is the ranlib header
*/
-#define SYMDEF "__.SYMDEF"
+#define SYMDEF "__.GOSYMDEF"
/*
* this is the simulated IEEE floating point
diff --git a/src/cmd/6l/6.out.h b/src/cmd/6l/6.out.h
index cd861c038e..01c2ba840b 100644
--- a/src/cmd/6l/6.out.h
+++ b/src/cmd/6l/6.out.h
@@ -865,7 +865,7 @@ enum
/*
* this is the ranlib header
*/
-#define SYMDEF "__.SYMDEF"
+#define SYMDEF "__.GOSYMDEF"
/*
* this is the simulated IEEE floating point
diff --git a/src/cmd/8l/8.out.h b/src/cmd/8l/8.out.h
index 924ba93901..49e046207b 100644
--- a/src/cmd/8l/8.out.h
+++ b/src/cmd/8l/8.out.h
@@ -547,7 +547,7 @@ enum
/*
* this is the ranlib header
*/
-#define SYMDEF "__.SYMDEF"
+#define SYMDEF "__.GOSYMDEF"
/*
* this is the simulated IEEE floating point
diff --git a/src/cmd/gc/lex.c b/src/cmd/gc/lex.c
index 0788a61514..3ef3fcc746 100644
--- a/src/cmd/gc/lex.c
+++ b/src/cmd/gc/lex.c
@@ -480,7 +480,7 @@ skiptopkgdef(Biobuf *b)
if(memcmp(p, "!<arch>\n", 8) != 0)
return 0;
/* symbol table is first; skip it */
- sz = arsize(b, "__.SYMDEF");
+ sz = arsize(b, "__.GOSYMDEF");
if(sz < 0)
return 0;
Bseek(b, sz, 1);
diff --git a/src/cmd/ld/lib.c b/src/cmd/ld/lib.c
index 2385809dbf..2026707c2f 100644
--- a/src/cmd/ld/lib.c
+++ b/src/cmd/ld/lib.c
@@ -366,7 +366,7 @@ objfile(char *file, char *pkg)
return;
}
- /* skip over __.SYMDEF */
+ /* skip over __.GOSYMDEF */
off = Boffset(f);
if((l = nextar(f, off, &arhdr)) <= 0) {
diag("%s: short read on archive file symbol header", file);
@@ -402,7 +402,7 @@ objfile(char *file, char *pkg)
* the individual symbols that are unused.
*
* loading every object will also make it possible to
- * load foreign objects not referenced by __.SYMDEF.
+ * load foreign objects not referenced by __.GOSYMDEF.
*/
for(;;) {
l = nextar(f, off, &arhdr);
diff --git a/src/cmd/nm/nm.c b/src/cmd/nm/nm.c
index 845b6c773a..6682390358 100644
--- a/src/cmd/nm/nm.c
+++ b/src/cmd/nm/nm.c
@@ -43,7 +43,7 @@ enum{
char *errs; /* exit status */
char *filename; /* current file */
-char symname[]="__.SYMDEF"; /* table of contents file name */
+char symname[]="__.GOSYMDEF"; /* table of contents file name */
int multifile; /* processing multiple files */
int aflag;
int gflag;
diff --git a/src/cmd/pack/ar.c b/src/cmd/pack/ar.c
index 990094e5db..7053f841f3 100644
--- a/src/cmd/pack/ar.c
+++ b/src/cmd/pack/ar.c
@@ -111,7 +111,7 @@ char *opt = "uvnbailogS";
char artemp[] = "/tmp/vXXXXX";
char movtemp[] = "/tmp/v1XXXXX";
char tailtemp[] = "/tmp/v2XXXXX";
-char symdef[] = "__.SYMDEF";
+char symdef[] = "__.GOSYMDEF";
char pkgdef[] = "__.PKGDEF";
int aflag; /* command line flags */