[all-commits] [llvm/llvm-project] ffecd7: [llvm-objcopy] Let --change-section-lma change seg...

Jonathon Penix via All-commits all-commits at lists.llvm.org
Thu Feb 27 13:45:26 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ffecd7247921512255ce4ba46c2a76eeca4e95fb
      https://github.com/llvm/llvm-project/commit/ffecd7247921512255ce4ba46c2a76eeca4e95fb
  Author: Jonathon Penix <jpenix at quicinc.com>
  Date:   2025-02-27 (Thu, 27 Feb 2025)

  Changed paths:
    M llvm/lib/ObjCopy/ELF/ELFObjcopy.cpp
    M llvm/test/tools/llvm-objcopy/ELF/change-section-lma.test

  Log Message:
  -----------
  [llvm-objcopy] Let --change-section-lma change segments wth filesz=0,… (#127724)

… memsz>0

Currently, segments with a file size of 0 are ignored for the purposes
of --change-section-lma, regardless of their memory size. It seems
reasonable to me to modify such segments given that we're changing the
LMA for all sections and these LMAs may be used during loading. GNU
objcopy also seems to adjust such segments.

Additionally, segments with file size > 0 and memory size = 0 will no
longer be modified for the purposes of --change-section-lma as they
shouldn't be part of the loaded memory image.

Fixes #124680



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list