This is needed by go c-shared libraries to setup
argc and argv correctly
Signed-off-by: Benoît Canet
---
core/app.cc| 4 +++-
core/elf.cc| 10 +-
include/osv/elf.hh | 5 +++--
3 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/core/app.cc b/core/app.cc
inde
Go use this on linux to lookup time. We need a shared
libary that we will expose to the go runtime by passing
it's pointer in order for go to resolve this kinds of
symbols.
This so will be reworked after next patch.
Signed-off-by: Benoît Canet
---
Makefile| 8 +++-
libc/vds
This patch prepare to pass argc and argv to the
elf loader so it can forward it to the init()
function of the elf object
Signed-off-by: Benoît Cnet
---
core/app.cc | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/core/app.cc b/core/app.cc
index 515096e..2cf3e42 100644
--- a/
This will allow go program to get the vdso library address.
Signed-off-by: Benoît Canet
---
core/app.cc| 29 ++---
include/osv/app.hh | 8 +++-
2 files changed, 33 insertions(+), 4 deletions(-)
diff --git a/core/app.cc b/core/app.cc
index 2c3257b..f2665fc 10
The go c-shared object need the libc to pass them
the argc and argv parameters in order to initialize
the runtime properly.
This is a preparation patch for this.
Signed-off-by: Benoît Canet
---
core/app.cc| 65 --
include/osv/app.hh |
This patch prepare to pass argc and argv to the
elf loader so it can forward it to the init()
function of the elf object
Signed-off-by: Benoît Cnet
---
core/app.cc | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/core/app.cc b/core/app.cc
index 515096e..2cf3e42 100644
--- a/
The go c-shared object need the libc to pass them
the argc and argv parameters in order to initialize
the runtime properly.
This is a preparation patch for this.
Signed-off-by: Benoît Canet
---
core/app.cc| 65 --
include/osv/app.hh |
This is needed by go c-shared libraries to setup
argc and argv correctly
Signed-off-by: Benoît Canet
---
core/app.cc| 4 +++-
core/elf.cc| 10 +-
include/osv/elf.hh | 5 +++--
3 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/core/app.cc b/core/app.cc
inde
The c-shared is intented to build C libraries hence it
does not export main and it's initialization does not
set the fs register with arch_prctl() leading to a crash.
Use -buildmode=shared -buildmode=pie to produce a library
which export main and is position independant while having
and init calli
Needed by libraries produced by the Go compiler.
With this patch and the golang app the runtime
init crash later because of a vdso issue.
It can be examinated by insertion an abort()
before osv send SIGSEGV to the program.
(gdb) bt
at /usr/lib/golang/src/runtime/mheap.go:503
argc=, argv=
The last signal of the list didn't have enough room for
him because signal numbers start at 1.
Make him some room so sigaction won't fail for him
when go lib execute.
Reviewed-by: Benoît Canet
---
libc/signal.hh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libc/signal.hh b
The last signal of the list didn't have enough room for
him because signal numbers start at 1.
Make him some room so sigaction won't fail for him
when go lib execute.
Reviewed-by: Benoît Canet
---
libc/signal.cc | 4 ++--
libc/signal.hh | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
d
This is the next syscall required by the go hello world
Signed-off-by: BenoÃt Canet
---
linux.cc | 6 ++
1 file changed, 6 insertions(+)
diff --git a/linux.cc b/linux.cc
index 08341f9..e78bb0c 100644
--- a/linux.cc
+++ b/linux.cc
@@ -292,6 +292,11 @@ int rt_sigaction(int sig, const struct k
This is one of the first syscall used by go binaries.
The kernel syscall have some custom layout that must
be convert forth and back to and from libc. Do it.
Signed-off-by: Benoît Canet
---
linux.cc | 29 +
1 file changed, 29 insertions(+)
diff --git a/linux.cc b/lin
This is one of the first syscall used by go binaries.
The kernel syscall have some custom layout that must
be convert forth and back to and from libc. Do it.
Signed-off-by: Benoît Canet
---
linux.cc | 29 +
1 file changed, 29 insertions(+)
diff --git a/linux.cc b/lin
From: Nadav Har'El
Not saving and restoring the rbp register causes tst-syscall to crash in
the debug build.
Refs #791.
Signed-off-by: Nadav Har'El
---
arch/x64/entry.S | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/x64/entry.S b/arch/x64/entry.S
index 0526aa7..c2417b8 100644
---
Just call gettid() with inline asm
and print the result.
Signed-off-by: Benoît Canet
---
tests/tst-syscall.cc | 13 +
1 file changed, 13 insertions(+)
diff --git a/tests/tst-syscall.cc b/tests/tst-syscall.cc
index 50074b5..96860d6 100644
--- a/tests/tst-syscall.cc
+++ b/tests/tst-sy
Just call gettid() with inline asm
and print the result.
Signed-off-by: Benoît Canet
---
modules/tests/Makefile | 3 ++-
tests/tst-gettid-syscall.cc | 17 +
2 files changed, 19 insertions(+), 1 deletion(-)
create mode 100644 tests/tst-gettid-syscall.cc
diff --git a/module
This C syscall example is just doing exit(42)
Signed-off-by: Benoît Canet
---
syscall/Makefile | 9 +
syscall/module.py| 3 +++
syscall/syscall.c| 16
syscall/usr.manifest | 1 +
4 files changed, 29 insertions(+)
create mode 100644 syscall/Makefile
creat
Enable "fast system calls" via the 'syscall' instruction on OSv. The
instruction is used by Go programs on Linux/x86-64 for system calls.
Signed-off-by: Pekka Enberg
Signed-off-by: Benoît Canet
---
arch/x64/arch-setup.cc | 25 +
arch/x64/entry.S | 96 ++
Enable "fast system calls" via the 'syscall' instruction on OSv. The
instruction is used by Go programs on Linux/x86-64 for system calls.
Signed-off-by: Pekka Enberg
Signed-off-by: Benoît Canet
---
arch/x64/arch-setup.cc | 25 ++
arch/x64/entry.S | 90 +
Enable "fast system calls" via the 'syscall' instruction on OSv. The
instruction is used by Go programs on Linux/x86-64 for system calls.
Signed-off-by: Pekka Enberg
Signed-off-by: Benoît Canet
---
arch/x64/arch-setup.cc | 25 ++
arch/x64/entry.S | 90 +
Enable "fast system calls" via the 'syscall' instruction on OSv. The
instruction is used by Go programs on Linux/x86-64 for system calls.
Signed-off-by: Pekka Enberg
Signed-off-by: Benoît Canet
---
arch/x64/arch-setup.cc | 25 +
arch/x64/entry.S | 51 ++
The commented one will require manual work.
Signed-off-by: Benoît Canet
---
linux.cc | 56
syscalls.h | 141 +
2 files changed, 180 insertions(+), 17 deletions(-)
create mode 100644 syscalls.h
diff --git a/
Enable "fast system calls" via the 'syscall' instruction on OSv. The
instruction is used by Go programs on Linux/x86-64 for system calls.
Signed-off-by: Pekka Enberg
Signed-off-by: Benoît Canet
---
arch/x64/arch-setup.cc | 12
arch/x64/entry.S | 20
arch/
This fix a bug in OSv musl that has been fixed in upstream musl
by using netlink. Since OSv does not implement netlink add
a function in if.cc in order to copy and interface mac address
given it's index then wrapp it in C in getifaddrs_wrapper.cc
since getifaddrs.c is not easilly portable to C++ an
Signed-of-by: BenoÃt Canet
---
bsd/porting/networking.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bsd/porting/networking.cc b/bsd/porting/networking.cc
index 1af0ecc..92a423f 100644
--- a/bsd/porting/networking.cc
+++ b/bsd/porting/networking.cc
@@ -135,7 +135,7 @@ int
GCC 6.1.1 on Fedora 24 requires this.
We should alway break on malloc returning NULL
in order to the NULL pointer not being inserted.
Signed-off-by: BenoÃt Canet
---
bsd/sys/netinet/tcp_lro.cc | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/bsd/sys/netinet/tcp_lro.cc b/
GCC 6.1.1 on Fedora 24 requires this.
Signed-off-by: BenoÃt Canet
---
bsd/porting/bus_dma.cc | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/bsd/porting/bus_dma.cc b/bsd/porting/bus_dma.cc
index e070182..087bc94 100644
--- a/bsd/porting/bus_dma.cc
+++ b/bsd/porting
GCC 6.1.1 on Fedora 24 requires this.
The hint on the brace position is the comment
above:
/*
* Grab the current time and record it so we know when the
* most recent congestion event was. Only record it when the
* timeout has fired more than once, as there is a reasonable
* chance the first o
30 matches
Mail list logo