[PATCH] D63084: [llvm-readobj] Don't abort printing of dynamic table if string reference is invalid
Yuanfang Chen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 11 13:42:59 PDT 2019
ychen added inline comments.
================
Comment at: llvm/test/tools/llvm-readobj/elf-dynamic-malformed.test:157
+# RUN: llvm-readelf --dynamic-table --needed-libs %t.bad-strtab | FileCheck %s --check-prefixes=BAD-STRTAB,BAD-STRTAB-GNU
+# BAD-STRTAB-LLVM: LoadName: <not found>
+# BAD-STRTAB-LLVM: 0x0000000000000001 NEEDED Shared library: [dynamic strtab not found]
----------------
jhenderson wrote:
> grimar wrote:
> > `<not found>` is inconsistent with `library name not found` below.
> > Should both use `<..>`?
> As we might change the below output based on GNU, let's make it consistent with that style, if it makes sense. If GNU doesn't print with any markers, then I'm happy with either style, but consistency would be good.
done.
================
Comment at: llvm/test/tools/llvm-readobj/elf-dynamic-malformed.test:162
+# BAD-STRTAB: ]
+# BAD-STRTAB-GNU: 0x0000000000000001 (NEEDED) Shared library: [dynamic strtab not found]
----------------
jhenderson wrote:
> grimar wrote:
> > Perhaps it should use different forms too?
> >
> > `Shared library: [valid_library_name.so]`
> > `Shared library: <dynamic strtab not found>`
> >
> What does GNU's output look like? If it produces an inline message here, we should probably mirror that, thinking about it.
GNU only print the index
0x0000000000000001 (NEEDED) 0x1
================
Comment at: llvm/test/tools/llvm-readobj/elf-dynamic-malformed.test:162
+# BAD-STRTAB: ]
+# BAD-STRTAB-GNU: 0x0000000000000001 (NEEDED) Shared library: [dynamic strtab not found]
----------------
ychen wrote:
> jhenderson wrote:
> > grimar wrote:
> > > Perhaps it should use different forms too?
> > >
> > > `Shared library: [valid_library_name.so]`
> > > `Shared library: <dynamic strtab not found>`
> > >
> > What does GNU's output look like? If it produces an inline message here, we should probably mirror that, thinking about it.
> GNU only print the index
> 0x0000000000000001 (NEEDED) 0x1
Agree.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D63084/new/
https://reviews.llvm.org/D63084
More information about the llvm-commits
mailing list