mirror of
https://sourceware.org/git/glibc.git
synced 2025-12-24 17:51:17 +03:00
_dl_var_init is used to patch the read-only data section after
relocation. Several architectures use this to update
GLRO(page_size) with the correct value for the static dlopen case,
where _rtld_global_ro has not been initialized by the dynamic
loader.
RISC-V does not need this. The RISC-V Instruction Set Manual,
Volume II: Privileged Architecture, Document Version
20190608-Priv-MSU-Ratified says this:
After much deliberation, we have settled on a conventional
page size of 4 KiB for both RV32 and RV64. We expect this
decision to ease the porting of low-level runtime software
and device drivers. The TLB reach problem is ameliorated by
transparent superpage support in modern operating systems
[2]. Additionally, multi-level TLB hierarchies are quite
inexpensive relative to the multi-level cache hierarchies
whose address space they map.
[2] Juan Navarro, Sitaram Iyer, Peter Druschel, and
Alan Cox. Practical, transparent operating system support
for superpages. SIGOPS Oper. Syst. Rev., 36(SI):89–104,
December 2002.
This means that the initialization of
_rtld_global_ro._dl_page_size in elf/rtld.c with EXEC_PAGESIZE
is sufficient for RISC-V.
22 lines
525 B
Makefile
22 lines
525 B
Makefile
ifeq ($(subdir),elf)
|
|
sysdep_routines += dl-vdso
|
|
endif
|
|
|
|
ifeq ($(subdir),misc)
|
|
sysdep_headers += sys/cachectl.h
|
|
sysdep_routines += flush-icache
|
|
endif
|
|
|
|
ifeq ($(subdir),stdlib)
|
|
gen-as-const-headers += ucontext_i.sym
|
|
endif
|
|
|
|
abi-variants := lp64 lp64d
|
|
|
|
ifeq (,$(filter $(default-abi),$(abi-variants)))
|
|
$(error Unknown ABI $(default-abi), must be one of $(abi-variants))
|
|
endif
|
|
|
|
abi-lp64-condition := defined __LP64__ && defined __riscv_float_abi_soft
|
|
abi-lp64d-condition := defined __LP64__ && defined __riscv_float_abi_double
|