[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: |
danglin at gcc dot gnu.org |
Subject: |
[Bug ld/12376] File offsets for PT_LOAD segments and resulting inequivalent memory aliases |
Date: |
Sun, 9 Jan 2011 17:05:16 +0000 |
http://sourceware.org/bugzilla/show_bug.cgi?id=12376
--- Comment #1 from John David Anglin <danglin at gcc dot gnu.org> 2011-01-09
17:05:02 UTC ---
This might also be a glibc bug:
$ strace /lib/ld-2.11.2.so ./xxx3execve("/lib/ld-2.11.2.so",
["/lib/ld-2.11.2.so", "./xxx3"], [/* 17 vars */]) = 0
brk(0) = 0x4119a000
open("./xxx3", O_RDONLY) = 3
read(3, "\177ELF\1\2\1\3\0\0\0\0\0\0\0\0\0\2\0\17\0\0\0\1\0\1\3T\0\0\0004"...,
512) = 512
fstat64(3, {st_mode=0, st_size=4380866642020, ...}) = 0
getcwd("/home2/dave/inequiv", 128) = 20
mmap(0x10000, 4096, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE,
3, 0) = 0x10000
mmap(0x11000, 4096, PROT_READ|PROT_WRITE|PROT_EXEC,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x11000
close(3) = 0
newuname({sys="Linux", node="gsyprf11", ...}) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat64(3, {st_mode=0, st_size=0, ...}) = 0
mmap(NULL, 62087, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40192000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/libc.so.6", O_RDONLY) = 3
read(3,
"\177ELF\1\2\1\3\0\0\0\0\0\0\0\0\0\3\0\17\0\0\0\1\0\2\0\350\0\0\0004"..., 512)
= 512
fstat64(3, {st_mode=0, st_size=0, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x40000000
mmap(NULL, 1449240, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0x403ee000
mmap(0x40547000, 28672, PROT_READ|PROT_WRITE|PROT_EXEC,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x158000) = 0x40547000
mmap(0x4054e000, 7448, PROT_READ|PROT_WRITE|PROT_EXEC,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x4054e000
close(3) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x40001000
mprotect(0x403ee000, 1413120, PROT_READ|PROT_WRITE) = 0
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x40002000
mprotect(0x403ee000, 1413120, PROT_READ|PROT_EXEC) = 0
munmap(0x40192000, 62087) = 0
exit_group(0) = ?
The same fd (3) is used for all mmap calls. Possibly, different physical
memory pages would be allocated if different file descriptors were used.
--
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.