[PATCH] D65278: [llvm-objcopy] - Stop using Inputs/alloc-symtab.o.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 29 07:37:02 PDT 2019


grimar added inline comments.


================
Comment at: test/tools/llvm-objcopy/ELF/binary-out-error.test:2
+# RUN: yaml2obj %s -o %t
+# RUN: not llvm-objcopy -O binary %t %t2 2>&1 >/dev/null | FileCheck %s --check-prefix=SYMTAB
 # SYMTAB: cannot write symbol table '.symtab' out to binary
----------------
MaskRay wrote:
> jhenderson wrote:
> > MaskRay wrote:
> > > `not llvm-objcopy -O binary %t - 2>&1 | FileCheck %s --check-prefix=SYMTAB`
> > > 
> > You can actually get rid of the --check-prefix entirely, since this is the only check in the file.
> Some other "out to binary" warnings have not been tested. We can add them later, so `--check-prefix=SYMTAB` can be kept to make future diff smaller.
>> Some other "out to binary" warnings have not been tested. We can add them later, so --check-prefix=SYMTAB can be kept to make future diff smaller.

Yep, below is a list of candidates for testing:

```
void BinarySectionWriter::visit(const SectionIndexSection &Sec) {
  error("cannot write symbol section index table '" + Sec.Name + "' ");
}

void BinarySectionWriter::visit(const SymbolTableSection &Sec) {
  error("cannot write symbol table '" + Sec.Name + "' out to binary");
}

void BinarySectionWriter::visit(const RelocationSection &Sec) {
  error("cannot write relocation section '" + Sec.Name + "' out to binary");
}

void BinarySectionWriter::visit(const GnuDebugLinkSection &Sec) {
  error("cannot write '" + Sec.Name + "' out to binary");
}

void BinarySectionWriter::visit(const GroupSection &Sec) {
  error("cannot write '" + Sec.Name + "' out to binary");
}
```


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D65278/new/

https://reviews.llvm.org/D65278





More information about the llvm-commits mailing list