Skip to content

xen: beginnings of moving library-like code into an archive

Jan Beulich xen-devel 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest8 patches 22 repliesIn review
  2. v28 patches 26 repliesSuperseded
  3. v19 patches 15 repliesSuperseded

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8xen: fix build when $(obj-y) consists of just blanksxen/Rules.mk+5 -54 replies
2/8lib: collect library files in an archivexen/Rules.mk xen/arch/arm/Makefile xen/arch/x86/Makefile +1 more+34 -128 replies
3/8lib: move list sorting codexen/arch/arm/Kconfig xen/common/Kconfig xen/common/Makefile +2 more+2 -91 reply
4/8lib: move parse_size_and_unit()xen/common/lib.c xen/lib/Makefile xen/lib/parse-size.c+51 -391 reply
5/8lib: move init_constructors()xen/common/lib.c xen/lib/Makefile xen/lib/ctors.c+26 -141 reply
6/8lib: move rbtree codexen/common/Makefile xen/lib/Makefile xen/lib/rbtree.c+2 -91 reply
7/8lib: move bsearch codexen/common/Makefile xen/common/bsearch.c xen/include/xen/compiler.h +3 more+56 -530 replies
8/8lib: move sort codexen/common/Makefile xen/lib/Makefile xen/lib/sort.c+1 -11 reply

Reviews trailers per patch

7 of 8 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchJulien GrallWei LiuBertrand MarquisAnthony PERARD
SeriesA-b
1/8R-b R-b
2/8A-b R-b R-b
3/8R-b
4/8A-b R-b
5/8R-b
6/8R-b
7/8
8/8A-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v3 thread

Cover letter [PATCH v3 0/8] xen: beginnings of moving library-like code into an archive

In a few cases we link in library-like functions when they're not actually needed. While we could use Kconfig options for each one of them, I think the better approach for such generic code is to build it always (thus making sure a build issue can't be introduced for these in any however exotic configuration) and then put it into an archive, for the linker to pick up as needed. The series here presents a first few tiny steps towards such a goal.

Note that we can't use thin archives yet, due to our tool chain (binutils) baseline being too low.

Further almost immediate steps I'd like to take if the approach meets no opposition are
- split and move the rest of common/lib.c,
- split and move common/string.c, dropping the need for all the __HAVE_ARCH_* (implying possible per-arch archives then need to be specified ahead of lib/lib.a on the linker command lines),
- move common/libelf/ and common/libfdt/.

v3 has a new 1st patch and some review feedback addressed. See individual patches.

1: xen: fix build when $(obj-y) consists of just blanks 2: lib: collect library files in an archive
3: lib: move list sorting code
4: lib: move parse_size_and_unit()
5: lib: move init_constructors()
6: lib: move rbtree code
7: lib: move bsearch code
8: lib: move sort code

Jan