[all-commits] [llvm/llvm-project] 2b2f4a: [llvm-objcopy] Add --change-section-address (#98664)

Eleanor Bonnici via All-commits all-commits at lists.llvm.org
Tue Jul 30 02:58:23 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2b2f4ae0fbe366ebaa8811bed567a6ff76bbe3b1
      https://github.com/llvm/llvm-project/commit/2b2f4ae0fbe366ebaa8811bed567a6ff76bbe3b1
  Author: Eleanor Bonnici <eleanor.bonnici at arm.com>
  Date:   2024-07-30 (Tue, 30 Jul 2024)

  Changed paths:
    M llvm/docs/CommandGuide/llvm-objcopy.rst
    M llvm/include/llvm/ObjCopy/CommonConfig.h
    M llvm/lib/ObjCopy/ConfigManager.cpp
    M llvm/lib/ObjCopy/ELF/ELFObjcopy.cpp
    A llvm/test/tools/llvm-objcopy/ELF/change-section-address.test
    M llvm/tools/llvm-objcopy/ObjcopyOptions.cpp
    M llvm/tools/llvm-objcopy/ObjcopyOpts.td

  Log Message:
  -----------
  [llvm-objcopy] Add --change-section-address (#98664)

--change-section address and its alias --adjust-section-vma allows
modification
of section addresses in a relocatable file. This used to be used, for
example,
in Fiasco microkernel.

On a relocatable file this option behaves the same as GNU objcopy, apart
from
the fact that it does not issue any warnings, for example, when an
argument is
not used.
GNU objcopy does not produce an error when passed an executable file but
the
usecase for this is not clear, and the behaviour is inconsistent. The
idea of
GNU objcopy --change-section-address is that the option should change
both LMA
and VMA in an executable file. Since this patch does not implement
executable
file support, only VMA is changed.



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