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))