segprint: drop empty sections with -z -D

Signed-off-by: Tomasz Michalak <tmichalak@antmicro.com>
This commit is contained in:
Tomasz Michalak 2019-04-15 21:41:16 +02:00
parent b588c5eaaf
commit 48e5b8fc8d
1 changed files with 2 additions and 1 deletions

View File

@ -308,7 +308,8 @@ def handle_segment(
segtags = set()
# Found something to print?
keep = not omit_empty_segs or len(segbits) > 0 or len(segtags) > 0
keep = not omit_empty_segs or len(segbits) > 0 or (
len(segtags) > 0 and not decode_omit)
if not keep:
return