]> xenbits.xensource.com Git - unikraft/libs/libgo.git/log
unikraft/libs/libgo.git
16 months agoMove x86 architecture-dependent files
Eduard Vintilă [Sun, 12 Nov 2023 12:43:30 +0000 (14:43 +0200)]
Move x86 architecture-dependent files

Signed-off-by: Eduard Vintilă <eduard.vintila47@gmail.com>
Reviewed-by: Stefan Jumarea <stefanjumarea02@gmail.com>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
GitHub-Closes: #9

16 months agoAdd goroutine context switch functions for ARM64
Eduard Vintilă [Sun, 12 Nov 2023 12:39:57 +0000 (14:39 +0200)]
Add goroutine context switch functions for ARM64

Signed-off-by: Eduard Vintilă <eduard.vintila47@gmail.com>
Reviewed-by: Stefan Jumarea <stefanjumarea02@gmail.com>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
GitHub-Closes: #9

18 months agoIntroduce `Library.uk` RELEASE-0.15.0
Alexander Jung [Tue, 11 Jul 2023 21:25:56 +0000 (21:25 +0000)]
Introduce `Library.uk`

This new file represents the first step towards proper versioning support of
external microlibrary in Unikraft.  The file itself acts as mechanism for
holding metadata-only values about the microlibrary.  This metadata is designed
to be compatible with GNU Make whilst simultaneously being human-readable and
readable by programs that are not GNU Make (e.g. tools such as KraftKit).

An important feature of this file is the inclusion of microlibrary versions.
In a later step, once relevant integrations have been made to Unikrat's core
build system and to relevant tools such as KraftKit, the user will be able to
see and select from different versions of the microlibrary.

In this initial commit, the relevant metadata is absorbed from both Makefile.uk,
Config.uk, but also includes new information such as SPDX License identifier.

Signed-off-by: Alexander Jung <alex@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
Reviewed-by: Razvan Deaconescu <razvand@unikraft.io>
GitHub-Closes: #6

20 months agoConfig.uk: Imply LIBUKMMAP / LIBPOSIX_MMAP
Razvan Deaconescu [Fri, 25 Aug 2023 15:39:49 +0000 (18:39 +0300)]
Config.uk: Imply LIBUKMMAP / LIBPOSIX_MMAP

Change `select LIBUKMMAP` to `imply LIBUKMMAP`. Do the same for `select
LIBPOSIX_MMAP`. This is because each may not be required for Go builds
(and use the other one instead).

With `select` in place you cannot disable the selection, resulting in a
dependency erorr when enabling the other one.

With `imply` as a soft select, any one can be disabled, removing the
dependency error.

Signed-off-by: Razvan Deaconescu <razvand@unikraft.io>
Reviewed-by: Stefan Jumarea <stefanjumarea02@gmail.com>
Approved-by: Marc Rittinghaus <marc.rittinghaus@unikraft.io>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #8

20 months agoREADME: Update documentation RELEASE-0.14.0
Eduard Vintilă [Sun, 6 Aug 2023 15:31:41 +0000 (18:31 +0300)]
README: Update documentation

Signed-off-by: Eduard Vintilă <eduard.vintila47@gmail.com>
Reviewed-by: Radu Nichita <radunichita99@gmail.com>
Reviewed-by: Stefan Jumarea <stefanjumarea02@gmail.com>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #7

20 months agoUpgrade to GO 1.18 and gccgo 12.1.0
Marc Rittinghaus [Tue, 5 Jul 2022 19:35:26 +0000 (21:35 +0200)]
Upgrade to GO 1.18 and gccgo 12.1.0

This commit upgrades the library version to 1.18 by using the upstream
GO runtime library provided by GCC12.
New Makefile rules are introduced to compartimentalize GO pacakge
bulding. Helper scripts are also added to assist with creation of such
Makefiles.
Glue code was also added to help with compatibility, and additional
headers from `libffi` and `libbacktrace` were also introduced.

Co-authored-by: Marc Rittinghaus <marc.rittinghaus@unikraft.io>
Co-authored-by: Eduard Vintilă <eduard.vintila47@gmail.com>
Signed-off-by: Marc Rittinghaus <marc.rittinghaus@unikraft.io>
Signed-off-by: Eduard Vintilă <eduard.vintila47@gmail.com>
Reviewed-by: Radu Nichita <radunichita99@gmail.com>
Reviewed-by: Stefan Jumarea <stefanjumarea02@gmail.com>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #7

3 years agoCorrect license headers introduced by NEC Laboratories Europe GmbH RELEASE-0.10.0 RELEASE-0.11.0 RELEASE-0.12.0 RELEASE-0.13.0 RELEASE-0.13.1 RELEASE-0.6 RELEASE-0.7.0 RELEASE-0.8.0 RELEASE-0.9.0
Simon Kuenzer [Tue, 13 Jul 2021 19:29:28 +0000 (21:29 +0200)]
Correct license headers introduced by NEC Laboratories Europe GmbH

This commit removes the additional clause
"THIS HEADER MAY NOT BE EXTRACTED OR MODIFIED IN ANY WAY"
from BSD license headers that got introduced by mistake
with the following commits:
 28fec31 - Add Makefile.uk (Charalampos Mainas)
 19a8056 - Add glue code and stubs (Charalampos Mainas)

On the one hand, this additional clause is redundant because
the BSD license already states that it must remain and the
copyright notice must be kept.
On the other hand, the clause freezes the file header
and prohibits future contributors from extending the
copyright notice for their contributions. This additional
clause is not part of the official BSD 3-clause.

The original author(s) or an authorized representative from
the author's affiliation consents to the change with a
`Reviewed-by` tag to this commit.

Signed-off-by: Simon Kuenzer <simon.kuenzer@neclab.eu>
Reviewed-by: Felipe Huici <felipe.huici@neclab.eu>
Approved-by: Razvan Deaconescu <razvan.deaconescu@cs.pub.ro>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Pull-Request: #1

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)