From d0894fff38e033f5f0074efa975cfbe0069035b1 Mon Sep 17 00:00:00 2001 From: Yang Liu Date: Thu, 5 Sep 2024 00:27:05 +0800 Subject: [PATCH] elfhacks: d_un.d_ptr is relative on riscv glibc --- src/elfhacks.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/elfhacks.cpp b/src/elfhacks.cpp index 810a19d967..230b21676c 100644 --- a/src/elfhacks.cpp +++ b/src/elfhacks.cpp @@ -29,7 +29,7 @@ * \{ */ -#ifdef __GLIBC__ +#if defined(__GLIBC__) && !defined(__riscv) # define ABS_ADDR(obj, ptr) (ptr) #else # define ABS_ADDR(obj, ptr) ((obj->addr) + (ptr))