[PATCH] D143508: [ELF][llvm-objcopy] Reject duplicate SHT_SYMTAB sections.
James Henderson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 15 01:35:32 PST 2023
jhenderson added inline comments.
================
Comment at: llvm/lib/ObjCopy/ELF/ELFObject.cpp:1710
+ return createStringError(llvm::errc::invalid_argument,
+ "found multiple SHT_SYMTAB sections.");
auto &SymTab = Obj.addSection<SymbolTableSection>();
----------------
Nit: as per the coding standards, error messages shouldn't have a trailing full stop.
================
Comment at: llvm/test/tools/llvm-objcopy/ELF/multiple-symtab.test:2
+## According to the ELF gABI, "Currently, an object file may have only one
+## section of each type [SHT_SYMTAB and SHT_DYNSYM], but this restriction may be relaxed in the future.".
+# RUN: yaml2obj %s -o %t
----------------
The comment should also say what the purpose of this test is, i.e. add something like "This test shows that we emit an error if we encounter multiple SHT_SYMTAB sections."
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D143508/new/
https://reviews.llvm.org/D143508
More information about the llvm-commits
mailing list