[PATCH] D81784: [ELF] Resolve relocations in .debug_* referencing (discarded symbols or ICF folded section symbols) to tombstone values

Peter Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 16 12:39:52 PDT 2020


psmith added a comment.

I only partially followed the discussion on llvm-dev. The resolution sounds sensible to me. Will be good to get someone involved in the upstream discussion to check it over.

Not related to this patch:
FWIW Arm's proprietary linker has a relatively simple garbage collection algorithm for debug sections. Debug sections were partitioned into two sets, the first set contained relocations to non-debug sections, the second set did not but were reachable via relocations from the first set. After gc of non-debug sections, the members of the first set were marked live if any of the non-debug sections they referenced were marked live. We'd then traverse the relocations from the live members of set 1 to find the live members of set 2. This worked well for Arm's proprietary compiler as it put quite a lot of effort into generating separating out debug sections per functions. It wasn't perfect and there were .debug_info sections that referenced multiple independent .text sections, but did permit quite a lot of debug to be removed without having to parse the dwarf.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D81784





More information about the llvm-commits mailing list