Fix abnormal symbol parsing when __irqentry_text_end is before __irqentry_text_start
On my ARM64 kernel 5.4 case
Symbol:
T __irqentry_text_end
T __irqentry_text_start
It will ignore all functions after __irqentry_text_start until __irqentry_text_end.
But this case __irqentry_text_end is before __irqentry_text_start.
So the problem happens.
@@ -587,6 +587,12 @@ class BPF(object):
if fn == b'__irqentry_text_start':
in_irq_section = 1
continue
+ # __irqentry_text_end is not always after
+ # __irqentry_text_start. But only happens when
+ # no functions between two irqentry_text
+ elif fn == b'__irqentry_text_end':
+ in_irq_section = 2
+ continue
elif in_irq_section == 1:
if fn == b'__irqentry_text_end':
in_irq_section = 2
