Kevin Enderby 00e8fc511c Clean up the specific error message for a malformed Mach-O files with bad segment
load commands.

The existing test case in test/Object/macho-invalid.test for
macho-invalid-too-small-segment-load-command has a cmdsize of 55, while
being too small also it is not a multiple of 4.  So when that check is added
this test case will produce a different error. So I constructed a new test case
that will trigger the intended error.

I also changed the error message to be consistent with the other malformed Mach-O
file error messages which prints the load command index.  I also removed both
object_error::macho_load_segment_too_small and
object_error::macho_load_segment_too_many_sections from Object/Error.h
as they are not needed and can just use object_error::parse_failed and let the
error message string distinguish the specific error.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268652 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-05 17:43:35 +00:00
..
2015-06-25 21:00:51 +00:00
2016-03-28 13:09:54 +00:00
2016-04-08 18:15:37 +00:00
2016-04-08 18:15:37 +00:00
2015-08-06 20:05:27 +00:00
2015-05-22 13:28:35 +00:00
2016-02-16 15:16:00 +00:00