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
1f223463
Commit
1f223463
authored
Mar 25, 2011
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
runtime: fix arm build
R=adg, dfc, r CC=golang-dev
https://golang.org/cl/4296042
parent
c0168f8f
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
56 additions
and
26 deletions
+56
-26
traceback.c
src/pkg/runtime/arm/traceback.c
+1
-1
defs.h
src/pkg/runtime/linux/arm/defs.h
+27
-15
signal.c
src/pkg/runtime/linux/arm/signal.c
+1
-2
sys.s
src/pkg/runtime/linux/arm/sys.s
+2
-2
defs_arm.c
src/pkg/runtime/linux/defs_arm.c
+25
-6
No files found.
src/pkg/runtime/arm/traceback.c
View file @
1f223463
...
@@ -14,7 +14,7 @@ void _mod(void);
...
@@ -14,7 +14,7 @@ void _mod(void);
void
_divu
(
void
);
void
_divu
(
void
);
void
_modu
(
void
);
void
_modu
(
void
);
static
int32
int32
runtime
·
gentraceback
(
byte
*
pc0
,
byte
*
sp
,
byte
*
lr0
,
G
*
g
,
int32
skip
,
uintptr
*
pcbuf
,
int32
max
)
runtime
·
gentraceback
(
byte
*
pc0
,
byte
*
sp
,
byte
*
lr0
,
G
*
g
,
int32
skip
,
uintptr
*
pcbuf
,
int32
max
)
{
{
int32
i
,
n
,
iter
;
int32
i
,
n
,
iter
;
...
...
src/pkg/runtime/linux/arm/defs.h
View file @
1f223463
// godefs -
carm-gcc -f -I/usr/local/google/src/linux-2.6.28/arch/arm/include -f -I/usr/local/google/src/linux-2.6.28/include -f-D__KERNEL__ -f-D__ARCH_SI_UID_T=int
defs_arm.c
// godefs -
f-I/usr/src/linux-headers-2.6.26-2-versatile/include
defs_arm.c
// MACHINE GENERATED - DO NOT EDIT.
// MACHINE GENERATED - DO NOT EDIT.
...
@@ -58,23 +58,15 @@ enum {
...
@@ -58,23 +58,15 @@ enum {
BUS_OBJERR
=
0x3
,
BUS_OBJERR
=
0x3
,
SEGV_MAPERR
=
0x1
,
SEGV_MAPERR
=
0x1
,
SEGV_ACCERR
=
0x2
,
SEGV_ACCERR
=
0x2
,
ITIMER_REAL
=
0
,
ITIMER_PROF
=
0x2
,
ITIMER_VIRTUAL
=
0x1
,
};
};
// Types
// Types
#pragma pack on
#pragma pack on
typedef
struct
Sigset
Sigset
;
typedef
uint32
Sigset
;
struct
Sigset
{
uint32
sig
[
2
];
};
typedef
struct
Sigaction
Sigaction
;
struct
Sigaction
{
void
*
sa_handler
;
uint32
sa_flags
;
void
*
sa_restorer
;
Sigset
sa_mask
;
};
typedef
struct
Timespec
Timespec
;
typedef
struct
Timespec
Timespec
;
struct
Timespec
{
struct
Timespec
{
...
@@ -120,11 +112,23 @@ struct Ucontext {
...
@@ -120,11 +112,23 @@ struct Ucontext {
Ucontext
*
uc_link
;
Ucontext
*
uc_link
;
Sigaltstack
uc_stack
;
Sigaltstack
uc_stack
;
Sigcontext
uc_mcontext
;
Sigcontext
uc_mcontext
;
Sigset
uc_sigmask
;
uint32
uc_sigmask
;
int32
__unused
[
3
0
];
int32
__unused
[
3
1
];
uint32
uc_regspace
[
128
];
uint32
uc_regspace
[
128
];
};
};
typedef
struct
Timeval
Timeval
;
struct
Timeval
{
int32
tv_sec
;
int32
tv_usec
;
};
typedef
struct
Itimerval
Itimerval
;
struct
Itimerval
{
Timeval
it_interval
;
Timeval
it_value
;
};
typedef
struct
Siginfo
Siginfo
;
typedef
struct
Siginfo
Siginfo
;
struct
Siginfo
{
struct
Siginfo
{
int32
si_signo
;
int32
si_signo
;
...
@@ -132,4 +136,12 @@ struct Siginfo {
...
@@ -132,4 +136,12 @@ struct Siginfo {
int32
si_code
;
int32
si_code
;
uint8
_sifields
[
4
];
uint8
_sifields
[
4
];
};
};
typedef
struct
Sigaction
Sigaction
;
struct
Sigaction
{
void
*
sa_handler
;
uint32
sa_flags
;
void
*
sa_restorer
;
uint32
sa_mask
;
};
#pragma pack off
#pragma pack off
src/pkg/runtime/linux/arm/signal.c
View file @
1f223463
...
@@ -135,7 +135,7 @@ sigaction(int32 i, void (*fn)(int32, Siginfo*, void*, G*), bool restart)
...
@@ -135,7 +135,7 @@ sigaction(int32 i, void (*fn)(int32, Siginfo*, void*, G*), bool restart)
sa
.
sa_flags
|=
SA_RESTART
;
sa
.
sa_flags
|=
SA_RESTART
;
sa
.
sa_mask
=
~
0ULL
;
sa
.
sa_mask
=
~
0ULL
;
sa
.
sa_restorer
=
(
void
*
)
runtime
·
sigreturn
;
sa
.
sa_restorer
=
(
void
*
)
runtime
·
sigreturn
;
sa
.
k_
sa_handler
=
fn
;
sa
.
sa_handler
=
fn
;
runtime
·
rt_sigaction
(
i
,
&
sa
,
nil
,
8
);
runtime
·
rt_sigaction
(
i
,
&
sa
,
nil
,
8
);
}
}
...
@@ -163,7 +163,6 @@ runtime·initsig(int32 queue)
...
@@ -163,7 +163,6 @@ runtime·initsig(int32 queue)
void
void
runtime
·
resetcpuprofiler
(
int32
hz
)
runtime
·
resetcpuprofiler
(
int32
hz
)
{
{
Sigaction
sa
;
Itimerval
it
;
Itimerval
it
;
runtime
·
memclr
((
byte
*
)
&
it
,
sizeof
it
);
runtime
·
memclr
((
byte
*
)
&
it
,
sizeof
it
);
...
...
src/pkg/runtime/linux/arm/sys.s
View file @
1f223463
...
@@ -73,10 +73,10 @@ TEXT runtime·munmap(SB),7,$0
...
@@ -73,10 +73,10 @@ TEXT runtime·munmap(SB),7,$0
SWI $0
SWI $0
RET
RET
TEXT runtime·
g
etitimer(SB),7,$0
TEXT runtime·
s
etitimer(SB),7,$0
MOVW 0(FP), R0
MOVW 0(FP), R0
MOVW 4(FP), R1
MOVW 4(FP), R1
MO
W
W 8(FP), R2
MO
V
W 8(FP), R2
MOVW $SYS_setitimer, R7
MOVW $SYS_setitimer, R7
SWI $0
SWI $0
RET
RET
...
...
src/pkg/runtime/linux/defs_arm.c
View file @
1f223463
...
@@ -4,16 +4,18 @@
...
@@ -4,16 +4,18 @@
/*
/*
* Input to godefs
* Input to godefs
godefs -carm-gcc -f -I/usr/local/google/src/linux-2.6.28/arch/arm/include -f -I/usr/local/google/src/linux-2.6.28/include -f-D__KERNEL__ -f-D__ARCH_SI_UID_T=int defs_arm.c >arm/defs.h
* On a Debian Lenny arm linux distribution:
godefs -f-I/usr/src/linux-headers-2.6.26-2-versatile/include defs_arm.c
* Another input file for ARM defs.h
*/
*/
#define __ARCH_SI_UID_T int
#include <asm/signal.h>
#include <asm/signal.h>
#include <asm/mman.h>
#include <asm/mman.h>
#include <asm/sigcontext.h>
#include <asm/sigcontext.h>
#include <asm/ucontext.h>
#include <asm/ucontext.h>
#include <asm/siginfo.h>
#include <asm/siginfo.h>
#include <linux/time.h>
/*
/*
#include <sys/signal.h>
#include <sys/signal.h>
...
@@ -21,8 +23,6 @@
...
@@ -21,8 +23,6 @@
#include <ucontext.h>
#include <ucontext.h>
*/
*/
#include <time.h>
enum
{
enum
{
$
PROT_NONE
=
PROT_NONE
,
$
PROT_NONE
=
PROT_NONE
,
$
PROT_READ
=
PROT_READ
,
$
PROT_READ
=
PROT_READ
,
...
@@ -84,14 +84,19 @@ enum {
...
@@ -84,14 +84,19 @@ enum {
$
SEGV_MAPERR
=
SEGV_MAPERR
&
0xFFFF
,
$
SEGV_MAPERR
=
SEGV_MAPERR
&
0xFFFF
,
$
SEGV_ACCERR
=
SEGV_ACCERR
&
0xFFFF
,
$
SEGV_ACCERR
=
SEGV_ACCERR
&
0xFFFF
,
$
ITIMER_REAL
=
ITIMER_REAL
,
$
ITIMER_PROF
=
ITIMER_PROF
,
$
ITIMER_VIRTUAL
=
ITIMER_VIRTUAL
,
};
};
typedef
sigset_t
$
Sigset
;
typedef
sigset_t
$
Sigset
;
typedef
struct
sigaction
$
Sigaction
;
typedef
struct
timespec
$
Timespec
;
typedef
struct
timespec
$
Timespec
;
typedef
struct
sigaltstack
$
Sigaltstack
;
typedef
struct
sigaltstack
$
Sigaltstack
;
typedef
struct
sigcontext
$
Sigcontext
;
typedef
struct
sigcontext
$
Sigcontext
;
typedef
struct
ucontext
$
Ucontext
;
typedef
struct
ucontext
$
Ucontext
;
typedef
struct
timeval
$
Timeval
;
typedef
struct
itimerval
$
Itimerval
;
struct
xsiginfo
{
struct
xsiginfo
{
int
si_signo
;
int
si_signo
;
...
@@ -101,3 +106,17 @@ struct xsiginfo {
...
@@ -101,3 +106,17 @@ struct xsiginfo {
};
};
typedef
struct
xsiginfo
$
Siginfo
;
typedef
struct
xsiginfo
$
Siginfo
;
#undef sa_handler
#undef sa_flags
#undef sa_restorer
#undef sa_mask
struct
xsigaction
{
void
(
*
sa_handler
)(
void
);
unsigned
long
sa_flags
;
void
(
*
sa_restorer
)(
void
);
unsigned
int
sa_mask
;
/* mask last for extensibility */
};
typedef
struct
xsigaction
$
Sigaction
;
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