omitrbp

Find kernel functions that omit the frame pointer
git clone git://git.margiolis.net/omitrbp.git
Log | Files | Refs | README | LICENSE

commit f909b2da5b0183e9099704d3c98bece0279531dd
parent 5c021778106dc47481a2e2c57bb6d9a15325126e
Author: Christos Margiolis <christos@margiolis.net>
Date:   Sat, 18 Mar 2023 20:27:10 +0200

s/if/else if/

Diffstat:
Momitrbp.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/omitrbp.c b/omitrbp.c @@ -149,6 +149,7 @@ main(int argc, char *argv[]) if (s->sh.sh_link >= shnum) continue; stab = s->sh.sh_link; + len = (int)(s->sh.sh_size / s->sh.sh_entsize); (void)elf_errno(); if ((d = elf_getdata(s->scn, NULL)) == NULL) { if (elf_errno() != 0) @@ -159,8 +160,7 @@ main(int argc, char *argv[]) continue; if (s->sh.sh_entsize == 0) continue; - len = (int)(s->sh.sh_size / s->sh.sh_entsize); - if (len > INT_MAX) + else if (len > INT_MAX) continue; for (j = 0; j < len; j++) { if (gelf_getsym(d, j, &sym) != &sym) {