[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/12376] File offsets for PT_LOAD segments and resulting inequival
From: |
dave at hiauly1 dot hia.nrc.ca |
Subject: |
[Bug ld/12376] File offsets for PT_LOAD segments and resulting inequivalent memory aliases |
Date: |
Mon, 14 Feb 2011 14:51:49 +0000 |
http://sourceware.org/bugzilla/show_bug.cgi?id=12376
--- Comment #7 from dave at hiauly1 dot hia.nrc.ca <dave at hiauly1 dot
hia.nrc.ca> 2011-02-14 14:51:27 UTC ---
> If they are the same page, doesn't that mean your maxpagesize is wildly
> incorrect? You must have maxpagesize at least as large as a memory page.
maxpagesize is set to 0x1000 which is the standard page size for parisc
linux.
The issue is not the virtual addresses of the page but the placement
of the loadable segments in the file. These segments are mmap'd from
the file to physical memory. Although the pages could be different
in memory, they are not.
The issue can be seen by looking at the mappings for a trivial program like:
int main () { return 0 }
For the the main executable, there is only one file page for text
and data. Run program under gdb with a break on main. Then inspect
the mappings.
The two mappings could be made equivalent, but this messes up shared
library support.
The hardware can support larger page sizes, but as far as I know nobody
uses them on linux. There was some effort to provide support for larger
page sizes in the linux kernel but I don't believe the cache flush and
TLB support is complete.
Possibly, ELF_COMMONPAGESIZE should be defined and ELF_MAXPAGESIZE
increased to the linux kernel maximum.
Dave
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
- [Bug ld/12376] File offsets for PT_LOAD segments and resulting inequivalent memory aliases, amodra at gmail dot com, 2011/02/13
- [Bug ld/12376] File offsets for PT_LOAD segments and resulting inequivalent memory aliases, dave at hiauly1 dot hia.nrc.ca, 2011/02/13
- [Bug ld/12376] File offsets for PT_LOAD segments and resulting inequivalent memory aliases, amodra at gmail dot com, 2011/02/13
- [Bug ld/12376] File offsets for PT_LOAD segments and resulting inequivalent memory aliases,
dave at hiauly1 dot hia.nrc.ca <=
- [Bug ld/12376] File offsets for PT_LOAD segments and resulting inequivalent memory aliases, ian at airs dot com, 2011/02/14
- [Bug ld/12376] File offsets for PT_LOAD segments and resulting inequivalent memory aliases, dave at hiauly1 dot hia.nrc.ca, 2011/02/14
- [Bug ld/12376] File offsets for PT_LOAD segments and resulting inequivalent memory aliases, ian at airs dot com, 2011/02/14
- [Bug ld/12376] File offsets for PT_LOAD segments and resulting inequivalent memory aliases, dave at hiauly1 dot hia.nrc.ca, 2011/02/14
- [Bug ld/12376] File offsets for PT_LOAD segments and resulting inequivalent memory aliases, cvs-commit at gcc dot gnu.org, 2011/02/18
- [Bug ld/12376] File offsets for PT_LOAD segments and resulting inequivalent memory aliases, danglin at gcc dot gnu.org, 2011/02/18