Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 Jun 2009 16:42:38 -0700
From:      "Sean P. Dew" <freebsd.work@gmail.com>
To:        freebsd-current@freebsd.org
Subject:   segment alignment in AMD64
Message-ID:  <45d874490906281642r470089e2sc5b770f239f428e2@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?45d874490906281642r470089e2sc5b770f239f428e2>