summaryrefslogtreecommitdiff
path: root/Completion/Unix/Command/_elfdump
diff options
context:
space:
mode:
authorAxel Beckert <abe@deuxchevaux.org>2015-05-05 23:32:59 +0200
committerAxel Beckert <abe@deuxchevaux.org>2015-05-05 23:58:59 +0200
commitdb38e167634b6c2217eec3a5aafc37c46d9e5a8d (patch)
treedaa342d423febbd3a5a7ef97053037677fab004a /Completion/Unix/Command/_elfdump
parent01eea47617a6e06debdb4330f92ae69f92089fd2 (diff)
parent3c3c8d3d13fd4cf6c03f81ca8dc18a1efd561728 (diff)
downloadzsh-db38e167634b6c2217eec3a5aafc37c46d9e5a8d.tar.gz
zsh-db38e167634b6c2217eec3a5aafc37c46d9e5a8d.zip
Merge branch 'upstream' into debian
Diffstat (limited to 'Completion/Unix/Command/_elfdump')
-rw-r--r--Completion/Unix/Command/_elfdump47
1 files changed, 47 insertions, 0 deletions
diff --git a/Completion/Unix/Command/_elfdump b/Completion/Unix/Command/_elfdump
new file mode 100644
index 000000000..ee92402d2
--- /dev/null
+++ b/Completion/Unix/Command/_elfdump
@@ -0,0 +1,47 @@
+#compdef elfdump
+
+local -a args
+
+_elf_file() {
+ [[ -x $REPLY || $REPLY = (core*|*.([ao]|so|elf)) ]]
+}
+
+args=(
+ '-c[dump section header information]'
+ '-d[dump .dynamic section]'
+ '-e[dump file header]'
+ '-G[dump .got (global offset table) section]'
+ '-h[dump .hash section]'
+ '-i[dump .interp (interpreter) section]'
+ '-n[dump .note sections]'
+ '(-w)-p[dump program headers]'
+ '-r[dump relocation sections]'
+ '-s[dump symbol table sections]'
+ '(-p)-w[write contents of matched sections to file]:file:_files'
+)
+
+case $OSTYPE in
+ solaris*)
+ args+=(
+ '-g[dump .group section]'
+ '-H[dump .SUNW_cap (capabilities) section]'
+ '-m[dump .SUNW_move section]'
+ '-S[dump symbol table sections sorted according to symbol sort sections]'
+ '-u[dump stack unwind/exceptions sections]'
+ '-v[dump .SUNW_version (versioning) sections]'
+ '-y[dump .SUNW_syminfo (symbol bindings) section]'
+ '-I[match sections by index]:index or range'
+ "-N[match sections by name]:section"
+ '-T[match sections by type]:type'
+ '-C[demangle C++ symbol names]'
+ '-k[calculate ELF checksum]'
+ '-l[show long section names without truncation]'
+ '-O[specify osabi to apply]:osabi'
+ '-P[use alternative section header]'
+ "*:elf file:_files -g '*(-.e:_elf_file:)'"
+ )
+ ;;
+ freebsd*) args+=( '-a[dump all information]' ) ;;
+esac
+
+_arguments -s $args