Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
33405ecc
Commit
33405ecc
authored
Dec 15, 2010
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix freebsd build
R=iant, r CC=dho, golang-dev
https://golang.org/cl/3687041
parent
1a072f4b
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
37 additions
and
13 deletions
+37
-13
src/cmd/6l/asm.c
src/cmd/6l/asm.c
+1
-2
src/cmd/6l/obj.c
src/cmd/6l/obj.c
+1
-0
src/cmd/8l/asm.c
src/cmd/8l/asm.c
+1
-2
src/cmd/8l/obj.c
src/cmd/8l/obj.c
+1
-0
src/cmd/ld/data.c
src/cmd/ld/data.c
+2
-2
src/cmd/ld/go.c
src/cmd/ld/go.c
+9
-0
src/cmd/ld/lib.h
src/cmd/ld/lib.h
+2
-0
src/pkg/deps.bash
src/pkg/deps.bash
+1
-1
src/pkg/runtime/cgo/Makefile
src/pkg/runtime/cgo/Makefile
+6
-0
src/pkg/runtime/cgo/freebsd.c
src/pkg/runtime/cgo/freebsd.c
+13
-0
src/pkg/runtime/cgo/freebsd_386.c
src/pkg/runtime/cgo/freebsd_386.c
+0
-3
src/pkg/runtime/cgo/freebsd_amd64.c
src/pkg/runtime/cgo/freebsd_amd64.c
+0
-3
No files found.
src/cmd/6l/asm.c
View file @
33405ecc
...
@@ -163,7 +163,6 @@ needlib(char *name)
...
@@ -163,7 +163,6 @@ needlib(char *name)
int
nelfsym
=
1
;
int
nelfsym
=
1
;
static
void
adddynsym
(
Sym
*
);
static
void
addpltsym
(
Sym
*
);
static
void
addpltsym
(
Sym
*
);
static
void
addgotsym
(
Sym
*
);
static
void
addgotsym
(
Sym
*
);
...
@@ -437,7 +436,7 @@ addgotsym(Sym *s)
...
@@ -437,7 +436,7 @@ addgotsym(Sym *s)
}
}
}
}
static
void
void
adddynsym
(
Sym
*
s
)
adddynsym
(
Sym
*
s
)
{
{
Sym
*
d
,
*
str
;
Sym
*
d
,
*
str
;
...
...
src/cmd/6l/obj.c
View file @
33405ecc
...
@@ -245,6 +245,7 @@ main(int argc, char *argv[])
...
@@ -245,6 +245,7 @@ main(int argc, char *argv[])
else
else
doprof2
();
doprof2
();
span
();
span
();
addexport
();
textaddress
();
textaddress
();
pclntab
();
pclntab
();
symtab
();
symtab
();
...
...
src/cmd/8l/asm.c
View file @
33405ecc
...
@@ -153,7 +153,6 @@ needlib(char *name)
...
@@ -153,7 +153,6 @@ needlib(char *name)
int
nelfsym
=
1
;
int
nelfsym
=
1
;
static
void
adddynsym
(
Sym
*
);
static
void
addpltsym
(
Sym
*
);
static
void
addpltsym
(
Sym
*
);
static
void
addgotsym
(
Sym
*
);
static
void
addgotsym
(
Sym
*
);
...
@@ -420,7 +419,7 @@ addgotsym(Sym *s)
...
@@ -420,7 +419,7 @@ addgotsym(Sym *s)
}
}
}
}
static
void
void
adddynsym
(
Sym
*
s
)
adddynsym
(
Sym
*
s
)
{
{
Sym
*
d
,
*
str
;
Sym
*
d
,
*
str
;
...
...
src/cmd/8l/obj.c
View file @
33405ecc
...
@@ -313,6 +313,7 @@ main(int argc, char *argv[])
...
@@ -313,6 +313,7 @@ main(int argc, char *argv[])
else
else
doprof2
();
doprof2
();
span
();
span
();
addexport
();
textaddress
();
textaddress
();
pclntab
();
pclntab
();
symtab
();
symtab
();
...
...
src/cmd/ld/data.c
View file @
33405ecc
...
@@ -165,9 +165,9 @@ relocsym(Sym *s)
...
@@ -165,9 +165,9 @@ relocsym(Sym *s)
if
(
r
->
type
>=
256
)
if
(
r
->
type
>=
256
)
continue
;
continue
;
if
(
r
->
sym
!=
S
&&
(
r
->
sym
->
type
==
SDYNIMPORT
||
r
->
sym
->
dynimpname
!=
nil
)
)
if
(
r
->
sym
!=
S
&&
r
->
sym
->
type
==
SDYNIMPORT
)
if
(
thechar
!=
'8'
||
HEADTYPE
!=
10
)
// Windows PE supports relocation references to dynamic import symbols
if
(
thechar
!=
'8'
||
HEADTYPE
!=
10
)
// Windows PE supports relocation references to dynamic import symbols
diag
(
"unhandled relocation for %s (
rtype %d)"
,
r
->
sym
->
nam
e
,
r
->
type
);
diag
(
"unhandled relocation for %s (
type %d rtype %d)"
,
r
->
sym
->
name
,
r
->
sym
->
typ
e
,
r
->
type
);
if
(
r
->
sym
!=
S
&&
!
r
->
sym
->
reachable
)
if
(
r
->
sym
!=
S
&&
!
r
->
sym
->
reachable
)
diag
(
"unreachable sym in relocation: %s %s"
,
s
->
name
,
r
->
sym
->
name
);
diag
(
"unreachable sym in relocation: %s %s"
,
s
->
name
,
r
->
sym
->
name
);
...
...
src/cmd/ld/go.c
View file @
33405ecc
...
@@ -658,3 +658,12 @@ deadcode(void)
...
@@ -658,3 +658,12 @@ deadcode(void)
else
else
last
->
next
=
nil
;
last
->
next
=
nil
;
}
}
void
addexport
(
void
)
{
int
i
;
for
(
i
=
0
;
i
<
ndynexp
;
i
++
)
adddynsym
(
dynexp
[
i
]);
}
src/cmd/ld/lib.h
View file @
33405ecc
...
@@ -161,6 +161,8 @@ void genasmsym(void (*put)(Sym*, char*, int, vlong, vlong, int, Sym*));
...
@@ -161,6 +161,8 @@ void genasmsym(void (*put)(Sym*, char*, int, vlong, vlong, int, Sym*));
vlong
datoff
(
vlong
);
vlong
datoff
(
vlong
);
void
adddynlib
(
char
*
);
void
adddynlib
(
char
*
);
int
archreloc
(
Reloc
*
,
Sym
*
,
vlong
*
);
int
archreloc
(
Reloc
*
,
Sym
*
,
vlong
*
);
void
adddynsym
(
Sym
*
);
void
addexport
(
void
);
int
pathchar
(
void
);
int
pathchar
(
void
);
void
*
mal
(
uint32
);
void
*
mal
(
uint32
);
...
...
src/pkg/deps.bash
View file @
33405ecc
...
@@ -14,7 +14,7 @@ if [ -f $OUT ] && ! [ -w $OUT ]; then
...
@@ -14,7 +14,7 @@ if [ -f $OUT ] && ! [ -w $OUT ]; then
fi
fi
# Get list of directories from Makefile
# Get list of directories from Makefile
dirs
=
$(
make echo-dirs
)
dirs
=
$(
go
make echo-dirs
)
dirpat
=
$(
echo
$dirs
C |
sed
's/ /|/g; s/.*/^(&)$/'
)
dirpat
=
$(
echo
$dirs
C |
sed
's/ /|/g; s/.*/^(&)$/'
)
for
dir
in
$dirs
;
do
(
for
dir
in
$dirs
;
do
(
...
...
src/pkg/runtime/cgo/Makefile
View file @
33405ecc
...
@@ -31,6 +31,12 @@ OFILES=\
...
@@ -31,6 +31,12 @@ OFILES=\
CGO_LDFLAGS
=
-lpthread
CGO_LDFLAGS
=
-lpthread
ifeq
($(GOOS),freebsd)
OFILES
+=
\
freebsd.
$O
\
endif
endif
endif
include
../../../Make.pkg
include
../../../Make.pkg
...
...
src/pkg/runtime/cgo/freebsd.c
0 → 100644
View file @
33405ecc
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Supply environ and __progname, because we don't
// link against the standard FreeBSD crt0.o and the
// libc dynamic library needs them.
char
*
environ
[
1
];
char
*
__progname
;
#pragma dynexport environ environ
#pragma dynexport __progname __progname
src/pkg/runtime/cgo/freebsd_386.c
View file @
33405ecc
...
@@ -7,9 +7,6 @@
...
@@ -7,9 +7,6 @@
static
void
*
threadentry
(
void
*
);
static
void
*
threadentry
(
void
*
);
char
*
environ
[]
=
{
0
};
char
*
__progname
;
static
void
static
void
xinitcgo
(
void
)
xinitcgo
(
void
)
{
{
...
...
src/pkg/runtime/cgo/freebsd_amd64.c
View file @
33405ecc
...
@@ -7,9 +7,6 @@
...
@@ -7,9 +7,6 @@
static
void
*
threadentry
(
void
*
);
static
void
*
threadentry
(
void
*
);
char
*
environ
[]
=
{
0
};
char
*
__progname
;
static
void
static
void
xinitcgo
(
void
)
xinitcgo
(
void
)
{
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment