]> xenbits.xensource.com Git - unikraft/libs/libgo.git/log
unikraft/libs/libgo.git
5 years agoRemove runtime/go-nosys.c from build
Simon Kuenzer [Fri, 7 Feb 2020 14:36:36 +0000 (15:36 +0100)]
Remove runtime/go-nosys.c from build

Removes runtime/go-nosys.c because it causes multiple symbol
definitions. Missing symbols that were covered by this file are added
as stub to glue.c.

Signed-off-by: Simon Kuenzer <simon.kuenzer@neclab.eu>
Reviewed-by: Felipe Huici <felipe.huici@neclab.eu>
5 years agoRemove stubs causing duplicated symbols errors
Simon Kuenzer [Fri, 7 Feb 2020 14:36:35 +0000 (15:36 +0100)]
Remove stubs causing duplicated symbols errors

Recent Unikraft and libc provide symbols for those stubs.

Signed-off-by: Simon Kuenzer <simon.kuenzer@neclab.eu>
Reviewed-by: Felipe Huici <felipe.huici@neclab.eu>
5 years agoUpdate dependency to lib/posix-sysinfo
Simon Kuenzer [Fri, 7 Feb 2020 14:36:34 +0000 (15:36 +0100)]
Update dependency to lib/posix-sysinfo

Within the Unikraft repository, UKSYSINFO got renamed to LIBPOSIX_SYSINFO.

Signed-off-by: Simon Kuenzer <simon.kuenzer@neclab.eu>
Reviewed-by: Felipe Huici <felipe.huici@neclab.eu>
5 years agoUse uk_posix_memalign() for stack allocation
Simon Kuenzer [Fri, 7 Feb 2020 14:36:33 +0000 (15:36 +0100)]
Use uk_posix_memalign() for stack allocation

Recent changes in Unikraft modified uk_palloc()'s signature and
guarantees: allocation sizes are given with the number of pages and
the returned memory is not necessarily aligned to the size.
By using uk_posix_memalign() we restore our assumptions in the code.

Signed-off-by: Simon Kuenzer <simon.kuenzer@neclab.eu>
Reviewed-by: Felipe Huici <felipe.huici@neclab.eu>
5 years agoConfig.uk: Use LIBPOSIX_USER instead of UKUNISTD
Costin Lupu [Thu, 17 Oct 2019 15:19:24 +0000 (18:19 +0300)]
Config.uk: Use LIBPOSIX_USER instead of UKUNISTD

Signed-off-by: Costin Lupu <costin.lupu@cs.pub.ro>
Reviewed-by: Felipe Huici <felipe.huici@neclab.eu>
5 years agoglue.c: Include <signal.h> for signal-related functions
Costin Lupu [Tue, 15 Oct 2019 17:34:41 +0000 (20:34 +0300)]
glue.c: Include <signal.h> for signal-related functions

Signed-off-by: Costin Lupu <costin.lupu@cs.pub.ro>
Reviewed-by: Felipe Huici <felipe.huici@neclab.eu>
5 years agoAdding extra information
Charalampos Mainas [Thu, 26 Sep 2019 15:32:48 +0000 (17:32 +0200)]
Adding extra information

Signed-off-by: Charalampos Mainas <Charalampos.Mainas@neclab.eu>
Reviewed-by: Felipe Huici <felipe.huici@neclab.eu>
5 years agoAdd glue code and stubs
Charalampos Mainas [Thu, 26 Sep 2019 15:32:47 +0000 (17:32 +0200)]
Add glue code and stubs

Signed-off-by: Charalampos Mainas <Charalampos.Mainas@neclab.eu>
Reviewed-by: Felipe Huici <felipe.huici@neclab.eu>
5 years agoUse semaphores instead of futexes
Charalampos Mainas [Thu, 26 Sep 2019 15:31:36 +0000 (17:31 +0200)]
Use semaphores instead of futexes

Go uses futexes for locking in linux but they are not implemented in
Unikraft. As a result we need to switch to semaphores.

Signed-off-by: Charalampos Mainas <Charalampos.Mainas@neclab.eu>
Reviewed-by: Felipe Huici <felipe.huici@neclab.eu>
5 years agoUpdate packages.uk
Charalampos Mainas [Thu, 26 Sep 2019 15:31:35 +0000 (17:31 +0200)]
Update packages.uk

Use *regfile.go instead of *largefile.go to avoid usage of
*64 (open64 etc) functions.

Signed-off-by: Charalampos Mainas <Charalampos.Mainas@neclab.eu>
Reviewed-by: Felipe Huici <felipe.huici@neclab.eu>
5 years agoUpdate libcalls.go
Charalampos Mainas [Thu, 26 Sep 2019 15:31:34 +0000 (17:31 +0200)]
Update libcalls.go

Update libcalls.go to decrease the number of stubs needed. This patch
removes wrappers for system calls that are not used from libgo and
that are not yet implemented on Unikraft.

Signed-off-by: Charalampos Mainas <Charalampos.Mainas@neclab.eu>
Reviewed-by: Felipe Huici <felipe.huici@neclab.eu>
5 years agoUpdate config.h
Charalampos Mainas [Thu, 26 Sep 2019 15:31:33 +0000 (17:31 +0200)]
Update config.h

Update config.h to decrease the number of stubs needed.

Signed-off-by: Charalampos Mainas <Charalampos.Mainas@neclab.eu>
Reviewed-by: Felipe Huici <felipe.huici@neclab.eu>
5 years agoAdd patches to enable runtime
Charalampos Mainas [Thu, 26 Sep 2019 15:31:32 +0000 (17:31 +0200)]
Add patches to enable runtime

libgo uses backtracking but it leads to page faults. For the time being
it is disabled but it should be revisited in the future.

The second patch decreases the amount of memory maps because it was
exceeding 1G.

Finally, Go uses context switching to manage goroutines. This patch
adds some changes to the way contexts are handled so they can be
compatible with threading in Unikraft.

Signed-off-by: Charalampos Mainas <Charalampos.Mainas@neclab.eu>
Reviewed-by: Felipe Huici <felipe.huici@neclab.eu>
5 years agoAdd patches to build the library
Costin Lupu [Thu, 26 Sep 2019 15:31:31 +0000 (17:31 +0200)]
Add patches to build the library

libgo expects the unwind.h header although it comes with its own
header, unwind-generic.h, so we will be using that one instead. The
second patch removes an unnecessary include directive.

Signed-off-by: Costin Lupu <costin.lupu@cs.pub.ro>
Reviewed-by: Felipe Huici <felipe.huici@neclab.eu>
5 years agoAdd rules for building runtime Go packages
Costin Lupu [Thu, 26 Sep 2019 15:31:30 +0000 (17:31 +0200)]
Add rules for building runtime Go packages

The file packages.uk file was generated by capturing the building
commands from the output of the original libgo build. This patch also
adds the generated .go files needed for building the packages.

Signed-off-by: Costin Lupu <costin.lupu@cs.pub.ro>
Reviewed-by: Felipe Huici <felipe.huici@neclab.eu>
5 years agoAdd Makefile.uk
Charalampos Mainas [Thu, 26 Sep 2019 15:31:29 +0000 (17:31 +0200)]
Add Makefile.uk

This patch also adds the generated config.h and runtime.inc headers.

Signed-off-by: Charalampos Mainas <Charalampos.Mainas@neclab.eu>
Signed-off-by: Costin Lupu <costin.lupu@cs.pub.ro>
Reviewed-by: Felipe Huici <felipe.huici@neclab.eu>
5 years agoIntroduce library skeleton
Charalampos Mainas [Thu, 26 Sep 2019 15:31:28 +0000 (17:31 +0200)]
Introduce library skeleton

We use the BSD-3-Clause license for this library glue code.

Signed-off-by: Charalampos Mainas <Charalampos.Mainas@neclab.eu>
Signed-off-by: Costin Lupu <costin.lupu@cs.pub.ro>
Reviewed-by: Felipe Huici <felipe.huici@neclab.eu>
5 years agoInitial commit (empty)
Felipe Huici [Tue, 24 Sep 2019 13:32:48 +0000 (15:32 +0200)]
Initial commit (empty)