[PATCH] D48929: [ELF] Update addends in non-allocatable sections for REL targets when creating a relocatable output.

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 18 21:19:38 PDT 2023


MaskRay added a comment.
Herald added a project: All.

Note that the interaction with `--compress-debug-sections={zlib,zstd}` is not handled in this patch. For relocatable linking of `.rel.debug_*` sections, the implicit addends are not applied to the output.
I am trying to figure out a solution.

  Writer<ELFT>::run
    maybeCompress
      OutputSection::writeTo
        InputSection::writeTo
          relocate  # relocations is empty
    writeSections
      OutputSection::writeTo
        InputSection::writeTo
          if SHT_REL copyRelocations
            addReloc R_ABS
          elif non-compress relocate
            relocateNonAllocForRelocatable handle R_ABS


Repository:
  rLLD LLVM Linker

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

https://reviews.llvm.org/D48929



More information about the llvm-commits mailing list