summaryrefslogtreecommitdiff
path: root/src/thread/synccall.c
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2023-11-06 12:59:34 -0500
committerRich Felker <dalias@aerifal.cx>2023-11-06 12:59:34 -0500
commit5baf2d92d3ed82960c419cb6093fbcdd028dde11 (patch)
treeadd0f8e3612b483f84a2fe2b6beda049dbd084fe /src/thread/synccall.c
parent725e17ed6dff4d0cd22487bb64470881e86a92e7 (diff)
downloadmusl-5baf2d92d3ed82960c419cb6093fbcdd028dde11.tar.gz
ldso: use __ehdr_start if available to locate its own ELF headers
previously, the relative load address was used as the address at which to find the ELF headers. this only works if two conditions are met: ldso is linked to start at a virtual address of 0, and the linker is cooperative and includes the main ELF headers in a loadable segment. while in practice these are always met, modern linkers provide a __ehdr_start symbol pointing to the ELF headers, and can in principle use the reference to this symbol as an indication that they need to be mapped in a segment. this also should make it possible to link for a different starting virtual address, if that's ever desirable.
Diffstat (limited to 'src/thread/synccall.c')
0 files changed, 0 insertions, 0 deletions