[all-commits] [llvm/llvm-project] cd6427: [lldb/ELF] Fix IDs of synthetic eh_frame symbols

Pavel Labath via All-commits all-commits at lists.llvm.org
Wed Apr 21 02:25:18 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: cd64273f5ed39ec697ff1e20a1fe25ebd3502629
      https://github.com/llvm/llvm-project/commit/cd64273f5ed39ec697ff1e20a1fe25ebd3502629
  Author: Pavel Labath <pavel at labath.sk>
  Date:   2021-04-21 (Wed, 21 Apr 2021)

  Changed paths:
    M lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
    A lldb/test/Shell/ObjectFile/ELF/eh_frame-symbols.yaml

  Log Message:
  -----------
  [lldb/ELF] Fix IDs of synthetic eh_frame symbols

The code used the total number of symbols to create a symbol ID for the
synthetic symbols. This is not correct because the IDs of real symbols
can be higher than their total number, as we do not add all symbols (and
in particular, we never add symbol zero, which is not a real symbol).

This meant we could have symbols with duplicate IDs, which caused
problems if some relocations were referring to the duplicated IDs. This
was the cause of the failure of the test D97786.

This patch fixes the code to use the ID of the highest (last) symbol
instead.




More information about the All-commits mailing list