[PATCH] D86860: [DWARFYAML] Make the debug_str section optional.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 31 04:43:13 PDT 2020


grimar added inline comments.


================
Comment at: llvm/test/tools/yaml2obj/ELF/DWARF/debug-str.yaml:221
+# RUN: yaml2obj --docnum=10 %s -o %t10.o
+# RUN: llvm-readelf -S %t10.o | FileCheck -DSIZE=000000 %s --check-prefix=SHDRS-DEFAULT
+
----------------
It is a bit strange to see that the `.debug_str` section emitted has zero size?
I believe that ELF string tables are expected to have at least one null byte
(https://refspecs.linuxbase.org/elf/gabi4+/ch4.strtab.html)

With that we have an empty string at the offset 0 and a valid null-terminated string table.

It is probably unrelated to this patch though.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D86860



More information about the llvm-commits mailing list