I am proposing the following changes to the powerpc linker scripts (both B and BDT). This change will align the end of the BSS to a 256M boundary. Due to the restrictions on powerpc allow only one page size per 256M chunk of virtual address space, it is possible to have spurious remapping and/or malloc failures with some applications. We're seeing it in the case where an application requests segment remapping, but the loader mapped a library into the same 256 segment as the BSS. In this case we can unmap the original BSS, but are not able to create it in large pages due to the library in the way. Aligning the bss in this way should not cause any harm. It may cause us to consume a few more huge pages in some cases. This side effect is fixable in the future.
Does anyone see any problems with doing this? Signed-Off-By: Adam Litke <[EMAIL PROTECTED]> diff --git a/ldscripts/elf32ppclinux.xB b/ldscripts/elf32ppclinux.xB index 8d5cf4d..e45e0d7 100644 --- a/ldscripts/elf32ppclinux.xB +++ b/ldscripts/elf32ppclinux.xB @@ -205,10 +205,8 @@ SECTIONS .bss section disappears because there are no input sections. FIXME: Why do we need it? When there is no .bss section, we don't pad the .data section. */ - . = ALIGN(. != 0 ? 32 / 8 : 1); + . = ALIGN(256*1204*1024); } :htlb - . = ALIGN(32 / 8); - . = ALIGN(32 / 8); _end = .; PROVIDE (end = .); /* Stabs debugging sections. */ diff --git a/ldscripts/elf32ppclinux.xBDT b/ldscripts/elf32ppclinux.xBDT index 8794edb..2734ebe 100644 --- a/ldscripts/elf32ppclinux.xBDT +++ b/ldscripts/elf32ppclinux.xBDT @@ -199,10 +199,8 @@ SECTIONS .bss section disappears because there are no input sections. FIXME: Why do we need it? When there is no .bss section, we don't pad the .data section. */ - . = ALIGN(. != 0 ? 32 / 8 : 1); + . = ALIGN(256*1024*1024); } :hdata - . = ALIGN(32 / 8); - . = ALIGN(32 / 8); _end = .; PROVIDE (end = .); /* Stabs debugging sections. */ diff --git a/ldscripts/elf64ppc.xB b/ldscripts/elf64ppc.xB index 073735f..48904f3 100644 --- a/ldscripts/elf64ppc.xB +++ b/ldscripts/elf64ppc.xB @@ -199,6 +199,7 @@ SECTIONS *(.dynbss) *(.bss .bss.* .gnu.linkonce.b.*) *(COMMON) + . = ALIGN(256*1024*1024); } _end = .; PROVIDE (end = .); diff --git a/ldscripts/elf64ppc.xBDT b/ldscripts/elf64ppc.xBDT index fc99882..69065ea 100644 --- a/ldscripts/elf64ppc.xBDT +++ b/ldscripts/elf64ppc.xBDT @@ -192,10 +192,8 @@ SECTIONS .bss section disappears because there are no input sections. FIXME: Why do we need it? When there is no .bss section, we don't pad the .data section. */ - . = ALIGN(. != 0 ? 64 / 8 : 1); + . = ALIGN(256*1024*1024); } :hdata - . = ALIGN(64 / 8); - . = ALIGN(64 / 8); _end = .; PROVIDE (end = .); /*. = DATA_SEGMENT_END (.);*/ -- Adam Litke - (agl at us.ibm.com) IBM Linux Technology Center ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Libhugetlbfs-devel mailing list Libhugetlbfs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libhugetlbfs-devel