From 58f8be580039b0575b197b9573a1c92745d96d30 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Tue, 17 Jan 2017 20:25:09 +0100 Subject: New upstream version 1.5.90 --- tools/create-exports-NetworkManager.sh | 117 +++++++++++++++++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100755 tools/create-exports-NetworkManager.sh (limited to 'tools/create-exports-NetworkManager.sh') diff --git a/tools/create-exports-NetworkManager.sh b/tools/create-exports-NetworkManager.sh new file mode 100755 index 00000000..3a4619a4 --- /dev/null +++ b/tools/create-exports-NetworkManager.sh @@ -0,0 +1,117 @@ +#!/bin/bash + +set -e + +die() { + echo "$@" + exit 1 +} + +# generates the linker version script src/NetworkManager.ver +# by looking at the symbols needed by the device and settings +# plugins. Note that this depends on how NetworkManager and +# the plugins are build. For example, compiling without +# --with-more-asserts will yield less symbols. +# +# _build re-builds NetworkManager with relevant compile time +# options to yield the most symbols. +_build() { + git clean -fdx + ./autogen.sh --enable-ld-gc --enable-ifcfg-rh --enable-ifupdown \ + --enable-ifnet --enable-ibft --enable-teamdctl --enable-wifi \ + --with-modem-manager-1 --with-ofono --with-more-asserts \ + --with-more-logging + make -j20 +} + +_sort() { + LANG=C sort -u +} + +call_nm() { + nm "$1" | + sed -n 's/.* \([^ ]\) \([^ ]*\)$/\1 \2/p' +} + +get_symbols_nm () { + call_nm ./src/.libs/libNetworkManager.a | + sed -n 's/^[tTDRB] //p' | + _sort +} + +get_symbols_explict() { + cat < ./src/NetworkManager.ver +} + +do_generate() { + cat <