]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
glibc: add task to list exported symbols
authorRoss Burton <ross.burton@arm.com>
Tue, 9 Jul 2024 16:51:04 +0000 (17:51 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 16 Jul 2024 10:56:47 +0000 (11:56 +0100)
When upgrading glibc it's important to know if there are any new symbols
that pseudo needs to wrap. In the future a generalised ABI comparison tool
would be good, but to solve the immediate need we can simply list the
exported symbols to files in WORKDIR.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-core/glibc/glibc_2.39.bb

index 2484ae1cd9973c648c5e7e9144a63ac14fedcae7..411d226ef60672da3c0ef70cf8b5bcdd0e3e5d78 100644 (file)
@@ -128,4 +128,15 @@ do_compile () {
 
 require glibc-package.inc
 
+# When upgrading glibc it's important to know if there are any new symbols
+# that pseudo needs to wrap. In the future a generalised ABI comparison tool
+# would be good, but to solve the immediate need we can simply list the
+# exported symbols to files in WORKDIR.
+do_symlist() {
+    for LIB in ${D}${base_libdir}/lib*.so.*; do
+        ${NM} --dynamic $LIB | awk --source '$2 == "T" { print $3 }' | sort > ${WORKDIR}/$(basename $LIB)-${PV}.symbols
+    done
+}
+addtask symlist after do_install
+
 BBCLASSEXTEND = "nativesdk"