[PATCH] D76081: [Object] object::ELFObjectFile::dynamic_symbol_begin(): skip symbol index 0
James Henderson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 30 00:30:05 PDT 2020
jhenderson added a comment.
In D76081#1949253 <https://reviews.llvm.org/D76081#1949253>, @jhenderson wrote:
> In D76081#1948391 <https://reviews.llvm.org/D76081#1948391>, @Higuoxing wrote:
>
> > Ahhhh, After enable `-DLLVM_ENABLE_ASSERTIONS=ON`,
> >
> > there's an error: `section [index 2] has an invalid sh_size (33) which is not a multiple of its sh_entsize (16)Stack dump`. But this error won't show up in a release build. I think we should at least warn user about this?
>
>
> Where abouts does this message come from?
Sorry, didn't see your comment earlier. I assume this is coming from the final test case? If so, that definitely should be a public diagnostic message if we can figure out a way of getting it to llvm-nm.
================
Comment at: llvm/test/tools/llvm-nm/dynamic.test:48
+
+## Test llvm-nm dumping ELF file with empty .dynsym section.
+# RUN: yaml2obj --docnum=3 %s -o %t3.o
----------------
with an empty
================
Comment at: llvm/test/tools/llvm-nm/dynamic.test:64
+
+## Test llvm-nm dumping ELF file with malformed .dynsym section header
+## whose sh_size isn't a multiple of the dynamic symbol size (sh_size % sizeof(Elf_Sym) != 0).
----------------
with a malformed
================
Comment at: llvm/test/tools/llvm-nm/dynamic.test:73
+# RUN: llvm-nm --dynamic %t4-64.o 2>&1 | \
+# RUN: FileCheck %s --match-full-lines --strict-whitespace -DFILE=%t4-64.o --check-prefix MALFORMED64
+
----------------
I don't think you need --strict-whitespace here. Without it you'll also be able to have only one check-prefix shared between the two cases.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D76081/new/
https://reviews.llvm.org/D76081
More information about the llvm-commits
mailing list