[PATCH] D87764: [llvm-readelf/obj] - Stop printing invalid names for unnamed section symbols.

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 17 01:47:04 PDT 2020


jhenderson added inline comments.


================
Comment at: llvm/test/tools/llvm-readobj/ELF/dyn-symbols.test:344-346
+# VERSIONED-SEC-SYM-LLVM: warning: '[[FILE]]': invalid section index: 65521
 #      VERSIONED-SEC-SYM-LLVM:  Name:
+# VERSIONED-SEC-SYM-LLVM-SAME:        <section 65521> (0)
----------------
Am I right in thinking these warnings are coming out because SHN_ABS isn't a valid section index? That doesn't seem right to me - a st_shndx of SHN_ABS is perfectly normal. You just wouldn't normally have a section symbol to them. What happens if there are many sections and section index 65521 is actually a valid section?

I'd be inclined to produce a warning saying "section symbols shouldn't be absolute" (or whatever), and then print `<?>`, in this case.


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

https://reviews.llvm.org/D87764



More information about the llvm-commits mailing list