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 #4 from Sergei Trofimovich <slyfox at inbox dot ru> ---
Created attachment 10317
  --> https://sourceware.org/bugzilla/attachment.cgi?id=10317&action=edit
glibc-git-mmap2-on-ia64.patch

Made it work based on m68k with this patch! Had to fix m68k as well.
It's not very clean but it implements two ideas:

- m68k: fix typo to use MMAP2_PAGE_UNIT, not MMAP2_PAGE_SHIFT (not used
anywhere)
- ia64: fix usage of page_unit instead of MMAP2_PAGE_UNIT in mmap() calls

What I don't like about the patch as-is:

- had to add '__attribute__((used));' to 'static int page_unit' as it's not
always used (#ifdefs are all around)
- page_unit has type either 'int' (MMAP2_PAGE_UNIT -1) or 'unsigled long long'
(MMAP2_PAGE_UNIT 4096ULL) that requires. This requires cmplicated cast in:

 #define MMAP_OFF_HIGH_MASK \
  ((-((unsigned long long)page_unit << 1) << (8 * sizeof (off_t) - 1)))

-- 
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]