HomePhabricator

[test/Object][llvm-objdump] - llvm-objdump: don't abort() when the e_phoff…

Authored by grimar on Jul 10 2020, 7:33 AM.

Description

[test/Object][llvm-objdump] - llvm-objdump: don't abort() when the e_phoff field is invalid and refine testing.

llvm-objdump currently calls report_fatal_error() when the e_phoff field is invalid.

This is tested by elf-invalid-phdr.test which has the following issues:

  1. It uses a precompiled object.
  2. it could be a part of invalid.test.
  3. It tests the Object lib, but we have no separate test for llvm-objdump.

This patch addresses issues mentioned.

Differential revision: https://reviews.llvm.org/D83559