[PATCH] D67998: [llvm-readobj/llvm-readelf]: Dump stack-size entry for all function symbols that have a particular value (fixes PR43245)

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 25 01:55:16 PDT 2019


jhenderson added a comment.

One issue that just occurred to me, is what happens if you still have the stack size entry in this case? Something like:

  <snip>
  Sections:
    - Name: .stack_sizes
      Type: SHT_PROGBITS
      Entries:
        - Address: 0x10
          Size: 32
        - Address: 0x10
          Size: 32
  Symbols:
    - Name: foo
      Type: STT_FUNC
      Value: 0x10
    - Name: baz
      Type: STT_FUNC
      Value: 0x10

I might be missing something in the code, but I think your change will result in the stack size entries effectively being printed twice per symbol:

  # Printing for first entry:
  32 foo
  32 baz
  # Printing for second entry:
  32 foo
  32 baz

I think this is undesirable. Perhaps you need to track whether a stack size entry for a given address has been printed yet, and skip it if it has?


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

https://reviews.llvm.org/D67998





More information about the llvm-commits mailing list