Matt Davis
4d17cdc704
[lld][mach-o] Avoid segfaulting when handling an empty section list.
...
Summary:
The following patch avoids segfaulting if the section list is empty when writing a mach-o MH_OBJECT. I ran into this case from a more complicated example trying to dead_strip while using '-r' in lld.
I'm not sure if having empty sections is a legal mach-o, but it does seem that other llvm-binutils tools can ingest such a boring object with out issue. Would it be better to emit an error, emit a warning, or do nothing? It seems that adding a warning diagnostic might be helpful to users, as I did not expect to have a section-less object when the linker was done.
Reviewers: kledzik, ruiu
Subscribers: llvm-commits, jrm
Tags: #lld, #llvm
Differential Revision: https://reviews.llvm.org/D67735
llvm-svn: 372995
2019-09-26 17:03:20 +00:00
..
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2019-05-01 05:49:01 +00:00
2019-05-01 05:49:01 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-10-12 16:31:20 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-08-06 22:37:49 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2019-09-26 17:03:20 +00:00
2018-02-16 21:16:57 +00:00
2019-05-01 05:49:01 +00:00
2019-05-01 05:49:01 +00:00
2019-04-16 03:51:53 +00:00
2019-04-16 03:51:53 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2019-04-16 03:51:53 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2019-05-01 05:49:01 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2019-04-16 03:51:53 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2016-09-12 22:38:43 +00:00
2016-10-05 20:09:50 +00:00
2019-04-17 01:47:16 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-10-12 16:31:20 +00:00
2018-10-12 16:31:20 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2019-05-01 05:49:01 +00:00
2018-02-16 21:16:57 +00:00
2018-10-12 16:31:20 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2019-05-01 05:49:01 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2018-02-16 21:16:57 +00:00
2019-05-01 05:49:01 +00:00
2018-02-16 21:16:57 +00:00