[all-commits] [llvm/llvm-project] 3376b1: [MC, ELF] Set sh_entsize for SHT_INIT_ARRAY/FINI_AR...

Fangrui Song via All-commits all-commits at lists.llvm.org
Mon Sep 28 21:35:36 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3376b1f4b2f4db8c7f5c94323e6c9a730d974247
      https://github.com/llvm/llvm-project/commit/3376b1f4b2f4db8c7f5c94323e6c9a730d974247
  Author: Fangrui Song <i at maskray.me>
  Date:   2026-09-28 (Mon, 28 Sep 2026)

  Changed paths:
    M lld/test/ELF/pre_init_fini_array.s
    M llvm/lib/MC/ELFObjectWriter.cpp
    M llvm/test/CodeGen/AMDGPU/lower-ctor-dtor.ll
    M llvm/test/MC/AsmParser/section_names.s
    M llvm/test/MC/ELF/section.s

  Log Message:
  -----------
  [MC,ELF] Set sh_entsize for SHT_INIT_ARRAY/FINI_ARRAY/PREINIT_ARRAY (#226875)

Match GNU Assembler: set sh_entsize to 4/8, regardless of sh_size. This
is mostly cosmetic: sh_entsize is not a useful member for non-merge
sections.
When clang-produced and GCC-produced objects are linked together, the
mismatch makes lld's output sh_entsize 0.



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