sim: Fix sim m32 start up crash issue.
After compilation, when starting nsh, the following crash occurs. ==2500151==Shadow memory range interleaves with an existing memory mapping. ASan cannot proceed correctly. ABORTING. ==2500151==ASan shadow was supposed to be located in the [0x1ffff000-0x3fffffff] range. ==2500151==Process memory map follows: 0x30000000-0x33dd4000 /nuttx/nuttx To avoid overlaps, change the starting address of the text segment. Using Ttext-segment=0x30000000 causes a crash when starting the 32-bit SIM. Using -Ttext-segment=0x50000000 causes a crash when starting the 64-bit SIM. Setting -Ttext-segment=0x40000000 resolves all issues perfectly. Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
This commit is contained in:
parent
2d20de72be
commit
8e58245524
2 changed files with 3 additions and 3 deletions
|
|
@ -196,5 +196,5 @@ if(APPLE)
|
|||
add_link_options(-Wl,-dead_strip)
|
||||
else()
|
||||
add_link_options(-Wl,--gc-sections)
|
||||
add_link_options(-Wl,-Ttext-segment=0x30000000)
|
||||
add_link_options(-Wl,-Ttext-segment=0x40000000)
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -296,9 +296,9 @@ ifeq ($(CONFIG_HOST_MACOS),y)
|
|||
else
|
||||
LDFLAGS += -Wl,--gc-sections
|
||||
|
||||
# Let the symbol table link from 0x30000000
|
||||
# Let the symbol table link from 0x40000000
|
||||
# which is more convenient for debugging.
|
||||
LDFLAGS += -Wl,-Ttext-segment=0x30000000
|
||||
LDFLAGS += -Wl,-Ttext-segment=0x40000000
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_DEBUG_LINK_MAP),y)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue