Stop using static variables for keeping track of symbol indices.
Bugfix for: https://bugs.llvm.org/show_bug.cgi?id=46777
Differential D84606
[llvm-readelf] Symbol index in symbol table printing is not reset mikkqu on Jul 26 2020, 1:53 PM. Authored by
Details Stop using static variables for keeping track of symbol indices. Bugfix for: https://bugs.llvm.org/show_bug.cgi?id=46777
Diff Detail Event TimelineComment Actions Wow, yeah, static variables are wildly inappopriate for that. That said, I'm not familiar with the code, so someone else should review. Comment Actions Generally looks good. A few comments inlined.
Comment Actions Changes on comments from @grimar:
Comment Actions Thanks, this change looks good to me too. Do you need @grimar or I to commit it for you? P.S, you can mark inline comments as "Done" by selecting the appropriate option for them. If you do this before uploading a new diff, it will submit that "Mark as Done" automatically, and it will be easier to see what changes you intended to address with your patch. Comment Actions I can commit it, but I need to know a name and email you'd like to use as author. E.g: --author "Name Surname <test@gmail.com>" |
You probably do not need a new YAML anymore. You can just reuse the %t64, used in cases 1-5:
llvm-readelf --symbols %t64 %t64