Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

binfmt/elf: Select ARCH_USE_TEXT_HEAP if ARCH_HAVE_TEXT_HEAP #11055

Merged
merged 1 commit into from Oct 27, 2023

Conversation

Donny9
Copy link
Contributor

@Donny9 Donny9 commented Oct 26, 2023

Summary

binfmt/elf: Select ARCH_USE_TEXT_HEAP if ARCH_HAVE_TEXT_HEAP

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.

Testing

local test
sim:elf

@Donny9 Donny9 changed the title arch/sim: Select ARCH_USE_TEXT_HEAP default. binfmt/elf: Select ARCH_USE_TEXT_HEAP if ARCH_HAVE_TEXT_HEAP Oct 26, 2023
@masayuki2009
Copy link
Contributor

@Donny9
Please add a commit message that this PR fixes #11043

@xiaoxiang781216
Copy link
Contributor

@masayuki2009 could you try this patch?

@Donny9
Copy link
Contributor Author

Donny9 commented Oct 26, 2023

@Donny9 Please add a commit message that this PR fixes #11043

Done~

@masayuki2009
Copy link
Contributor

masayuki2009 commented Oct 26, 2023

@Donny9

====================================================================================
Configuration/Tool: esp32c3-devkit/elf
------------------------------------------------------------------------------------
  Cleaning...
make[1]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
make[1]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
  Configuring...
make[1]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
make[1]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
  Building NuttX...
riscv-none-elf-ld: warning: /github/workspace/sources/nuttx/nuttx has a LOAD segment with RWX permissions
  Normalize esp32c3-devkit/elf
19d18
< CONFIG_ARCH_USE_TEXT_HEAP=y
Saving the new configuration file
HEAD detached at pull/11055/merge
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
	modified:   boards/risc-v/esp32c3/esp32c3-devkit/configs/elf/defconfig

Please fix the defconfig, since you changed binfmt/Kconfig.
I think there are similar configs.

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 <dongjiuzhu1@xiaomi.com>
@Donny9
Copy link
Contributor Author

Donny9 commented Oct 27, 2023

@Donny9

====================================================================================
Configuration/Tool: esp32c3-devkit/elf
------------------------------------------------------------------------------------
  Cleaning...
make[1]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
make[1]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
  Configuring...
make[1]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
make[1]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
  Building NuttX...
riscv-none-elf-ld: warning: /github/workspace/sources/nuttx/nuttx has a LOAD segment with RWX permissions
  Normalize esp32c3-devkit/elf
19d18
< CONFIG_ARCH_USE_TEXT_HEAP=y
Saving the new configuration file
HEAD detached at pull/11055/merge
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
	modified:   boards/risc-v/esp32c3/esp32c3-devkit/configs/elf/defconfig

Please fix the defconfig, since you changed binfmt/Kconfig. I think there are similar configs.

Done, thanks~

@masayuki2009 masayuki2009 merged commit 4068f11 into apache:master Oct 27, 2023
26 checks passed
@jerpelea jerpelea added this to To-Add in Release Notes - 12.4.0 Dec 27, 2023
@jerpelea jerpelea moved this from To-Add to processed in Release Notes - 12.4.0 Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants