Dear experts, I'm new in klibc and currently studying the source codes. I'm looking at the codes in usr/klibc/arch and can't figure out why does, e.g. in x86_64, the text segment offset differ from system v x86_64 abi (which is 4 Mb)? How does this value was calculated? Thanks in advance! Nikita.
On 11/23/18 8:09 AM, eno wrote:> Dear experts, > > I'm new in klibc and currently studying the source codes. > I'm looking at the codes in usr/klibc/arch and can't figure out why > does, e.g. in x86_64, the text segment offset differ from system v > x86_64 abi (which is 4 Mb)? How does this value was calculated? > > Thanks in advance! > Nikita.It is set so that klibc.so is loaded at an address where it doesn't conflict with the load address of an executable, but is still within range of an intramodule control transfer (which is architecture-dependent.) -hpa
Hi Peter, Thank you for the answer! ??, 20 ???. 2018 ?. ? 00:02, H. Peter Anvin <hpa at zytor.com>:> > On 11/23/18 8:09 AM, eno wrote: > > Dear experts, > > > > I'm new in klibc and currently studying the source codes. > > I'm looking at the codes in usr/klibc/arch and can't figure out why > > does, e.g. in x86_64, the text segment offset differ from system v > > x86_64 abi (which is 4 Mb)? How does this value was calculated? > > > > Thanks in advance! > > Nikita. > > It is set so that klibc.so is loaded at an address where it doesn't > conflict with the load address of an executable, but is still within > range of an intramodule control transfer (which is architecture-dependent.) > > -hpa >
Seemingly Similar Threads
- question about KLIBCSHAREDFLAGS
- [PATCH 2/2] add KLIBCSHAREDFLAGS for IA64
- [klibc:master] Build and install shared binaries only if KLIBCSHAREDFLAGS is defined
- ppc32: "Relocation truncated to fit"
- [klibc:master] Use -Ttext-segment to link shared library on all arches