[all-commits] [llvm/llvm-project] 9e3c7d: [MC][ELF] Preserve bits 7:4 of st_other (#228882)

Jiaxun Yang via All-commits all-commits at lists.llvm.org
Sun Oct 4 11:34:45 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9e3c7d1d64c719874b309a3ecafc51508a1a9290
      https://github.com/llvm/llvm-project/commit/9e3c7d1d64c719874b309a3ecafc51508a1a9290
  Author: Jiaxun Yang <jiaxun.yang at flygoat.com>
  Date:   2026-10-04 (Sun, 04 Oct 2026)

  Changed paths:
    M llvm/lib/MC/MCSymbolELF.cpp

  Log Message:
  -----------
  [MC][ELF] Preserve bits 7:4 of st_other (#228882)

The ELF gABI defines visibility in the low bits of st_other and leaves
the upper bits without a generic meaning [1]. Architecture-specific ELF
extensions use these upper bits. MIPS uses bits 7:4 to identify MIPS16
code symbols with STO_MIPS_MIPS16 (0xf0).

MCSymbolELF currently accepts only bits 7:5, so setting STO_MIPS_MIPS16
triggers an assertion. Expand the storage to preserve bits 7:4 and shift
the adjacent internal flags accordingly.

[1] ELF gABI, Section 5.1, Symbol Table Entry:
    https://gabi.xinuos.com/elf/05-symtab.html#symbol-table-entry

Assisted-by: OpenAI Codex



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