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
00274a13
Commit
00274a13
authored
Aug 14, 2009
by
Rob Pike
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename libmach_amd64 libmach
R=rsc OCL=33273 CL=33276
parent
ce1dd6cc
Changes
32
Hide whitespace changes
Inline
Side-by-side
Showing
32 changed files
with
48 additions
and
84 deletions
+48
-84
include/mach.h
include/mach.h
+0
-12
src/clean.bash
src/clean.bash
+1
-1
src/cmd/ar/Makefile
src/cmd/ar/Makefile
+1
-1
src/cmd/ar/ar.c
src/cmd/ar/ar.c
+1
-1
src/cmd/cov/Makefile
src/cmd/cov/Makefile
+1
-1
src/cmd/cov/main.c
src/cmd/cov/main.c
+1
-1
src/cmd/nm/Makefile
src/cmd/nm/Makefile
+1
-1
src/cmd/nm/nm.c
src/cmd/nm/nm.c
+13
-13
src/cmd/prof/Makefile
src/cmd/prof/Makefile
+1
-1
src/cmd/prof/main.c
src/cmd/prof/main.c
+1
-1
src/libmach/5obj.c
src/libmach/5obj.c
+1
-1
src/libmach/6.c
src/libmach/6.c
+1
-1
src/libmach/6obj.c
src/libmach/6obj.c
+1
-1
src/libmach/8.c
src/libmach/8.c
+1
-1
src/libmach/8db.c
src/libmach/8db.c
+2
-2
src/libmach/8obj.c
src/libmach/8obj.c
+1
-1
src/libmach/Makefile
src/libmach/Makefile
+2
-26
src/libmach/access.c
src/libmach/access.c
+1
-1
src/libmach/darwin.c
src/libmach/darwin.c
+1
-1
src/libmach/elf.h
src/libmach/elf.h
+0
-0
src/libmach/executable.c
src/libmach/executable.c
+7
-7
src/libmach/fakeobj.c
src/libmach/fakeobj.c
+1
-1
src/libmach/linux.c
src/libmach/linux.c
+1
-1
src/libmach/machdata.c
src/libmach/machdata.c
+1
-1
src/libmach/macho.h
src/libmach/macho.h
+0
-0
src/libmach/map.c
src/libmach/map.c
+1
-1
src/libmach/obj.c
src/libmach/obj.c
+2
-2
src/libmach/obj.h
src/libmach/obj.h
+0
-0
src/libmach/setmach.c
src/libmach/setmach.c
+1
-1
src/libmach/swap.c
src/libmach/swap.c
+0
-0
src/libmach/sym.c
src/libmach/sym.c
+1
-1
src/make.bash
src/make.bash
+1
-1
No files found.
include/mach
_amd64
.h
→
include/mach.h
View file @
00274a13
...
...
@@ -29,15 +29,7 @@
/*
* Architecture-dependent application data
* This is just Plan 9's mach.h, tweaked to support only amd64 for now.
*/
/*
* Start of Plan 9 a.out.h
* Don't use system a.out; instead just lay in the Plan 9 one for now.
*/
/*
#include "a.out.h"
*/
typedef
struct
Exec
Exec
;
struct
Exec
...
...
@@ -87,10 +79,6 @@ struct Sym
vlong
gotype
;
int
sequence
;
// order in file
};
/*
* End of Plan 9 a.out.h
* Don't use system a.out; instead just lay in the Plan 9 one for now.
*/
/*
...
...
src/clean.bash
View file @
00274a13
...
...
@@ -5,7 +5,7 @@
rm
-rf
$GOROOT
/pkg/[0-9a-zA-Z_]
*
rm
-f
$GOROOT
/lib/
*
.[6a]
for
i
in
lib9 libbio libmach
_amd64
libregexp cmd pkg
for
i
in
lib9 libbio libmach libregexp cmd pkg
do
cd
$i
case
$i
in
...
...
src/cmd/ar/Makefile
View file @
00274a13
...
...
@@ -13,7 +13,7 @@ OFILES=\
ar.
$O
\
$(TARG)
:
$(OFILES)
$(LD)
-o
$(TARG)
-L
$(GOROOT)
/lib
$(OFILES)
-lmach
_amd64
-lbio
-l9
$(LD)
-o
$(TARG)
-L
$(GOROOT)
/lib
$(OFILES)
-lmach
-lbio
-l9
clean
:
rm
-f
$(OFILES)
$(TARG)
...
...
src/cmd/ar/ar.c
View file @
00274a13
...
...
@@ -39,7 +39,7 @@
#include <u.h>
#include <libc.h>
#include <bio.h>
#include <mach
_amd64
.h>
#include <mach.h>
#include <ar.h>
#undef select
...
...
src/cmd/cov/Makefile
View file @
00274a13
...
...
@@ -17,7 +17,7 @@ HFILES=\
tree.h
\
$(TARG)
:
$(OFILES)
$(LD)
-o
$(TARG)
-L
$(GOROOT)
/lib
$(OFILES)
-lmach
_amd64
-lregexp9
-lbio
-l9
$(LD)
-o
$(TARG)
-L
$(GOROOT)
/lib
$(OFILES)
-lmach
-lregexp9
-lbio
-l9
clean
:
rm
-f
$(OFILES)
$(TARG)
...
...
src/cmd/cov/main.c
View file @
00274a13
...
...
@@ -15,7 +15,7 @@
#include "tree.h"
#include <ureg_amd64.h>
#include <mach
_amd64
.h>
#include <mach.h>
typedef
struct
Ureg
Ureg
;
void
...
...
src/cmd/nm/Makefile
View file @
00274a13
...
...
@@ -13,7 +13,7 @@ OFILES=\
nm.
$O
\
$(TARG)
:
$(OFILES)
$(LD)
-o
$(TARG)
-L
$(GOROOT)
/lib
$(OFILES)
-lmach
_amd64
-lbio
-l9
$(LD)
-o
$(TARG)
-L
$(GOROOT)
/lib
$(OFILES)
-lmach
-lbio
-l9
clean
:
rm
-f
$(OFILES)
$(TARG)
...
...
src/cmd/nm/nm.c
View file @
00274a13
// Inferno utils/nm/nm.c
// http://code.google.com/p/inferno-os/source/browse/utils/nm/nm.c
//
// Copyright © 1994-1999 Lucent Technologies Inc. All rights reserved.
// Portions Copyright © 1995-1997 C H Forsyth (forsyth@terzarima.net)
// Portions Copyright © 1997-1999 Vita Nuova Limited
// Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com)
// Portions Copyright © 2004,2006 Bruce Ellis
// Portions Copyright © 2005-2007 C H Forsyth (forsyth@terzarima.net)
// Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others
// Portions Copyright © 2009 The Go Authors. All rights reserved.
//
//
//
Copyright © 1994-1999 Lucent Technologies Inc. All rights reserved.
//
Portions Copyright © 1995-1997 C H Forsyth (forsyth@terzarima.net)
//
Portions Copyright © 1997-1999 Vita Nuova Limited
//
Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com)
//
Portions Copyright © 2004,2006 Bruce Ellis
//
Portions Copyright © 2005-2007 C H Forsyth (forsyth@terzarima.net)
//
Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others
//
Portions Copyright © 2009 The Go Authors. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
...
...
@@ -35,7 +35,7 @@
#include <libc.h>
#include <ar.h>
#include <bio.h>
#include <mach
_amd64
.h>
#include <mach.h>
enum
{
CHUNK
=
256
/* must be power of 2 */
...
...
src/cmd/prof/Makefile
View file @
00274a13
...
...
@@ -17,7 +17,7 @@ OFILES=\
# fns.h\
$(TARG)
:
$(OFILES)
$(LD)
-o
$(TARG)
-L
$(GOROOT)
/lib
$(OFILES)
-lmach
_amd64
-lbio
-l9
$(LD)
-o
$(TARG)
-L
$(GOROOT)
/lib
$(OFILES)
-lmach
-lbio
-l9
clean
:
rm
-f
$(OFILES)
$(TARG)
...
...
src/cmd/prof/main.c
View file @
00274a13
...
...
@@ -9,7 +9,7 @@
#include <ctype.h>
#include <ureg_amd64.h>
#include <mach
_amd64
.h>
#include <mach.h>
char
*
file
=
"6.out"
;
static
Fhdr
fhdr
;
...
...
src/libmach
_amd64
/5obj.c
→
src/libmach/5obj.c
View file @
00274a13
...
...
@@ -32,7 +32,7 @@
#include <u.h>
#include <libc.h>
#include <bio.h>
#include <mach
_amd64
.h>
#include <mach.h>
#include "../cmd/5l/5.out.h"
#include "obj.h"
...
...
src/libmach
_amd64
/6.c
→
src/libmach/6.c
View file @
00274a13
...
...
@@ -33,7 +33,7 @@
#include <libc.h>
#include <bio.h>
#include "ureg_amd64.h"
#include <mach
_amd64
.h>
#include <mach.h>
#define REGOFF(x) offsetof(struct Ureg, x)
...
...
src/libmach
_amd64
/6obj.c
→
src/libmach/6obj.c
View file @
00274a13
...
...
@@ -32,7 +32,7 @@
#include <u.h>
#include <libc.h>
#include <bio.h>
#include <mach
_amd64
.h>
#include <mach.h>
#include "../cmd/6l/6.out.h"
#include "obj.h"
...
...
src/libmach
_amd64
/8.c
→
src/libmach/8.c
View file @
00274a13
...
...
@@ -32,7 +32,7 @@
#include <u.h>
#include <bio.h>
#include <ureg_x86.h>
#include <mach
_amd64
.h>
#include <mach.h>
#define REGOFF(x) (uintptr)(&((struct Ureg *) 0)->x)
...
...
src/libmach
_amd64
/8db.c
→
src/libmach/8db.c
View file @
00274a13
...
...
@@ -29,7 +29,7 @@
#include <u.h>
#include <libc.h>
#include <bio.h>
#include <mach
_amd64
.h>
#include <mach.h>
#define Ureg UregAmd64
#include <ureg_amd64.h>
#undef Ureg
...
...
@@ -226,7 +226,7 @@ i386trace(Map *map, uvlong pc, uvlong sp, uvlong link, Tracer trace)
findsym
(
pc
,
CTEXT
,
&
s
);
(
*
trace
)(
map
,
pc
,
sp
,
&
s1
);
// morestack's caller; caller's caller's PC/SP
continue
;
}
}
if
(
pc
==
lessstack
)
{
// ../pkg/runtime/runtime.h
...
...
src/libmach
_amd64
/8obj.c
→
src/libmach/8obj.c
View file @
00274a13
...
...
@@ -32,7 +32,7 @@
#include <u.h>
#include <libc.h>
#include <bio.h>
#include <mach
_amd64
.h>
#include <mach.h>
#include "../cmd/8l/8.out.h"
#include "obj.h"
...
...
src/libmach
_amd64
/Makefile
→
src/libmach/Makefile
View file @
00274a13
...
...
@@ -28,7 +28,7 @@
include
../Make.conf
LIB
=
libmach
_amd64
.a
LIB
=
libmach.a
OFILES
=
\
executable.
$O
\
fakeobj.
$O
\
...
...
@@ -46,32 +46,8 @@ OFILES=\
6obj.
$O
\
8obj.
$O
\
$(GOOS)
.
$O
\
# v.$O
\
# k.$O
\
# u.$O
\
# q.$O
\
# 0.$O
\
# 2.$O
\
# 5.$O
\
# 7.$O
\
# 9.$O
\
# vdb.$O
\
# kdb.$O
\
# udb.$O
\
# qdb.$O
\
# 2db.$O
\
# 5db.$O
\
# 7db.$O
\
# vobj.$O
\
# kobj.$O
\
# uobj.$O
\
# 2obj.$O
\
# 7obj.$O
\
# 9obj.$O
\
# qobj.$O
\
# vcodas.$O
\
HFILES
=
$(GOROOT)
/include/mach
_amd64
.h elf.h macho.h obj.h
HFILES
=
$(GOROOT)
/include/mach.h elf.h macho.h obj.h
install
:
$(LIB)
cp
$(LIB)
$(GOROOT)
/lib
...
...
src/libmach
_amd64
/access.c
→
src/libmach/access.c
View file @
00274a13
...
...
@@ -33,7 +33,7 @@
#include <u.h>
#include <libc.h>
#include <bio.h>
#include <mach
_amd64
.h>
#include <mach.h>
static
int
mget
(
Map
*
,
uvlong
,
void
*
,
int
);
static
int
mput
(
Map
*
,
uvlong
,
void
*
,
int
);
...
...
src/libmach
_amd64
/darwin.c
→
src/libmach/darwin.c
View file @
00274a13
...
...
@@ -28,7 +28,7 @@
#include <errno.h>
#include <libc.h>
#include <bio.h>
#include <mach
_amd64
.h>
#include <mach.h>
#define Ureg Ureg32
#include <ureg_x86.h>
#undef Ureg
...
...
src/libmach
_amd64
/elf.h
→
src/libmach/elf.h
View file @
00274a13
File moved
src/libmach
_amd64
/executable.c
→
src/libmach/executable.c
View file @
00274a13
// Inferno libmach/executable.c
// http://code.google.com/p/inferno-os/source/browse/utils/libmach/executable.c
//
// Copyright © 1994-1999 Lucent Technologies Inc.
// Power PC support Copyright © 1995-2004 C H Forsyth (forsyth@terzarima.net).
// Portions Copyright © 1997-1999 Vita Nuova Limited.
// Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com).
// Revisions Copyright © 2000-2004 Lucent Technologies Inc. and others.
//
Copyright © 1994-1999 Lucent Technologies Inc.
//
Power PC support Copyright © 1995-2004 C H Forsyth (forsyth@terzarima.net).
//
Portions Copyright © 1997-1999 Vita Nuova Limited.
//
Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com).
//
Revisions Copyright © 2000-2004 Lucent Technologies Inc. and others.
// Portions Copyright © 2009 The Go Authors. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
...
...
@@ -30,7 +30,7 @@
#include <libc.h>
#include <bio.h>
#include <bootexec.h>
#include <mach
_amd64
.h>
#include <mach.h>
#include "elf.h"
#include "macho.h"
...
...
@@ -268,7 +268,7 @@ ExecTable exectab[] =
sizeof
(
Machhdr
),
nil
,
machdotout
},
{
MACH32_MAG
,
/*
64
-bit MACH (apple mac) */
{
MACH32_MAG
,
/*
32
-bit MACH (apple mac) */
"mach executable"
,
nil
,
FI386
,
...
...
src/libmach
_amd64
/fakeobj.c
→
src/libmach/fakeobj.c
View file @
00274a13
...
...
@@ -10,7 +10,7 @@
#include <libc.h>
#include <bio.h>
#include <ar.h>
#include <mach
_amd64
.h>
#include <mach.h>
#include "obj.h"
int
_is2
(
char
*
x
)
{
return
0
;
}
...
...
src/libmach
_amd64
/linux.c
→
src/libmach/linux.c
View file @
00274a13
...
...
@@ -37,7 +37,7 @@
#include <errno.h>
#include <libc.h>
#include <bio.h>
#include <mach
_amd64
.h>
#include <mach.h>
#define Ureg Ureg32
#include <ureg_x86.h>
#undef Ureg
...
...
src/libmach
_amd64
/machdata.c
→
src/libmach/machdata.c
View file @
00274a13
...
...
@@ -33,7 +33,7 @@
#include <u.h>
#include <libc.h>
#include <bio.h>
#include <mach
_amd64
.h>
#include <mach.h>
#define STARTSYM "_main"
#define PROFSYM "_mainp"
...
...
src/libmach
_amd64
/macho.h
→
src/libmach/macho.h
View file @
00274a13
File moved
src/libmach
_amd64
/map.c
→
src/libmach/map.c
View file @
00274a13
...
...
@@ -37,7 +37,7 @@
#include <u.h>
#include <libc.h>
#include <bio.h>
#include <mach
_amd64
.h>
#include <mach.h>
Map
*
newmap
(
Map
*
map
,
int
n
)
...
...
src/libmach
_amd64
/obj.c
→
src/libmach/obj.c
View file @
00274a13
...
...
@@ -34,7 +34,7 @@
#include <libc.h>
#include <bio.h>
#include <ar.h>
#include <mach
_amd64
.h>
#include <mach.h>
#include "obj.h"
#define islocal(t) ((t)=='a' || (t)=='p')
...
...
@@ -333,7 +333,7 @@ _offset(int id, vlong off)
/*
* update the type of a global text or data symbol
*/
static
void
static
void
objupdate
(
int
id
,
int
type
)
{
Sym
*
s
;
...
...
src/libmach
_amd64
/obj.h
→
src/libmach/obj.h
View file @
00274a13
File moved
src/libmach
_amd64
/setmach.c
→
src/libmach/setmach.c
View file @
00274a13
...
...
@@ -29,7 +29,7 @@
#include <u.h>
#include <libc.h>
#include <bio.h>
#include <mach
_amd64
.h>
#include <mach.h>
/* table for selecting machine-dependent parameters */
typedef
struct
machtab
Machtab
;
...
...
src/libmach
_amd64
/swap.c
→
src/libmach/swap.c
View file @
00274a13
File moved
src/libmach
_amd64
/sym.c
→
src/libmach/sym.c
View file @
00274a13
...
...
@@ -29,7 +29,7 @@
#include <u.h>
#include <libc.h>
#include <bio.h>
#include <mach
_amd64
.h>
#include <mach.h>
#define HUGEINT 0x7fffffff
#define NNAME 20
/* a relic of the past */
...
...
src/make.bash
View file @
00274a13
...
...
@@ -19,7 +19,7 @@ rm -f $GOBIN/quietgcc
cp
quietgcc.bash
$GOBIN
/quietgcc
chmod
+x
$GOBIN
/quietgcc
for
i
in
lib9 libbio libmach
_amd64
libregexp cmd pkg cmd/ebnflint cmd/godoc cmd/gofmt
for
i
in
lib9 libbio libmach libregexp cmd pkg cmd/ebnflint cmd/godoc cmd/gofmt
do
# The ( ) here are to preserve the current directory
# for the next round despite the cd $i below.
...
...
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