[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 17:26:08 +0000


--- Comment #9 from dave at hiauly1 dot hia.nrc.ca <dave at hiauly1 dot 
hia.nrc.ca> 2011-02-14 17:26:00 UTC ---
On Mon, 14 Feb 2011, ian at airs dot com wrote:

> If that is indeed a limitation of PA Linux, then the only fix is to change the
> default linker script so that the first page of the data segment does not
> overlap with the last page of the text segment.  The way to do that is to set
> DATA_ADDR in the appropriate ld/emulparams file.  For example,
> That should always force the data segment to start on a new page.

I'll take another look but I think this only changes the virtual address
of the data segment and not the underlying file organization.

Looking at a typical file compiled for hppa64-hpux with readelf, we have:

Program Headers:
  Type           Offset             VirtAddr           PhysAddr
           FileSiz            MemSiz              Flags  Align

  LOAD           0x0000000000000000 0x4000000000000000 0x0000000000000000
                 0x0000000000024bc8 0x0000000000024bc8  R E    8
  LOAD           0x0000000000025000 0x8000000100000000 0x0000000000000000
             0x0000000000002ef0 0x0000000000003550  RW     8

Note the file offset for the data segment starts on a page boundary.
I think that I need to achieve the same on hppa-linux.


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.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]