[PATCH] D84825: [ELF] Change tombstone value -1 to 0
Alexey Lapshin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 6 01:47:11 PDT 2020
avl added a comment.
> However, we can use ANY other single value (1, 2, 123456, -2 etc) except -1 which also has a special meaning, because semantically, those values all result in an empty range (-2, -2)/(1, 1) etc. There is no need for special handling within consumers for any given value in this case (or at least there shouldn't be), and thus the specific BFD-identical value for .debug_ranges shouldn't matter.
It looks like there still exist a small difference with using -2 and 1 for thombstone value for debug_ranges. When base address selection entry is specified using -2 as thomstone value
{-1, -2} <<< base address selection entry
{0, length} <<< address range
the -2 value would case overflow and there would be situation when LowPC is greater than HighPC. This would not happen for 1 value. That overflow situation could affect customers who did not have it before. From that point of view using 1(BFD-identical) as thombstone value looks safer.
{-1, 1} <<< base address selection entry
{0, length} <<< address range
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D84825/new/
https://reviews.llvm.org/D84825
More information about the llvm-commits
mailing list