[all-commits] [llvm/llvm-project] b28412: [llvm-objcopy][ELF] Add --set-section-type

Fangrui Song via All-commits all-commits at lists.llvm.org
Wed Jul 13 10:04:34 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b28412d5397dc5a23f172d6ebeac760c82a82248
      https://github.com/llvm/llvm-project/commit/b28412d5397dc5a23f172d6ebeac760c82a82248
  Author: Fangrui Song <i at maskray.me>
  Date:   2022-07-13 (Wed, 13 Jul 2022)

  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/add-section-and-set-attr.test
    R llvm/test/tools/llvm-objcopy/ELF/add-section-and-set-flags.test
    M llvm/test/tools/llvm-objcopy/ELF/set-section-alignment.test
    M llvm/test/tools/llvm-objcopy/ELF/set-section-attr-and-rename.test
    A llvm/test/tools/llvm-objcopy/ELF/set-section-type.test
    M llvm/tools/llvm-objcopy/ObjcopyOptions.cpp
    M llvm/tools/llvm-objcopy/ObjcopyOpts.td

  Log Message:
  -----------
  [llvm-objcopy][ELF] Add --set-section-type

The request is mentioned on D129053. I feel that having this functionality is
mildly useful (not strong).

* Rename .ctors to .init_array and change sh_type to SHT_INIT_ARRAY (GNU objcopy
  detects the special name but we don't).
* Craft tests for a new SHT_LLVM_* extension

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D129337




More information about the All-commits mailing list