aboutsummaryrefslogtreecommitdiffhomepage
path: root/elf.c
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2023-06-19 22:42:25 +0200
committerlemon <lsof@mailbox.org>2023-06-19 22:42:25 +0200
commit7929d58d92f3a5624b0e61b842ba5ce8debb3550 (patch)
treee8749a041af1ec1d932d05e9616e1662278f1825 /elf.c
parent6fa5dbadce1f54d96e44c195167016278621ace1 (diff)
elf: fix type mismatch from bfore
Diffstat (limited to 'elf.c')
-rw-r--r--elf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/elf.c b/elf.c
index 668a599..49c9d83 100644
--- a/elf.c
+++ b/elf.c
@@ -368,9 +368,9 @@ putreloc(struct wbuf *out, const struct reloc *rel, bool userela)
static int
symcmp(const void *L, const void *R)
{
- const struct elf64sym *l = L, *r = R;
- int tmp, lbind = l->info >> 4, rbind = r->info >> 4;
- if ((tmp = lbind - rbind)) return tmp; /* locals prio */
+ const struct sym *l = L, *r = R;
+ int tmp;
+ if ((tmp = l->bind - r->bind)) return tmp; /* locals prio */
if ((tmp = r->shndx - l->shndx)) return tmp; /* section prio (real sections > SHN_UND) */
return l->name - r->name;
}