]> xenbits.xensource.com Git - unikraft/libs/libgo.git/log
unikraft/libs/libgo.git
3 years agoAdd GO build rules
Vlad-Andrei Badoiu [Thu, 29 Jul 2021 12:33:40 +0000 (15:33 +0300)]
Add GO build rules

Our recent patch moves the GO build rules outside the main Unikraft
repo.

Signed-off-by: Vlad-Andrei Badoiu <vlad_andrei.badoiu@upb.ro>
Reviewed-by: Simon skuenzer <simon.kuenzer@neclab.eu>
Approved-by: Razvan Deaconescu <razvan.deaconescu@cs.pub.ro>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Pull-Request: #2

3 years agoRemove madvise stub from `glue.c`
Razvan Virtan [Wed, 8 Sep 2021 09:31:32 +0000 (12:31 +0300)]
Remove madvise stub from `glue.c`

Recent unikraft version provides the symbol for the `madvise` syscall.
This commit removes the stub from the glue code, otherwise it will cause
a duplicate error during building.

Signed-off-by: Răzvan Vîrtan <virtanrazvan@gmail.com>
Reviewed-by: Razvan Deaconescu <razvan.deaconescu@cs.pub.ro>
Approved-by: Razvan Deaconescu <razvan.deaconescu@cs.pub.ro>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Pull-Request: #3

3 years agoRemove real time signals references
Razvan Virtan [Mon, 4 Oct 2021 17:21:19 +0000 (20:21 +0300)]
Remove real time signals references

At this moment uksignal doesn't support real time
signals (signal codes greater than 31). However, the Go runtime
assumes that it does and it tries to init signals up to SIGRTMAX,
causing any go application to fail. This commit avoids this situation.
These changes should be removed when real time signals support will
be added to uksignal.

Signed-off-by: Răzvan Vîrtan <virtanrazvan@gmail.com>
Reviewed-by: Razvan Deaconescu <razvan.deaconescu@cs.pub.ro>
Approved-by: Razvan Deaconescu <razvan.deaconescu@cs.pub.ro>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Pull-Request: #4

3 years agoRemove signal related stubs from glue.c
Razvan Virtan [Mon, 4 Oct 2021 16:33:46 +0000 (19:33 +0300)]
Remove signal related stubs from glue.c

4 signal related functions are now provided trough uksignal.
Remove the stubs from glue.c to avoid linking errors.

Signed-off-by: Răzvan Vîrtan <virtanrazvan@gmail.com>
Reviewed-by: Razvan Deaconescu <razvan.deaconescu@cs.pub.ro>
Approved-by: Razvan Deaconescu <razvan.deaconescu@cs.pub.ro>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Pull-Request: #4

5 years agoInclude additional header files and add supress flags for cleaner build. RELEASE-0.4 RELEASE-0.5
Felipe Huici [Thu, 13 Feb 2020 20:47:32 +0000 (21:47 +0100)]
Include additional header files and add supress flags for cleaner build.

Signed-off-by: Felipe Huici <felipe.huici@neclab.eu>
Reviewed-by: Simon Kuenzer <simon.kuenzer@neclab.eu>
5 years agoFix error handling with uk_posix_memalign()
Simon Kuenzer [Sat, 8 Feb 2020 10:47:14 +0000 (11:47 +0100)]
Fix error handling with uk_posix_memalign()

In the cases of failed allocation, `uk_posix_memalign()` is returning
an errno number but does not change `memptr`. Instead of checking
`memptr` being NULL, we test failures with `uk_posix_memalign()`'s
return codes.

Signed-off-by: Simon Kuenzer <simon.kuenzer@neclab.eu>
Reviewed-by: Felipe Huici <felipe.huici@neclab.eu>
5 years agoREADME: Update library order
Simon Kuenzer [Fri, 7 Feb 2020 14:36:37 +0000 (15:36 +0100)]
README: Update library order

Update the library order so that libgo compiles.

Signed-off-by: Simon Kuenzer <simon.kuenzer@neclab.eu>
Reviewed-by: Felipe Huici <felipe.huici@neclab.eu>
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)