File: dynamic_list.sh

package info (click to toggle)
libtraceevent 1%3A1.8.4-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,260 kB
  • sloc: ansic: 13,141; makefile: 667; sh: 85
file content (11 lines) | stat: -rwxr-xr-x 316 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
#!/bin/sh
# SPDX-License-Identifier: LGPL-2.1

symbol_type=$(nm -u -D $@ | awk 'NF>1 {print $1}' | xargs echo "U w W" |
              tr 'w ' 'W\n' | sort -u | xargs echo)

if [ "$symbol_type" = "U W" ]; then
    echo '{'
    nm -u -D $@ | awk 'NF>1 {sub("@.*", "", $2); print "\t"$2";"}' | sort -u
    echo '};'
fi