[all-commits] [llvm/llvm-project] bc6e10: [ELF][llvm-objcopy] Reject duplicate SHT_SYMTAB se...

Moshe via All-commits all-commits at lists.llvm.org
Fri Feb 17 09:59:49 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: bc6e10c9efca78cda350b6705de27728d142c0b0
      https://github.com/llvm/llvm-project/commit/bc6e10c9efca78cda350b6705de27728d142c0b0
  Author: Moshe Berman <mosheberman at users.noreply.github.com>
  Date:   2023-02-17 (Fri, 17 Feb 2023)

  Changed paths:
    M llvm/lib/ObjCopy/ELF/ELFObject.cpp
    A llvm/test/tools/llvm-objcopy/ELF/multiple-symtab.test

  Log Message:
  -----------
  [ELF][llvm-objcopy] Reject duplicate SHT_SYMTAB sections

The gABI prohibits multiple SH_SYMTAB sections. As a result,
llvm-objcopy was crashing in SymbolTableSection::removeSymbols(). This
patch fixes the issue by emitting an error if multiple SH_SYMTAB
sections are encountered when building an ELF object.

Fixes: https://github.com/llvm/llvm-project/issues/60448

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




More information about the All-commits mailing list