From owner-freebsd-current@FreeBSD.ORG Sun Jun 28 23:42:40 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2E4FA1065670 for ; Sun, 28 Jun 2009 23:42:40 +0000 (UTC) (envelope-from freebsd.work@gmail.com) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.244]) by mx1.freebsd.org (Postfix) with ESMTP id DCAA08FC08 for ; Sun, 28 Jun 2009 23:42:39 +0000 (UTC) (envelope-from freebsd.work@gmail.com) Received: by an-out-0708.google.com with SMTP id d14so1054320and.13 for ; Sun, 28 Jun 2009 16:42:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=GlwRe0uih2sL99TsUMKn/zg6ec2Gopm2T4HCYhIFLRM=; b=jQqtPOmrz2m/c0Zvjg0KZfzCUeHkv4u6TPz0rMePAnylqsM6UX+8nmt7AKrGrDT7+K k05SGsVm3KXALrNcaFw5nkLdA3CzZsbOP0ypPPyIKXh/9a3Fhid8tyT9tPx+CSuwSJWf nOW+cKtUHHrmyI/1ekqqMVI9Paz4QUSOUydAk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=QWHucAycEpw+IrvsCwdy0tJiefsFmI7oRhN8ClScBQhI4Y1LdB0uBgxDU9muVHSpQq Gx2fTeLcIHFjzbmG4ehrrt3mAKVSYNznHKcZXQK/64xxRzUTcFsGOTEsCDtKucP60PmA +ti78/wKHULuXvGiieKbwjUFjrBb9sE4bMNZM= MIME-Version: 1.0 Received: by 10.231.32.139 with SMTP id c11mr334106ibd.44.1246232558978; Sun, 28 Jun 2009 16:42:38 -0700 (PDT) Date: Sun, 28 Jun 2009 16:42:38 -0700 Message-ID: <45d874490906281642r470089e2sc5b770f239f428e2@mail.gmail.com> From: "Sean P. Dew" To: freebsd-current@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: segment alignment in AMD64 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jun 2009 23:42:40 -0000 Hi, Why is a loadable segment aligned to 1 MB on AMD64 while the pagezie is still 4K for a user application. Is there anyway to change it back to 4K, It is not making sense to me is because if my file segment is around 400K, we are wasting 1 MB of virtual address space ( granted it is not a lot for X64). I am trying to find out the reason. I am posting the readelf output of a .so. Any help is appreciated. Thanks Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align LOAD 0x000000 0x0000000000000000 0x0000000000000000 0x001428 0x001428 R E 0x100000 LOAD 0x001428 0x0000000000101428 0x0000000000101428 0x000438 0x007bd8 RW 0x100000 DYNAMIC 0x001618 0x0000000000101618 0x0000000000101618 0x000180 0x000180 RW 0x8 GNU_EH_FRAME 0x001420 0x0000000000001420 0x0000000000001420 0x000008 0x000008 R 0x4 Section to Segment mapping: Segment Sections... 00 .hash .dynsym .dynstr .gnu.version .gnu.version_r .rela.dyn .rela.plt .init .plt .text .fini .rodata .eh_frame_hdr 01 .data .eh_frame .dynamic .ctors .dtors .jcr .got .bss 02 .dynamic 03 .eh_frame_hdr