[bootlin/training-materials updates] master: C libraries: update comparisons of sizes (a2fac8cd)
Michael Opdenacker
michael.opdenacker at bootlin.com
Tue Feb 23 23:17:15 CET 2021
Repository : https://github.com/bootlin/training-materials
On branch : master
Link : https://github.com/bootlin/training-materials/commit/a2fac8cd4d46ca750c14f87537218c34d9db9cde
>---------------------------------------------------------------
commit a2fac8cd4d46ca750c14f87537218c34d9db9cde
Author: Michael Opdenacker <michael.opdenacker at bootlin.com>
Date: Tue Feb 23 23:17:15 2021 +0100
C libraries: update comparisons of sizes
Signed-off-by: Michael Opdenacker <michael.opdenacker at bootlin.com>
>---------------------------------------------------------------
a2fac8cd4d46ca750c14f87537218c34d9db9cde
slides/c-libraries/c-libraries.tex | 32 ++++++++++++++++++--------------
1 file changed, 18 insertions(+), 14 deletions(-)
diff --git a/slides/c-libraries/c-libraries.tex b/slides/c-libraries/c-libraries.tex
index 81fec1bd..9dca0ca6 100644
--- a/slides/c-libraries/c-libraries.tex
+++ b/slides/c-libraries/c-libraries.tex
@@ -75,27 +75,31 @@
Let's compile and strip a \code{hello.c} program {\bf statically} and
compare the size
\begin{itemize}
- \item With gcc 6.3, armel, musl 1.1.16:\\
- {\bf 7300} bytes
- \item With gcc 6.3, armel, uclibc-ng 1.0.22 :\\
- {\bf 67204} bytes.
- \item With gcc 6.2, armel, glibc:\\
- {\bf 492792} bytes
+ \item With musl 1.2.0:\\
+ {\bf 9,084} bytes
+ \item With uclibc-ng 1.0.34 :\\
+ {\bf 21,916} bytes.
+ \item With glibc 2.31:\\
+ {\bf 431,140} bytes
\end{itemize}
+ Tests run with \code{gcc 10.0.2} toolchains for \code{armv7-eabihf}\\
+ (from \url{https://toolchains.bootlin.com})
\end{frame}
-\begin{frame}{glibc vs uclibc vs musl (static)}
- Let's compile and strip BusyBox 1.26.2 {\bf statically} and compare the size
+\begin{frame}{glibc vs uclibc vs musl - more realistic example}
+ Let's compile and strip BusyBox 1.32.1 {\bf statically}\\
+ (with the \code{defconfig} configuration) and compare the size
\begin{itemize}
- \item With gcc 6.3, armel, musl 1.1.16:\\
- {\bf 183348} bytes
- \item With gcc 6.3, armel, uclibc-ng 1.0.22 :\\
- {\bf 210620} bytes.\\
- \item With gcc 6.2, armel, glibc:\\
- {\bf 755088} bytes
+ \item With musl 1.2.0:\\
+ {\bf 1,176,744} bytes
+ \item With uclibc-ng 1.0.34 :\\
+ {\bf 1,251,080} bytes.\\
+ \item With glibc 2.31:\\
+ {\bf 1,852,912} bytes
\end{itemize}
Notes:
\begin{itemize}
+ \item Tests run with \code{gcc 10.0.2} toolchains for \code{armv7-eabihf}
\item BusyBox is automatically compiled with \code{-Os} and stripped.
\item Compiling with shared libraries will mostly eliminate size differences
\end{itemize}
More information about the training-materials-updates
mailing list