This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Re: Problem for allocate a elf binary (phdr) to memory.
- From: Szabolcs Nagy <szabolcs dot nagy at arm dot com>
- To: Rm Beer <rmbeer2 at gmail dot com>, libc-help at sourceware dot org
- Cc: nd at arm dot com
- Date: Tue, 26 Sep 2017 11:49:33 +0100
- Subject: Re: Problem for allocate a elf binary (phdr) to memory.
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=none (sender IP is ) smtp.mailfrom=Szabolcs dot Nagy at arm dot com;
- Nodisclaimer: True
- References: <CAA0fXPsR46A6+2cVKj1hsNWwCq+X0pTr2jBACgWEqnOynzQxKQ@mail.gmail.com>
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
On 25/09/17 23:49, Rm Beer wrote:
> Hello. I use Archlinux of 64bit.
> i have problem for use a load a library file that have 5kb of size to
> the memory, why by phdr have two fragment for load in the memory with
> 2mb of separation that need allocate 2mb in the memory for load the
> two fragment in the memory without break the distance (between two
> fragments).
>
> How to solved this problem?
>
where is the problem?
readwrite and readonly sections must end up on
different pages (and on x86_64 the max page size
is i think 2mb so the linker that produced the elf
object used that as alignment for the different
load sections, i guess you can change that alignment
with linker scripts, but why would you?)