Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/libexec/ld.elf_so MAP_ALIGNED has existed for years, just as...



details:   https://anonhg.NetBSD.org/src/rev/43fefe6cc0b9
branches:  trunk
changeset: 995755:43fefe6cc0b9
user:      joerg <joerg%NetBSD.org@localhost>
date:      Fri Jan 04 19:54:56 2019 +0000

description:
MAP_ALIGNED has existed for years, just assume it exists.

diffstat:

 libexec/ld.elf_so/map_object.c |  10 ++--------
 1 files changed, 2 insertions(+), 8 deletions(-)

diffs (53 lines):

diff -r 14aba4d329cc -r 43fefe6cc0b9 libexec/ld.elf_so/map_object.c
--- a/libexec/ld.elf_so/map_object.c    Fri Jan 04 19:29:14 2019 +0000
+++ b/libexec/ld.elf_so/map_object.c    Fri Jan 04 19:54:56 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: map_object.c,v 1.58 2017/06/19 11:57:01 joerg Exp $     */
+/*     $NetBSD: map_object.c,v 1.59 2019/01/04 19:54:56 joerg Exp $     */
 
 /*
  * Copyright 1996 John D. Polstra.
@@ -34,7 +34,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: map_object.c,v 1.58 2017/06/19 11:57:01 joerg Exp $");
+__RCSID("$NetBSD: map_object.c,v 1.59 2019/01/04 19:54:56 joerg Exp $");
 #endif /* not lint */
 
 #include <errno.h>
@@ -77,9 +77,7 @@
        size_t           mapsize = 0;
        int              mapflags;
        Elf_Off          base_offset;
-#ifdef MAP_ALIGNED
        Elf_Addr         base_alignment;
-#endif
        Elf_Addr         base_vaddr;
        Elf_Addr         base_vlimit;
        Elf_Addr         text_vlimit;
@@ -262,9 +260,7 @@
         * and unmap the gaps left by padding to alignment.
         */
 
-#ifdef MAP_ALIGNED
        base_alignment = segs[0]->p_align;
-#endif
        base_offset = round_down(segs[0]->p_offset);
        base_vaddr = round_down(segs[0]->p_vaddr);
        base_vlimit = round_up(segs[1]->p_vaddr + segs[1]->p_memsz);
@@ -336,14 +332,12 @@
         * Calculate log2 of the base section alignment.
         */
        mapflags = 0;
-#ifdef MAP_ALIGNED
        if (base_alignment > _rtld_pagesz) {
                unsigned int log2 = 0;
                for (; base_alignment > 1; base_alignment >>= 1)
                        log2++;
                mapflags = MAP_ALIGNED(log2);
        }
-#endif
 
 #ifdef RTLD_LOADER
        base_addr = obj->isdynamic ? NULL : (caddr_t)base_vaddr;



Home | Main Index | Thread Index | Old Index