libc/machine: Fix the error caused by tag kasan
Use address addition and subtraction, no longer as the return value of the address. Tags must be removed before calculation Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
This commit is contained in:
parent
a157436a57
commit
c5f816e16a
1 changed files with 4 additions and 0 deletions
|
@ -33,6 +33,7 @@
|
||||||
#include <nuttx/compiler.h>
|
#include <nuttx/compiler.h>
|
||||||
#include <nuttx/bits.h>
|
#include <nuttx/bits.h>
|
||||||
#include <nuttx/elf.h>
|
#include <nuttx/elf.h>
|
||||||
|
#include <nuttx/mm/kasan.h>
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
|
@ -181,6 +182,9 @@ aarch64_insn_encode_immediate(enum insn_imm_type_e type,
|
||||||
static uint64_t do_reloc(enum reloc_op_e op,
|
static uint64_t do_reloc(enum reloc_op_e op,
|
||||||
uintptr_t place, uint64_t val)
|
uintptr_t place, uint64_t val)
|
||||||
{
|
{
|
||||||
|
val = (uint64_t)kasan_reset_tag((FAR const void *)val);
|
||||||
|
place = (uint64_t)kasan_reset_tag((FAR const void *)place);
|
||||||
|
|
||||||
switch (op)
|
switch (op)
|
||||||
{
|
{
|
||||||
case RELOC_OP_ABS:
|
case RELOC_OP_ABS:
|
||||||
|
|
Loading…
Reference in a new issue