svn commit: branches/uClibc-nptl/ldso: include ldso/avr32 ldso/bfin ldso/cris l etc...

carmelo at uclibc.org carmelo at uclibc.org
Thu Dec 4 14:02:57 UTC 2008


Author: carmelo
Date: 2008-12-04 06:02:56 -0800 (Thu, 04 Dec 2008)
New Revision: 24262

Log:
Synch with trunk @ 24261
Step 19: merge change in rev 24250
- Use runtime pagesize (Jeremy Kerr)
Some powerpc machines can support 64k pages, enabled by the
CONFIG_64K_PAGES option in linux.


Modified:
   branches/uClibc-nptl/ldso/include/ldso.h
   branches/uClibc-nptl/ldso/ldso/avr32/dl-sysdep.h
   branches/uClibc-nptl/ldso/ldso/bfin/dl-sysdep.h
   branches/uClibc-nptl/ldso/ldso/cris/dl-sysdep.h
   branches/uClibc-nptl/ldso/ldso/frv/dl-sysdep.h
   branches/uClibc-nptl/ldso/ldso/i386/dl-sysdep.h
   branches/uClibc-nptl/ldso/ldso/m68k/dl-sysdep.h
   branches/uClibc-nptl/ldso/ldso/mips/dl-sysdep.h
   branches/uClibc-nptl/ldso/ldso/powerpc/dl-sysdep.h
   branches/uClibc-nptl/ldso/ldso/sh/dl-sysdep.h
   branches/uClibc-nptl/ldso/ldso/sh64/dl-sysdep.h
   branches/uClibc-nptl/ldso/ldso/sparc/dl-sysdep.h
   branches/uClibc-nptl/ldso/ldso/x86_64/dl-sysdep.h
   branches/uClibc-nptl/ldso/ldso/xtensa/dl-sysdep.h


Changeset:
Modified: branches/uClibc-nptl/ldso/include/ldso.h
===================================================================
--- branches/uClibc-nptl/ldso/include/ldso.h	2008-12-04 13:57:59 UTC (rev 24261)
+++ branches/uClibc-nptl/ldso/include/ldso.h	2008-12-04 14:02:56 UTC (rev 24262)
@@ -43,6 +43,19 @@
 #endif
 #include <dl-hash.h>
 
+/* common align masks, if not specified by sysdep headers */
+#ifndef ADDR_ALIGN
+#define ADDR_ALIGN (_dl_pagesize - 1)
+#endif
+
+#ifndef PAGE_ALIGN
+#define PAGE_ALIGN (~ADDR_ALIGN)
+#endif
+
+#ifndef OFFS_ALIGN
+#define OFFS_ALIGN (PAGE_ALIGN & ~(1ul << (sizeof(_dl_pagesize) * 8 - 1)))
+#endif
+
 /* For INIT/FINI dependency sorting. */
 struct init_fini_list {
 	struct init_fini_list *next;

Modified: branches/uClibc-nptl/ldso/ldso/avr32/dl-sysdep.h
===================================================================
--- branches/uClibc-nptl/ldso/ldso/avr32/dl-sysdep.h	2008-12-04 13:57:59 UTC (rev 24261)
+++ branches/uClibc-nptl/ldso/ldso/avr32/dl-sysdep.h	2008-12-04 14:02:56 UTC (rev 24262)
@@ -46,11 +46,6 @@
 
 unsigned long _dl_linux_resolver(unsigned long got_offset, unsigned long *got);
 
-/* 4096 bytes alignment */
-#define PAGE_ALIGN 0xfffff000
-#define ADDR_ALIGN 0xfff
-#define OFFS_ALIGN 0x7ffff000
-
 #define elf_machine_type_class(type)				\
 	((type == R_AVR32_JMP_SLOT) * ELF_RTYPE_CLASS_PLT)
 

Modified: branches/uClibc-nptl/ldso/ldso/bfin/dl-sysdep.h
===================================================================
--- branches/uClibc-nptl/ldso/ldso/bfin/dl-sysdep.h	2008-12-04 13:57:59 UTC (rev 24261)
+++ branches/uClibc-nptl/ldso/ldso/bfin/dl-sysdep.h	2008-12-04 14:02:56 UTC (rev 24262)
@@ -67,12 +67,6 @@
 
 extern int _dl_linux_resolve(void) __attribute__((__visibility__("hidden")));
 
-/* 4KiB page alignment.  Should perhaps be made dynamic using
-   getpagesize(), based on AT_PAGESZ from auxvt?  */
-#define PAGE_ALIGN 0xfffff000
-#define ADDR_ALIGN 0xfff
-#define OFFS_ALIGN 0x7ffff000
-
 struct funcdesc_ht;
 
 #undef SEND_EARLY_STDERR

Modified: branches/uClibc-nptl/ldso/ldso/cris/dl-sysdep.h
===================================================================
--- branches/uClibc-nptl/ldso/ldso/cris/dl-sysdep.h	2008-12-04 13:57:59 UTC (rev 24261)
+++ branches/uClibc-nptl/ldso/ldso/cris/dl-sysdep.h	2008-12-04 14:02:56 UTC (rev 24262)
@@ -18,11 +18,6 @@
 struct elf_resolve;
 extern unsigned long _dl_linux_resolver(struct elf_resolve *tpnt, int reloc_entry);
 
-/* 8192 bytes alignment */
-#define PAGE_ALIGN 0xffffe000
-#define ADDR_ALIGN 0x1fff
-#define OFFS_ALIGN 0xffffe000
-
 /* The union of reloc-type-classes where the reloc TYPE is a member.
 
    TYPE is in the class ELF_RTYPE_CLASS_PLT if it can describe a

Modified: branches/uClibc-nptl/ldso/ldso/frv/dl-sysdep.h
===================================================================
--- branches/uClibc-nptl/ldso/ldso/frv/dl-sysdep.h	2008-12-04 13:57:59 UTC (rev 24261)
+++ branches/uClibc-nptl/ldso/ldso/frv/dl-sysdep.h	2008-12-04 14:02:56 UTC (rev 24262)
@@ -51,12 +51,6 @@
 
 extern int _dl_linux_resolve(void) __attribute__((__visibility__("hidden")));
 
-/* 16KiB page alignment.  Should perhaps be made dynamic using
-   getpagesize(), based on AT_PAGESZ from auxvt?  */
-#define PAGE_ALIGN 0xffffc000
-#define ADDR_ALIGN 0x3fff
-#define OFFS_ALIGN 0x7fffc000
-
 struct funcdesc_ht;
 
 /* We must force strings used early in the bootstrap into the data

Modified: branches/uClibc-nptl/ldso/ldso/i386/dl-sysdep.h
===================================================================
--- branches/uClibc-nptl/ldso/ldso/i386/dl-sysdep.h	2008-12-04 13:57:59 UTC (rev 24261)
+++ branches/uClibc-nptl/ldso/ldso/i386/dl-sysdep.h	2008-12-04 14:02:56 UTC (rev 24262)
@@ -25,11 +25,6 @@
 struct elf_resolve;
 extern unsigned long _dl_linux_resolver(struct elf_resolve * tpnt, int reloc_entry);
 
-/* 4096 bytes alignment */
-#define PAGE_ALIGN 0xfffff000
-#define ADDR_ALIGN 0xfff
-#define OFFS_ALIGN 0x7ffff000
-
 /* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry or
    TLS variable, so undefined references should not be allowed to
    define the value.

Modified: branches/uClibc-nptl/ldso/ldso/m68k/dl-sysdep.h
===================================================================
--- branches/uClibc-nptl/ldso/ldso/m68k/dl-sysdep.h	2008-12-04 13:57:59 UTC (rev 24261)
+++ branches/uClibc-nptl/ldso/ldso/m68k/dl-sysdep.h	2008-12-04 14:02:56 UTC (rev 24262)
@@ -25,11 +25,6 @@
 struct elf_resolve;
 extern unsigned long _dl_linux_resolver (struct elf_resolve *, int);
 
-/* 4096 bytes alignment */
-#define PAGE_ALIGN 0xfffff000
-#define ADDR_ALIGN 0xfff
-#define OFFS_ALIGN 0x7ffff000
-
 /* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry, so
    PLT entries should not be allowed to define the value.
    ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one

Modified: branches/uClibc-nptl/ldso/ldso/mips/dl-sysdep.h
===================================================================
--- branches/uClibc-nptl/ldso/ldso/mips/dl-sysdep.h	2008-12-04 13:57:59 UTC (rev 24261)
+++ branches/uClibc-nptl/ldso/ldso/mips/dl-sysdep.h	2008-12-04 14:02:56 UTC (rev 24262)
@@ -148,13 +148,7 @@
 
 /* 4096 bytes alignment */
 #if _MIPS_SIM == _MIPS_SIM_ABI64
-#define PAGE_ALIGN (~0xfffUL)
-#define ADDR_ALIGN 0xfffUL
 #define OFFS_ALIGN (0x10000000000UL-0x1000)
-#else	/* O32 || N32 */
-#define PAGE_ALIGN 0xfffff000
-#define ADDR_ALIGN 0xfff
-#define OFFS_ALIGN 0x7ffff000
 #endif	/* O32 || N32 */
 
 #define elf_machine_type_class(type)		ELF_RTYPE_CLASS_PLT

Modified: branches/uClibc-nptl/ldso/ldso/powerpc/dl-sysdep.h
===================================================================
--- branches/uClibc-nptl/ldso/ldso/powerpc/dl-sysdep.h	2008-12-04 13:57:59 UTC (rev 24261)
+++ branches/uClibc-nptl/ldso/ldso/powerpc/dl-sysdep.h	2008-12-04 14:02:56 UTC (rev 24262)
@@ -67,11 +67,6 @@
 extern unsigned long _dl_linux_resolver(struct elf_resolve * tpnt, int reloc_entry);
 void _dl_init_got(unsigned long *lpnt,struct elf_resolve *tpnt);
 
-/* 4096 bytes alignment */
-#define PAGE_ALIGN 0xfffff000
-#define ADDR_ALIGN 0xfff
-#define OFFS_ALIGN 0x7ffff000
-
 /* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry, so
    PLT entries should not be allowed to define the value.
    ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one

Modified: branches/uClibc-nptl/ldso/ldso/sh/dl-sysdep.h
===================================================================
--- branches/uClibc-nptl/ldso/ldso/sh/dl-sysdep.h	2008-12-04 13:57:59 UTC (rev 24261)
+++ branches/uClibc-nptl/ldso/ldso/sh/dl-sysdep.h	2008-12-04 14:02:56 UTC (rev 24262)
@@ -84,11 +84,6 @@
 
 #define do_rem(result, n, base)     ((result) = _dl_urem((n), (base)))
 
-/* 4096 bytes alignment */
-#define PAGE_ALIGN 0xfffff000
-#define ADDR_ALIGN 0xfff
-#define OFFS_ALIGN 0x7ffff000
-
 /* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry or
    TLS variable, so undefined references should not be allowed to
    define the value.

Modified: branches/uClibc-nptl/ldso/ldso/sh64/dl-sysdep.h
===================================================================
--- branches/uClibc-nptl/ldso/ldso/sh64/dl-sysdep.h	2008-12-04 13:57:59 UTC (rev 24261)
+++ branches/uClibc-nptl/ldso/ldso/sh64/dl-sysdep.h	2008-12-04 14:02:56 UTC (rev 24262)
@@ -25,11 +25,6 @@
 struct elf_resolve;
 extern unsigned long _dl_linux_resolver(struct elf_resolve * tpnt, int reloc_entry);
 
-/* 4096 bytes alignment */
-#define PAGE_ALIGN 0xfffff000
-#define ADDR_ALIGN 0xfff
-#define OFFS_ALIGN 0x7ffff000
-
 /* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry or
    TLS variable, so undefined references should not be allowed to
    define the value.

Modified: branches/uClibc-nptl/ldso/ldso/sparc/dl-sysdep.h
===================================================================
--- branches/uClibc-nptl/ldso/ldso/sparc/dl-sysdep.h	2008-12-04 13:57:59 UTC (rev 24261)
+++ branches/uClibc-nptl/ldso/ldso/sparc/dl-sysdep.h	2008-12-04 14:02:56 UTC (rev 24262)
@@ -89,18 +89,6 @@
 #define do_rem(result, n, base) ((result) = sparc_mod(n, base))
 #endif
 
-/* 4096 bytes alignment */
-#if defined(__sparc_v9__)
-/* ...but 8192 is required for mmap() on sparc64 kernel */
-#define PAGE_ALIGN 0xffffe000
-#define ADDR_ALIGN 0x1fff
-#define OFFS_ALIGN 0x7fffe000
-#elif defined(__sparc_v8__)
-#define PAGE_ALIGN 0xfffff000
-#define ADDR_ALIGN 0xfff
-#define OFFS_ALIGN 0x7ffff000
-#endif
-
 /* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry, so
    PLT entries should not be allowed to define the value.
    ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one

Modified: branches/uClibc-nptl/ldso/ldso/x86_64/dl-sysdep.h
===================================================================
--- branches/uClibc-nptl/ldso/ldso/x86_64/dl-sysdep.h	2008-12-04 13:57:59 UTC (rev 24261)
+++ branches/uClibc-nptl/ldso/ldso/x86_64/dl-sysdep.h	2008-12-04 14:02:56 UTC (rev 24262)
@@ -41,11 +41,6 @@
 struct elf_resolve;
 extern unsigned long _dl_linux_resolver(struct elf_resolve * tpnt, int reloc_entry);
 
-/* 4096 bytes alignment */
-#define PAGE_ALIGN 0xfffff000
-#define ADDR_ALIGN 0xfff
-#define OFFS_ALIGN 0x7ffff000
-
 /* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry or
    TLS variable, so undefined references should not be allowed to
    define the value.

Modified: branches/uClibc-nptl/ldso/ldso/xtensa/dl-sysdep.h
===================================================================
--- branches/uClibc-nptl/ldso/ldso/xtensa/dl-sysdep.h	2008-12-04 13:57:59 UTC (rev 24261)
+++ branches/uClibc-nptl/ldso/ldso/xtensa/dl-sysdep.h	2008-12-04 14:02:56 UTC (rev 24262)
@@ -76,11 +76,6 @@
 struct elf_resolve;
 extern unsigned long _dl_linux_resolver (struct elf_resolve *, int);
 
-/* 4096 bytes alignment */
-#define PAGE_ALIGN 0xfffff000
-#define ADDR_ALIGN 0xfff
-#define OFFS_ALIGN 0x7ffff000
-
 /* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry, so
    undefined references should not be allowed to define the value.  */
 #define elf_machine_type_class(type) \




More information about the uClibc-cvs mailing list