[PATCH] D27770: [ELF][MIPS] Allow .MIPS.abiflags larger than one Elf_Mips_ABIFlags struct

Simon Atanasyan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 15 04:39:33 PST 2016


atanasyan added inline comments.


================
Comment at: ELF/SyntheticSections.cpp:138
+    const auto Size = Sec->Data.size();
+    constexpr auto ABIFlagsSize = sizeof(Elf_Mips_ABIFlags);
+    if (Size < ABIFlagsSize) {
----------------
I do not think we need `constexpr` here. Plain `const` is enough.


================
Comment at: test/ELF/mips-merge-abiflags.s:6
+# RUN: llvm-readobj -file-headers -sections -mips-abi-flags \
+# RUN:   %p/Inputs/mips-concatenated-abiflags.so | FileCheck \
+# RUN:   --check-prefix=CONCAT %s
----------------
  # I guess you want to check %t.exe (file produced by LLD) not mips-concatenated-abiflags.so here.
  # It is enough to use the `-mips-abi-flags` flag only and do not check ELF header and sections list.
  # Does LLD really show the "invalid size of .MIPS.abiflags section" error message if concatenated .MIPS.abiflags sections are in a DSO (not a regular object file)?


https://reviews.llvm.org/D27770





More information about the llvm-commits mailing list