/[gentoo-projects]/pax-utils/symtree.sh
Gentoo

Diff of /pax-utils/symtree.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.1 Revision 1.2
18} 18}
19 19
20sym_list() { 20sym_list() {
21 # with large strings, bash is much slower than sed 21 # with large strings, bash is much slower than sed
22 local type=$1; shift 22 local type=$1; shift
23 echo "%%~"`echo ",$@" | sed "s:,:,%${type}%:g"` 23 echo "%${type}%$@" | sed "s:,:,%${type}%:g"
24} 24}
25show_elf() { 25show_elf() {
26 local elf=$1 26 local elf=$1
27 local rlib lib libs 27 local rlib lib libs
28 local resolved=$(find_elf "${elf}") 28 local resolved=$(find_elf "${elf}")
30 printf "%s\n" "${resolved}" 30 printf "%s\n" "${resolved}"
31 31
32 libs=$(scanelf -qF '#F%n' "${resolved}") 32 libs=$(scanelf -qF '#F%n' "${resolved}")
33 33
34 local u uu d dd 34 local u uu d dd
35 u=$(scanelf -q -F'#s#F' -s'%u%' "${elf}") 35 u=$(scanelf -q -F'%s#F' -s'%u%' "${elf}")
36 for lib in ${libs//,/ } ; do 36 for lib in ${libs//,/ } ; do
37 lib=${lib##*/} 37 lib=${lib##*/}
38 rlib=$(find_elf "${lib}" "${resolved}") 38 rlib=$(find_elf "${lib}" "${resolved}")
39 39
40 d=$(scanelf -qF'%s#F' -s`sym_list d "${u}"` "${rlib}") 40 d=$(scanelf -qF'%s#F' -s`sym_list d "${u}"` "${rlib}")

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.20