Date: Sun, 7 Feb 2010 05:50:00 +0000 (UTC) From: Nathan Whitehorn <nwhitehorn@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r203602 - in projects/ppc64: contrib/binutils/bfd lib/libc/stdlib Message-ID: <201002070550.o175o0Qn055959@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: nwhitehorn Date: Sun Feb 7 05:50:00 2010 New Revision: 203602 URL: http://svn.freebsd.org/changeset/base/203602 Log: Revert r202955, which was the wrong solution to a binutils bug when processing TLS relocations in shared objects, and replace it with the correct solution. This patch is inspired by version 1.217 of upstream binutils. This commit fixes the problems with malloc TLS on powerpc64. Modified: projects/ppc64/contrib/binutils/bfd/elf64-ppc.c projects/ppc64/lib/libc/stdlib/malloc.c Modified: projects/ppc64/contrib/binutils/bfd/elf64-ppc.c ============================================================================== --- projects/ppc64/contrib/binutils/bfd/elf64-ppc.c Sun Feb 7 05:16:38 2010 (r203601) +++ projects/ppc64/contrib/binutils/bfd/elf64-ppc.c Sun Feb 7 05:50:00 2010 (r203602) @@ -3268,15 +3268,13 @@ create_got_section (bfd *abfd, struct bf flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_LINKER_CREATED); - got = bfd_get_section_by_name(abfd, ".got"); - if (!got) - got = bfd_make_section (abfd, ".got"); + got = bfd_make_section_anyway (abfd, ".got"); if (!got || !bfd_set_section_flags (abfd, got, flags) || !bfd_set_section_alignment (abfd, got, 3)) return FALSE; - relgot = bfd_make_section (abfd, ".rela.got"); + relgot = bfd_make_section_anyway (abfd, ".rela.got"); if (!relgot || ! bfd_set_section_flags (abfd, relgot, flags | SEC_READONLY) || ! bfd_set_section_alignment (abfd, relgot, 3)) Modified: projects/ppc64/lib/libc/stdlib/malloc.c ============================================================================== --- projects/ppc64/lib/libc/stdlib/malloc.c Sun Feb 7 05:16:38 2010 (r203601) +++ projects/ppc64/lib/libc/stdlib/malloc.c Sun Feb 7 05:50:00 2010 (r203602) @@ -253,7 +253,6 @@ __FBSDID("$FreeBSD$"); #ifdef __powerpc64__ # define QUANTUM_2POW 4 # define SIZEOF_PTR_2POW 3 -# define NO_TLS #elif defined(__powerpc__) # define QUANTUM_2POW 4 # define SIZEOF_PTR_2POW 2
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201002070550.o175o0Qn055959>