[llvm-readobj] Implement --dependent-libraries for GNU output
authorJames Henderson <james.henderson@sony.com>
Thu, 14 May 2020 12:48:13 +0000 (13:48 +0100)
committerJames Henderson <james.henderson@sony.com>
Fri, 15 May 2020 14:11:22 +0000 (15:11 +0100)
commitf06e6564a1554338ca00a4b9c3acdcffa212c743
tree3ea8109fe112c18fa969a7ba86d16792f589b25e
parent151ed6aa38a3ec6c01973b35f684586b6e1c0f7e
[llvm-readobj] Implement --dependent-libraries for GNU output

Previously, the option was only implemented for LLVM output. This fixes
https://bugs.llvm.org/show_bug.cgi?id=45695.

At the current time, GNU readelf does not support this option.
Consequently, this patch simply attempts to roughly follow the output
style for similar options like --syms/--notes etc, combined with
--string-dump output.

Reviewed by: MaskRay, grimar

Differential Revision: https://reviews.llvm.org/D79939
llvm/test/tools/llvm-readobj/ELF/dependent-libraries.test
llvm/tools/llvm-readobj/ELFDumper.cpp