summaryrefslogtreecommitdiff
path: root/libpthread/nptl_db
diff options
context:
space:
mode:
authorGreg Ungerer <gerg@kernel.org>2023-11-28 23:29:43 +1000
committerWaldemar Brodkorb <wbx@openadk.org>2023-12-12 05:51:34 +0100
commit74d5b684253ce61404c1b72f2726599f00eb0a14 (patch)
tree6aab797e63c89b3c9575c2df35440499a35f5b00 /libpthread/nptl_db
parent75a5fc9e5033f47e955406e300a070004c14b8ae (diff)
elf: support ELF binaries in noMMU
The Linux kernels ELF-FDPIC binfmt program loader can support loading and running conventional ELF format binaries on noMMU kernels when compiled appropriately. That is when they are constant displacement binaries such as generated using the -pie compile option. Add a configure option to allow selecting ELF binary support in noMMU mode configurations on architectures that support this. The main requirement is to generate the ldso run-time loader to perform relocation at load time. These configurations do not support shared libraries, so there is no need to generate a full shared library, only the static version is required. The use of ELF format binaries does mean a slightly simpler toolchain generation (does not require a -uclinux- for some architectures) and does not require an extra tool like elf2flt. This initial support targets M68K, ARM and RISC-V architectures. No kernel changes are required, the required support for this is already in mainline kernels (certainly as of linux-6.6). Note that for the M68K and ARM architectures that the initialized registers and stack layout at process startup is slightly different for the flat format loader and the ELF/ELF-FDPIC loaders. So we need some changes to the startup code (crt1.S) for them. I have not done extensive testing outside of M68K, ARM and RISC-V. I had to make changes to a couple of the dl-startup.h architecture files to get them to build for this noMMU case. I did not dig down too deep on the reasons, but they still seem ok for the MMU case as well. Signed-off-by: Greg Ungerer <gerg@linux-m68k.org>
Diffstat (limited to 'libpthread/nptl_db')
0 files changed, 0 insertions, 0 deletions