Skip to content

Commit

Permalink
binfmt/elf: Select ARCH_USE_TEXT_HEAP if ARCH_HAVE_TEXT_HEAP
Browse files Browse the repository at this point in the history
Using up_textheap_memalign to allocate memory if arch support textheap
for loading section.

The default system heap does not support execution permissions,
so up_textheap_memalign allocation is required.

this patch can fix issue about apache#11043

update esp32 elf config:
remove -CONFIG_ARCH_USE_TEXT_HEAP=y becuase ARCH_CHIP_ESP32 select
ARCH_HAVE_TEXT_HEAP

Signed-off-by: dongjiuzhu1 <[email protected]>
  • Loading branch information
Donny9 authored and masayuki2009 committed Oct 27, 2023
1 parent c50d471 commit 4068f11
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 2 deletions.
1 change: 1 addition & 0 deletions binfmt/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ config ELF
default n
select BINFMT_LOADABLE
select LIBC_ARCH_ELF
select ARCH_USE_TEXT_HEAP if ARCH_HAVE_TEXT_HEAP
---help---
Enable support for the ELF binary format. Default: n

Expand Down
1 change: 0 additions & 1 deletion boards/risc-v/esp32c3/esp32c3-devkit/configs/elf/defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ CONFIG_ARCH_CHIP_ESP32C3WROOM02=y
CONFIG_ARCH_INTERRUPTSTACK=8192
CONFIG_ARCH_RISCV=y
CONFIG_ARCH_STACKDUMP=y
CONFIG_ARCH_USE_TEXT_HEAP=y
CONFIG_BOARDCTL_ROMDISK=y
CONFIG_BOARD_LOOPSPERMSEC=15000
CONFIG_BUILTIN=y
Expand Down
1 change: 0 additions & 1 deletion boards/xtensa/esp32/esp32-devkitc/configs/elf/defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ CONFIG_ARCH_CHIP="esp32"
CONFIG_ARCH_CHIP_ESP32=y
CONFIG_ARCH_CHIP_ESP32WROVER=y
CONFIG_ARCH_STACKDUMP=y
CONFIG_ARCH_USE_TEXT_HEAP=y
CONFIG_ARCH_XTENSA=y
CONFIG_BINFMT_CONSTRUCTORS=y
CONFIG_BOARDCTL_ROMDISK=y
Expand Down

0 comments on commit 4068f11

Please sign in to comment.