This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug dynamic-link/21908] dynamic linker broke on ia64 (mmap2 consolidation is the suspect)


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

--- Comment #6 from Adhemerval Zanella <adhemerval.zanella at linaro dot org> ---
In fact the part of default part MMAP_OFF_HIGH_MASK is unnecessary, the patch
could be simplified: 

diff --git a/sysdeps/unix/sysv/linux/m68k/mmap_internal.h
b/sysdeps/unix/sysv/linux/m68k/mmap_internal.h
index bd8bd38..9fe9d91 100644
--- a/sysdeps/unix/sysv/linux/m68k/mmap_internal.h
+++ b/sysdeps/unix/sysv/linux/m68k/mmap_internal.h
@@ -22,7 +22,7 @@
 /* ColdFire and Sun 3 kernels have PAGE_SHIFT set to 13 and expect
    mmap2 offset to be provided in 8K pages.  Determine the shift
    dynamically with getpagesize.  */
-#define MMAP2_PAGE_SHIFT -1
+#define MMAP2_PAGE_UNIT -1

 #include_next <mmap_internal.h>

diff --git a/sysdeps/unix/sysv/linux/mmap_internal.h
b/sysdeps/unix/sysv/linux/mmap_internal.h
index 499e389..47c0991 100644
--- a/sysdeps/unix/sysv/linux/mmap_internal.h
+++ b/sysdeps/unix/sysv/linux/mmap_internal.h
@@ -27,13 +27,13 @@
 #endif

 #if MMAP2_PAGE_UNIT == -1
-static int page_unit;
-
+static uint64_t page_unit;
 # define MMAP_CHECK_PAGE_UNIT()                        \
   if (page_unit == 0)                          \
     page_unit = __getpagesize ();
+# undef MMAP2_PAGE_UNIT
+# define MMAP2_PAGE_UNIT page_unit
 #else
-# define page_unit MMAP2_PAGE_UNIT
 # define MMAP_CHECK_PAGE_UNIT()
 #endif

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]