[PATCH] D74393: [llvm-readobj] Add support for decoding FreeBSD ELF notes

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 8 00:18:25 PST 2021


jhenderson added inline comments.


================
Comment at: llvm/test/tools/llvm-readobj/ELF/note-freebsd-core.test:73
+# LLVM-NEXT:   NoteSection {
+# LLVM-NEXT:     Name: <?>
+# LLVM-NEXT:     Offset: 0xB0
----------------
arichardson wrote:
> jhenderson wrote:
> > arichardson wrote:
> > > jhenderson wrote:
> > > > Why the `<?>` for the name? Sounds like something odd is going on if I follow it correctly (there are perfectly good section headers as far as I can see from yaml). If it's expected, add a comment explaining why.
> > > I don't understand why this is happening, but it also appears to affect other tests. Possibly a bug in yaml2obj? Unfortunately I don't have time to investigate this.
> > Is there anything on stderr? I'd expect a warning in this case. 
> No stderr, but it appears that the name is printed if I change it from ET_CORE to ET_DYN.
Ah, that makes sense. See the `StartNotes` lambda in the LLVM style printing of the notes data. It seems like we always print `Section: ` for LLVM, even when there's no section name to be had. I haven't looked, but I suspect section names are ignored in ET_CORE files, since they aren't really expected to have sections. I've filed https://bugs.llvm.org/show_bug.cgi?id=49088 to suggest not to print the `Section:` line in such situations.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D74393/new/

https://reviews.llvm.org/D74393



More information about the llvm-commits mailing list