Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
26d9c804
Commit
26d9c804
authored
Aug 26, 2011
by
Joel Sing
Committed by
Russ Cox
Aug 26, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
8l: add openbsd
R=golang-dev, rsc CC=golang-dev
https://golang.org/cl/4972043
parent
582f6d4f
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
1 deletion
+13
-1
asm.c
src/cmd/8l/asm.c
+8
-1
doc.go
src/cmd/8l/doc.go
+2
-0
obj.c
src/cmd/8l/obj.c
+3
-0
No files found.
src/cmd/8l/asm.c
View file @
26d9c804
...
...
@@ -41,6 +41,7 @@
char
linuxdynld
[]
=
"/lib/ld-linux.so.2"
;
char
freebsddynld
[]
=
"/usr/libexec/ld-elf.so.1"
;
char
openbsddynld
[]
=
"/usr/libexec/ld.so"
;
int32
entryvalue
(
void
)
...
...
@@ -956,6 +957,9 @@ asmb(void)
case
Hfreebsd
:
interpreter
=
freebsddynld
;
break
;
case
Hopenbsd
:
interpreter
=
openbsddynld
;
break
;
}
}
elfinterp
(
sh
,
startva
,
interpreter
);
...
...
@@ -1122,7 +1126,10 @@ asmb(void)
eh
->
ident
[
EI_VERSION
]
=
EV_CURRENT
;
switch
(
HEADTYPE
)
{
case
Hfreebsd
:
eh
->
ident
[
EI_OSABI
]
=
9
;
eh
->
ident
[
EI_OSABI
]
=
ELFOSABI_FREEBSD
;
break
;
case
Hopenbsd
:
eh
->
ident
[
EI_OSABI
]
=
ELFOSABI_OPENBSD
;
break
;
}
...
...
src/cmd/8l/doc.go
View file @
26d9c804
...
...
@@ -33,6 +33,8 @@ Options new in this version:
Write Linux ELF binaries (default when $GOOS is linux)
-Hfreebsd
Write FreeBSD ELF binaries (default when $GOOS is freebsd)
-Hopenbsd
Write OpenBSD ELF binaries (default when $GOOS is openbsd)
-Hwindows
Write Windows PE32 binaries (default when $GOOS is windows)
-I interpreter
...
...
src/cmd/8l/obj.c
View file @
26d9c804
...
...
@@ -55,6 +55,7 @@ Header headers[] = {
"darwin"
,
Hdarwin
,
"linux"
,
Hlinux
,
"freebsd"
,
Hfreebsd
,
"openbsd"
,
Hopenbsd
,
"windows"
,
Hwindows
,
"windowsgui"
,
Hwindows
,
0
,
0
...
...
@@ -69,6 +70,7 @@ Header headers[] = {
* -Hdarwin -Tx -Rx is Apple Mach-O
* -Hlinux -Tx -Rx is Linux ELF32
* -Hfreebsd -Tx -Rx is FreeBSD ELF32
* -Hopenbsd -Tx -Rx is OpenBSD ELF32
* -Hwindows -Tx -Rx is MS Windows PE32
*/
...
...
@@ -223,6 +225,7 @@ main(int argc, char *argv[])
break
;
case
Hlinux
:
/* elf32 executable */
case
Hfreebsd
:
case
Hopenbsd
:
/*
* ELF uses TLS offsets negative from %gs.
* Translate 0(GS) and 4(GS) into -8(GS) and -4(GS).
...
...
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