Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Feb 2015 08:39:48 +0000 (UTC)
From:      Tijl Coosemans <tijl@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r279271 - stable/10/contrib/binutils/ld/scripttempl
Message-ID:  <201502250839.t1P8dmu1067118@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tijl
Date: Wed Feb 25 08:39:48 2015
New Revision: 279271
URL: https://svnweb.freebsd.org/changeset/base/279271

Log:
  MFC r278586:
  
  Fix ldscripts such that ld(1) collects the .fini_array section in the same
  order as the .init_array section.  Finalisation routines need to be called
  in the opposite order as their corresponding initialisation routines but
  rtld(1) handles that by calling the function pointers in .fini_array in
  reverse order.
  
  Reviewed by:	kib

Modified:
  stable/10/contrib/binutils/ld/scripttempl/elf.sc
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/contrib/binutils/ld/scripttempl/elf.sc
==============================================================================
--- stable/10/contrib/binutils/ld/scripttempl/elf.sc	Wed Feb 25 08:35:00 2015	(r279270)
+++ stable/10/contrib/binutils/ld/scripttempl/elf.sc	Wed Feb 25 08:39:48 2015	(r279271)
@@ -402,8 +402,8 @@ cat <<EOF
   .fini_array   ${RELOCATING-0} :
   {
     ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (${USER_LABEL_PREFIX}__fini_array_start = .);}}
-    KEEP (*(.fini_array))
     KEEP (*(SORT(.fini_array.*)))
+    KEEP (*(.fini_array))
     ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (${USER_LABEL_PREFIX}__fini_array_end = .);}}
   }
   ${SMALL_DATA_CTOR-${RELOCATING+${CTOR}}}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201502250839.t1P8dmu1067118>