https://sourceware.org/bugzilla/show_bug.cgi?id=21000

--- Comment #15 from dave.anglin at bell dot net ---
On 2017-02-12, at 8:34 PM, amodra at gmail dot com wrote:

> https://sourceware.org/bugzilla/show_bug.cgi?id=21000
> 
> --- Comment #14 from Alan Modra <amodra at gmail dot com> ---
> I obviously didn't understand the alias problem..  If I am grasping it
> correctly now, is the complaint about INEQUIVALENT ALIASES really that in the
> following load map from a trivial -z relro main.c we have file offsets in the
> same page?
> 
>  LOAD           0x000000 0x00010000 0x00010000 0x00898 0x00898 R E 0x1000
>  LOAD           0x000f20 0x00011f20 0x00011f20 0x0014c 0x0015c RWE 0x1000

Yes, I believe that is correct.  I think the file offsets need to be page
aligned so that the
segments don't overlap when they are mapped to virtual addresses.  In a general
sense,
we can't have two different cache lines mapping to the same location in
physical memory,
particularly when they are both writeable.

This is what we have without the option:

  Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align
  PHDR           0x000034 0x00010034 0x00010034 0x000c0 0x000c0 R E 0x4
  INTERP         0x0000f4 0x000100f4 0x000100f4 0x0000d 0x0000d R   0x1
      [Requesting program interpreter: /lib/ld.so.1]
  LOAD           0x000000 0x00010000 0x00010000 0x0094c 0x0094c R E 0x1000
  LOAD           0x001000 0x00011000 0x00011000 0x00188 0x00198 RWE 0x1000
  DYNAMIC        0x001028 0x00011028 0x00011028 0x000d8 0x000d8 RW  0x4

> 
> In which case the fix for this will involve changing
> assign_file_positions_for_load_sections

--
John David Anglin       dave.ang...@bell.net

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to