diff options
author | tijl <tijl@FreeBSD.org> | 2015-02-25 08:39:48 +0000 |
---|---|---|
committer | tijl <tijl@FreeBSD.org> | 2015-02-25 08:39:48 +0000 |
commit | 8550f174913ba1c4bf9f4ac4dc6409621e64f1cc (patch) | |
tree | 257e6f0b642f4f884709405e532ec596eb7e5dd2 /contrib/binutils | |
parent | 9d303d647b44e264c5b8fb43ad4d840091db792c (diff) | |
download | FreeBSD-src-8550f174913ba1c4bf9f4ac4dc6409621e64f1cc.zip FreeBSD-src-8550f174913ba1c4bf9f4ac4dc6409621e64f1cc.tar.gz |
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
Diffstat (limited to 'contrib/binutils')
-rw-r--r-- | contrib/binutils/ld/scripttempl/elf.sc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/binutils/ld/scripttempl/elf.sc b/contrib/binutils/ld/scripttempl/elf.sc index 205d162..6060c3e 100644 --- a/contrib/binutils/ld/scripttempl/elf.sc +++ b/contrib/binutils/ld/scripttempl/elf.sc @@ -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}}} |