hare

The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit b609e6cea969f07342ca8e215b8787762b89303f
parent a0e9af9c25eb5b25f30d29e6fd98f1e7dad54f5c
Author: Eyal Sawady <ecs@d2evs.net>
Date:   Mon,  6 Sep 2021 08:34:37 +0000

linux::vdso: don't use pointer arithmetic

Signed-off-by: Eyal Sawady <ecs@d2evs.net>

Diffstat:
Mlinux/vdso/vdso.ha | 10+++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/linux/vdso/vdso.ha b/linux/vdso/vdso.ha @@ -123,9 +123,9 @@ fn vdso_checkver(ctx: *vdso_ctx, version: str, num: u32) bool = { cur.vd_ndx & 0x7fff == versym) { const aux = (cur: uintptr + cur.vd_aux: uintptr): *elf::verdaux64; - const name = ctx.stringtab + - aux.vda_name: uintptr: *char; - return version == strings::fromc(name); + const name = ctx.stringtab: uintptr + + aux.vda_name: uintptr; + return version == strings::fromc(name: *char); }; prev = cur; cur += cur.vd_next: uintptr; @@ -155,8 +155,8 @@ export fn getsym(symname: str, symver: str) nullable *void = { sym.st_shndx == 0) { continue; }; - const name = ctx.stringtab + sym.st_name: uintptr: *char; - const s: str = strings::fromc(name); + const name = ctx.stringtab: uintptr + sym.st_name: uintptr; + const s: str = strings::fromc(name: *char); if (s != symname) continue; if (!vdso_checkver(ctx, symver, i))