--- zzzz-none-000/linux-3.10.107/arch/h8300/include/asm/flat.h 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/arch/h8300/include/asm/flat.h 2021-02-04 17:41:59.000000000 +0000 @@ -1,5 +1,5 @@ /* - * include/asm-h8300/flat.h -- uClinux flat-format executables + * arch/h8300/asm/include/flat.h -- uClinux flat-format executables */ #ifndef __H8300_FLAT_H__ @@ -17,10 +17,12 @@ * is is 0 (davidm@snapgear.com) */ -#define flat_get_relocate_addr(rel) (rel) +#define flat_get_relocate_addr(rel) (rel & ~0x00000001) #define flat_get_addr_from_rp(rp, relval, flags, persistent) \ - (get_unaligned(rp) & ((flags & FLAT_FLAG_GOTPIC) ? 0xffffffff: 0x00ffffff)) + ({(void)persistent; \ + get_unaligned(rp) & (((flags) & FLAT_FLAG_GOTPIC) ? \ + 0xffffffff : 0x00ffffff); }) #define flat_put_addr_at_rp(rp, addr, rel) \ - put_unaligned (((*(char *)(rp)) << 24) | ((addr) & 0x00ffffff), rp) + put_unaligned(((*(char *)(rp)) << 24) | ((addr) & 0x00ffffff), (rp)) #endif /* __H8300_FLAT_H__ */