This is the mail archive of the binutils-cvs@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Define various symbols conditionally in shared libraries


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=fd161d860f1df7140153eab4726705cc3e2727b0

commit fd161d860f1df7140153eab4726705cc3e2727b0
Author: Alan Modra <amodra@gmail.com>
Date:   Fri Jun 8 20:17:34 2018 +0930

    Define various symbols conditionally in shared libraries
    
    The values of symbols in shared libraries like _end, _edata, and
    __bss_start are generally not that useful outside of the shared
    library.  This patch defines them conditionally with PROVIDE, since a
    shared library might need the local value.  An example is glibc ld.so
    local access to "_begin", "_etext" and "_end".  (ld.so gains access to
    the local values by making the references using hidden visibility.
    That makes the definitions hidden too.)
    
    We can't use PROVIDE_HIDDEN in the linker scripts because the shared
    library might need the value of the symbol in the executable.  An
    example is freebsd libc dynamic access to "_end".
    
    	PR ld/23161
    	* emulparams/aarch64cloudabi.sh: PROVIDE __bss_start__, _bss_end__,
    	and __end__ in shared libraries.
    	* emulparams/aarch64fbsd.sh: Likewise.
    	* emulparams/aarch64linux.sh: Likewise.
    	* emulparams/aarch64linux32.sh: Likewise.
    	* emulparams/armelf_fuchsia.sh: Likewise.
    	* emulparams/armelf_linux.sh: Likewise.
    	* emulparams/armelf_phoenix.sh: Likewise.
    	* emulparams/aarch64elf.sh: Likewise, and __data_start
    	* emulparams/aarch64elf32.sh: Likewise.
    	* emulparams/armelf.sh: Likewise.
    	* emulparams/armnto.sh: Likewise.
    	* emulparams/elf32bmip.sh: Remove duplicate ". = ." from
    	OTHER_GOT_SYMBOLS.  PROVIDE _ftext, _fdata, and _fbss in shared libs.
    	* emulparams/elf32bmipn32-defs.sh: Likewise.
    	* emulparams/elf32frv.sh: PROVIDE __end and __data_start in shared libs.
    	* emulparams/elf32lriscv-defs.sh: Tidy.
    	* emulparams/elf32mcore.sh: PROVIDE __bss_start and _bss_end in
    	shared libs
    	* emulparams/elf32ppccommon.sh: PROVIDE __end in shared libs.
    	* emulparams/elf32rl78.sh: Tidy.
    	* emulparams/i386nto.sh: PROVIDE _btext in shared libs.
    	* emulparams/shelf_nto.sh: Likewise.
    	* emulparams/shlelf_nto.sh: Likewise.
    	* emulparams/score3_elf.sh: PROVIDE _gp, _bss_start__, _bss_end__,
    	__bss_end__, __end__, _fdata, _sdata_begin, and _bss_start in
    	shared libs.
    	* scripttempl/elf.sc: Don't use EXECUTABLE_SYMBOLS for shared
    	libraries.  PROVIDE _edata, edata, __bss_start, and _end in shared
    	libraries.
    	* testsuite/ld-elf/pr23161.map,
    	* testsuite/ld-elf/pr23161a.c,
    	* testsuite/ld-elf/pr23161b.c,
    	* testsuite/ld-elf/pr23161c.c,
    	* testsuite/ld-elf/pr23161a.rd,
    	* testsuite/ld-elf/pr23161b.rd,
    	* testsuite/ld-elf/pr23161c.rd,
    	* testsuite/ld-elf/pr23161d.rd: New tests.
    	* testsuite/ld-elf/shared.exp: Run ld/23161 tests.
    	* testsuite/ld-elf/pr23162.rd,
    	* testsuite/ld-aarch64/ifunc-1-local.d,
    	* testsuite/ld-aarch64/ifunc-1.d,
    	* testsuite/ld-aarch64/ifunc-2-local.d,
    	* testsuite/ld-aarch64/ifunc-2.d,
    	* testsuite/ld-aarch64/ifunc-21.d,
    	* testsuite/ld-aarch64/ifunc-3a.d,
    	* testsuite/ld-alpha/tlsbin.rd,
    	* testsuite/ld-alpha/tlsbin.sd,
    	* testsuite/ld-alpha/tlsbinr.rd,
    	* testsuite/ld-alpha/tlspic.rd,
    	* testsuite/ld-alpha/tlspic.sd,
    	* testsuite/ld-cris/dso-pltdis1.d,
    	* testsuite/ld-cris/dso-pltdis2.d,
    	* testsuite/ld-cris/dso12-pltdis.d,
    	* testsuite/ld-cris/gotplt1.d,
    	* testsuite/ld-cris/gotplt2.d,
    	* testsuite/ld-cris/gotplt3.d,
    	* testsuite/ld-cris/hiddef1.d,
    	* testsuite/ld-cris/libdso-1.d,
    	* testsuite/ld-cris/libdso-10.d,
    	* testsuite/ld-cris/libdso-11.d,
    	* testsuite/ld-cris/libdso-12.d,
    	* testsuite/ld-cris/libdso-12b.d,
    	* testsuite/ld-cris/libdso-12c.d,
    	* testsuite/ld-cris/libdso-13.d,
    	* testsuite/ld-cris/libdso-13b.d,
    	* testsuite/ld-cris/libdso-14.d,
    	* testsuite/ld-cris/libdso-15.d,
    	* testsuite/ld-cris/libdso-15b.d,
    	* testsuite/ld-cris/libdso-1c.d,
    	* testsuite/ld-cris/libdso-1d.d,
    	* testsuite/ld-cris/libdso-2.d,
    	* testsuite/ld-cris/pic-gc-72.d,
    	* testsuite/ld-cris/pic-gc-73.d,
    	* testsuite/ld-cris/pr16044.d,
    	* testsuite/ld-cris/pv32-1.d,
    	* testsuite/ld-cris/tls-dso-dtpoffd2.d,
    	* testsuite/ld-cris/tls-dso-dtpoffd4.d,
    	* testsuite/ld-cris/tls-dso-tpoffgotcomm1.d,
    	* testsuite/ld-cris/tls-gc-71.d,
    	* testsuite/ld-cris/tls-gd-1.d,
    	* testsuite/ld-cris/tls-gd-1h.d,
    	* testsuite/ld-cris/tls-gd-2.d,
    	* testsuite/ld-cris/tls-gd-2h.d,
    	* testsuite/ld-cris/tls-ie-10.d,
    	* testsuite/ld-cris/tls-ie-11.d,
    	* testsuite/ld-cris/tls-ie-78.d,
    	* testsuite/ld-cris/tls-ie-8.d,
    	* testsuite/ld-cris/tls-ie-9.d,
    	* testsuite/ld-cris/tls-js1.d,
    	* testsuite/ld-cris/tls-ld-4.d,
    	* testsuite/ld-cris/tls-ld-5.d,
    	* testsuite/ld-cris/tls-ld-6.d,
    	* testsuite/ld-cris/tls-ld-7.d,
    	* testsuite/ld-cris/tls-ldgd-14.d,
    	* testsuite/ld-cris/tls-ldgd-15.d,
    	* testsuite/ld-cris/tls-ldgdex-14.d,
    	* testsuite/ld-cris/tls-ldgdex-15.d,
    	* testsuite/ld-cris/tls-ldgdx-14.d,
    	* testsuite/ld-cris/tls-ldgdx-15.d,
    	* testsuite/ld-cris/tls-legdx-16.d,
    	* testsuite/ld-cris/tls-legdx-17.d,
    	* testsuite/ld-cris/tls-local-54.d,
    	* testsuite/ld-cris/tls-local-60.d,
    	* testsuite/ld-cris/tls-local-61.d,
    	* testsuite/ld-cris/tls-local-63.d,
    	* testsuite/ld-cris/tls-local-64.d,
    	* testsuite/ld-cris/tls-ok-30.d,
    	* testsuite/ld-cris/tls-ok-32.d,
    	* testsuite/ld-cris/tls-ok-34.d,
    	* testsuite/ld-cris/tls-und-38.d,
    	* testsuite/ld-cris/tls-und-42.d,
    	* testsuite/ld-cris/tls-und-46.d,
    	* testsuite/ld-cris/tls-und-50.d,
    	* testsuite/ld-cris/weakhiddso.d,
    	* testsuite/ld-cris/weakref2.d,
    	* testsuite/ld-frv/fdpic-shared-1.d,
    	* testsuite/ld-frv/fdpic-shared-2.d,
    	* testsuite/ld-frv/fdpic-shared-3.d,
    	* testsuite/ld-frv/fdpic-shared-4.d,
    	* testsuite/ld-frv/fdpic-shared-5.d,
    	* testsuite/ld-frv/fdpic-shared-7.d,
    	* testsuite/ld-frv/fdpic-shared-8.d,
    	* testsuite/ld-frv/tls-dynamic-2.d,
    	* testsuite/ld-i386/ibt-plt-1.d,
    	* testsuite/ld-i386/ibt-plt-2a.d,
    	* testsuite/ld-i386/ibt-plt-2b.d,
    	* testsuite/ld-i386/ibt-plt-2c.d,
    	* testsuite/ld-i386/ibt-plt-2d.d,
    	* testsuite/ld-i386/ibt-plt-3a.d,
    	* testsuite/ld-i386/ibt-plt-3b.d,
    	* testsuite/ld-i386/ibt-plt-3c.d,
    	* testsuite/ld-i386/ibt-plt-3d.d,
    	* testsuite/ld-i386/plt2.dd,
    	* testsuite/ld-i386/pr20830.d,
    	* testsuite/ld-i386/tlsbin-nacl.rd,
    	* testsuite/ld-i386/tlsbin.rd,
    	* testsuite/ld-i386/tlsbin2-nacl.rd,
    	* testsuite/ld-i386/tlsbin2.rd,
    	* testsuite/ld-i386/tlsbindesc-nacl.rd,
    	* testsuite/ld-i386/tlsbindesc.rd,
    	* testsuite/ld-i386/tlsdesc-nacl.rd,
    	* testsuite/ld-i386/tlsdesc.rd,
    	* testsuite/ld-i386/tlsgdesc-nacl.rd,
    	* testsuite/ld-i386/tlsgdesc.rd,
    	* testsuite/ld-i386/tlsnopic-nacl.rd,
    	* testsuite/ld-i386/tlsnopic.dd,
    	* testsuite/ld-i386/tlsnopic.rd,
    	* testsuite/ld-i386/tlsnopic.sd,
    	* testsuite/ld-i386/tlspic-nacl.rd,
    	* testsuite/ld-i386/tlspic.rd,
    	* testsuite/ld-i386/tlspic2-nacl.rd,
    	* testsuite/ld-i386/tlspic2.rd,
    	* testsuite/ld-ia64/merge1.d,
    	* testsuite/ld-ia64/merge2.d,
    	* testsuite/ld-ia64/merge3.d,
    	* testsuite/ld-ia64/merge4.d,
    	* testsuite/ld-ia64/merge5.d,
    	* testsuite/ld-ia64/tlsbin.rd,
    	* testsuite/ld-ia64/tlspic.rd,
    	* testsuite/ld-ifunc/ifunc-2-i386-now.d,
    	* testsuite/ld-ifunc/ifunc-2-local-i386-now.d,
    	* testsuite/ld-ifunc/ifunc-2-local-x86-64-now.d,
    	* testsuite/ld-ifunc/ifunc-2-local-x86-64.d,
    	* testsuite/ld-ifunc/ifunc-2-x86-64-now.d,
    	* testsuite/ld-ifunc/ifunc-2-x86-64.d,
    	* testsuite/ld-ifunc/pr17154-i386-now.d,
    	* testsuite/ld-ifunc/pr17154-i386.d,
    	* testsuite/ld-ifunc/pr17154-x86-64-now.d,
    	* testsuite/ld-ifunc/pr17154-x86-64.d,
    	* testsuite/ld-m68k/tls-def-1.d,
    	* testsuite/ld-m68k/tls-gd-1.d2,
    	* testsuite/ld-metag/shared.d,
    	* testsuite/ld-metag/stub_pic_app.d,
    	* testsuite/ld-mips-elf/rel32-n32.d,
    	* testsuite/ld-mips-elf/rel32-o32.d,
    	* testsuite/ld-mips-elf/rel64.d,
    	* testsuite/ld-powerpc/ambiguousv1.d,
    	* testsuite/ld-powerpc/ambiguousv1b.d,
    	* testsuite/ld-powerpc/ambiguousv2.d,
    	* testsuite/ld-powerpc/ambiguousv2b.d,
    	* testsuite/ld-powerpc/tlsexe.d,
    	* testsuite/ld-powerpc/tlsexe.r,
    	* testsuite/ld-powerpc/tlsexe32.d,
    	* testsuite/ld-powerpc/tlsexe32.g,
    	* testsuite/ld-powerpc/tlsexe32.r,
    	* testsuite/ld-powerpc/tlsexetoc.d,
    	* testsuite/ld-powerpc/tlsexetoc.r,
    	* testsuite/ld-powerpc/tlsso.d,
    	* testsuite/ld-powerpc/tlsso.r,
    	* testsuite/ld-powerpc/tlsso32.g,
    	* testsuite/ld-powerpc/tlsso32.r,
    	* testsuite/ld-powerpc/tlstocso.d,
    	* testsuite/ld-powerpc/tlstocso.g,
    	* testsuite/ld-powerpc/tlstocso.r,
    	* testsuite/ld-s390/gotreloc_31-1.dd,
    	* testsuite/ld-s390/tlsbin.dd,
    	* testsuite/ld-s390/tlsbin.rd,
    	* testsuite/ld-s390/tlsbin_64.dd,
    	* testsuite/ld-s390/tlsbin_64.rd,
    	* testsuite/ld-s390/tlspic.rd,
    	* testsuite/ld-s390/tlspic_64.rd,
    	* testsuite/ld-sh/tlsbin-2.d,
    	* testsuite/ld-sh/tlspic-2.d,
    	* testsuite/ld-sparc/gotop32.rd,
    	* testsuite/ld-sparc/gotop64.rd,
    	* testsuite/ld-sparc/tlssunbin32.rd,
    	* testsuite/ld-sparc/tlssunbin64.rd,
    	* testsuite/ld-sparc/tlssunnopic32.rd,
    	* testsuite/ld-sparc/tlssunnopic64.rd,
    	* testsuite/ld-sparc/tlssunpic32.rd,
    	* testsuite/ld-sparc/tlssunpic64.rd,
    	* testsuite/ld-x86-64/bnd-branch-1-now.d,
    	* testsuite/ld-x86-64/bnd-ifunc-1-now.d,
    	* testsuite/ld-x86-64/bnd-ifunc-2-now.d,
    	* testsuite/ld-x86-64/bnd-ifunc-2.d,
    	* testsuite/ld-x86-64/bnd-plt-1-now.d,
    	* testsuite/ld-x86-64/bnd-plt-1.d,
    	* testsuite/ld-x86-64/ibt-plt-1-x32.d,
    	* testsuite/ld-x86-64/ibt-plt-1.d,
    	* testsuite/ld-x86-64/ibt-plt-2a-x32.d,
    	* testsuite/ld-x86-64/ibt-plt-2a.d,
    	* testsuite/ld-x86-64/ibt-plt-2b-x32.d,
    	* testsuite/ld-x86-64/ibt-plt-2b.d,
    	* testsuite/ld-x86-64/ibt-plt-2c-x32.d,
    	* testsuite/ld-x86-64/ibt-plt-2c.d,
    	* testsuite/ld-x86-64/ibt-plt-2d-x32.d,
    	* testsuite/ld-x86-64/ibt-plt-2d.d,
    	* testsuite/ld-x86-64/ibt-plt-3a-x32.d,
    	* testsuite/ld-x86-64/ibt-plt-3a.d,
    	* testsuite/ld-x86-64/ibt-plt-3b-x32.d,
    	* testsuite/ld-x86-64/ibt-plt-3b.d,
    	* testsuite/ld-x86-64/ibt-plt-3c-x32.d,
    	* testsuite/ld-x86-64/ibt-plt-3c.d,
    	* testsuite/ld-x86-64/ibt-plt-3d-x32.d,
    	* testsuite/ld-x86-64/ibt-plt-3d.d,
    	* testsuite/ld-x86-64/ilp32-4-nacl.d,
    	* testsuite/ld-x86-64/ilp32-4.d,
    	* testsuite/ld-x86-64/load1c-nacl.d,
    	* testsuite/ld-x86-64/load1c.d,
    	* testsuite/ld-x86-64/load1d-nacl.d,
    	* testsuite/ld-x86-64/load1d.d,
    	* testsuite/ld-x86-64/mpx3n.dd,
    	* testsuite/ld-x86-64/mpx4.dd,
    	* testsuite/ld-x86-64/mpx4n.dd,
    	* testsuite/ld-x86-64/plt2.dd,
    	* testsuite/ld-x86-64/pr14207.d,
    	* testsuite/ld-x86-64/pr19162.d,
    	* testsuite/ld-x86-64/pr20253-1f.d,
    	* testsuite/ld-x86-64/pr20253-1l.d,
    	* testsuite/ld-x86-64/pr20830a-now.d,
    	* testsuite/ld-x86-64/pr20830a.d,
    	* testsuite/ld-x86-64/pr20830b-now.d,
    	* testsuite/ld-x86-64/pr20830b.d,
    	* testsuite/ld-x86-64/pr21038a-now.d,
    	* testsuite/ld-x86-64/pr21038a.d,
    	* testsuite/ld-x86-64/pr21038b-now.d,
    	* testsuite/ld-x86-64/pr21038b.d,
    	* testsuite/ld-x86-64/pr21038c-now.d,
    	* testsuite/ld-x86-64/pr21038c.d,
    	* testsuite/ld-x86-64/tlsbin-nacl.rd,
    	* testsuite/ld-x86-64/tlsbin.rd,
    	* testsuite/ld-x86-64/tlsbin2-nacl.rd,
    	* testsuite/ld-x86-64/tlsbin2.rd,
    	* testsuite/ld-x86-64/tlsbindesc-nacl.rd,
    	* testsuite/ld-x86-64/tlsbindesc.rd,
    	* testsuite/ld-x86-64/tlsdesc-nacl.rd,
    	* testsuite/ld-x86-64/tlsdesc.rd,
    	* testsuite/ld-x86-64/tlsgdesc-nacl.rd,
    	* testsuite/ld-x86-64/tlsgdesc.rd,
    	* testsuite/ld-x86-64/tlspic-nacl.rd,
    	* testsuite/ld-x86-64/tlspic.rd,
    	* testsuite/ld-x86-64/tlspic2-nacl.rd,
    	* testsuite/ld-x86-64/tlspic2.rd: Update.

Diff:
---
 ld/ChangeLog                                     | 279 +++++++++++++++++++++++
 ld/emulparams/aarch64cloudabi.sh                 |   6 +-
 ld/emulparams/aarch64elf.sh                      |   8 +-
 ld/emulparams/aarch64elf32.sh                    |   8 +-
 ld/emulparams/aarch64fbsd.sh                     |   6 +-
 ld/emulparams/aarch64linux.sh                    |   6 +-
 ld/emulparams/aarch64linux32.sh                  |   6 +-
 ld/emulparams/armelf.sh                          |   8 +-
 ld/emulparams/armelf_fuchsia.sh                  |   6 +-
 ld/emulparams/armelf_linux.sh                    |   6 +-
 ld/emulparams/armelf_phoenix.sh                  |   6 +-
 ld/emulparams/armnto.sh                          |   8 +-
 ld/emulparams/elf32bmip.sh                       |  16 +-
 ld/emulparams/elf32bmipn32-defs.sh               |  16 +-
 ld/emulparams/elf32frv.sh                        |   4 +-
 ld/emulparams/elf32lriscv-defs.sh                |   3 +-
 ld/emulparams/elf32mcore.sh                      |   4 +-
 ld/emulparams/elf32ppccommon.sh                  |   2 +-
 ld/emulparams/elf32rl78.sh                       |   8 +-
 ld/emulparams/i386nto.sh                         |   2 +-
 ld/emulparams/score3_elf.sh                      |  16 +-
 ld/emulparams/shelf_nto.sh                       |   2 +-
 ld/emulparams/shlelf_nto.sh                      |   2 +-
 ld/scripttempl/elf.sc                            |   8 +-
 ld/testsuite/ld-aarch64/ifunc-1-local.d          |   2 +-
 ld/testsuite/ld-aarch64/ifunc-1.d                |   2 +-
 ld/testsuite/ld-aarch64/ifunc-2-local.d          |   4 +-
 ld/testsuite/ld-aarch64/ifunc-2.d                |   4 +-
 ld/testsuite/ld-aarch64/ifunc-21.d               |   6 +-
 ld/testsuite/ld-aarch64/ifunc-3a.d               |   2 +-
 ld/testsuite/ld-alpha/tlsbin.rd                  |   3 -
 ld/testsuite/ld-alpha/tlsbin.sd                  |   2 +-
 ld/testsuite/ld-alpha/tlsbinr.rd                 |   5 +-
 ld/testsuite/ld-alpha/tlspic.rd                  |   6 -
 ld/testsuite/ld-alpha/tlspic.sd                  |   2 +-
 ld/testsuite/ld-cris/dso-pltdis1.d               |  62 ++---
 ld/testsuite/ld-cris/dso-pltdis2.d               |  66 +++---
 ld/testsuite/ld-cris/dso12-pltdis.d              |  70 +++---
 ld/testsuite/ld-cris/gotplt1.d                   |  38 +--
 ld/testsuite/ld-cris/gotplt2.d                   |  24 +-
 ld/testsuite/ld-cris/gotplt3.d                   |  26 +--
 ld/testsuite/ld-cris/hiddef1.d                   |   4 +-
 ld/testsuite/ld-cris/libdso-1.d                  |   2 +-
 ld/testsuite/ld-cris/libdso-10.d                 |  24 +-
 ld/testsuite/ld-cris/libdso-11.d                 |  18 +-
 ld/testsuite/ld-cris/libdso-12.d                 |  52 ++---
 ld/testsuite/ld-cris/libdso-12b.d                |  52 ++---
 ld/testsuite/ld-cris/libdso-12c.d                |  36 +--
 ld/testsuite/ld-cris/libdso-13.d                 |   4 +-
 ld/testsuite/ld-cris/libdso-13b.d                |   2 +-
 ld/testsuite/ld-cris/libdso-14.d                 |   8 +-
 ld/testsuite/ld-cris/libdso-15.d                 |  14 +-
 ld/testsuite/ld-cris/libdso-15b.d                |  20 +-
 ld/testsuite/ld-cris/libdso-1c.d                 |  20 +-
 ld/testsuite/ld-cris/libdso-1d.d                 |  26 +--
 ld/testsuite/ld-cris/libdso-2.d                  |  13 +-
 ld/testsuite/ld-cris/pic-gc-72.d                 |   8 +-
 ld/testsuite/ld-cris/pic-gc-73.d                 |   6 +-
 ld/testsuite/ld-cris/pr16044.d                   |  11 +-
 ld/testsuite/ld-cris/pv32-1.d                    |  35 ++-
 ld/testsuite/ld-cris/tls-dso-dtpoffd2.d          |   8 +-
 ld/testsuite/ld-cris/tls-dso-dtpoffd4.d          |   8 +-
 ld/testsuite/ld-cris/tls-dso-tpoffgotcomm1.d     |  18 +-
 ld/testsuite/ld-cris/tls-gc-71.d                 |  13 +-
 ld/testsuite/ld-cris/tls-gd-1.d                  |  24 +-
 ld/testsuite/ld-cris/tls-gd-1h.d                 |  24 +-
 ld/testsuite/ld-cris/tls-gd-2.d                  |  24 +-
 ld/testsuite/ld-cris/tls-gd-2h.d                 |  24 +-
 ld/testsuite/ld-cris/tls-ie-10.d                 |  22 +-
 ld/testsuite/ld-cris/tls-ie-11.d                 |  26 +--
 ld/testsuite/ld-cris/tls-ie-78.d                 |   6 +-
 ld/testsuite/ld-cris/tls-ie-8.d                  |  22 +-
 ld/testsuite/ld-cris/tls-ie-9.d                  |  26 +--
 ld/testsuite/ld-cris/tls-js1.d                   |  14 +-
 ld/testsuite/ld-cris/tls-ld-4.d                  |  24 +-
 ld/testsuite/ld-cris/tls-ld-5.d                  |  24 +-
 ld/testsuite/ld-cris/tls-ld-6.d                  |  24 +-
 ld/testsuite/ld-cris/tls-ld-7.d                  |  24 +-
 ld/testsuite/ld-cris/tls-ldgd-14.d               |  30 +--
 ld/testsuite/ld-cris/tls-ldgd-15.d               |  32 +--
 ld/testsuite/ld-cris/tls-ldgdex-14.d             |  14 +-
 ld/testsuite/ld-cris/tls-ldgdex-15.d             |  14 +-
 ld/testsuite/ld-cris/tls-ldgdx-14.d              |  14 +-
 ld/testsuite/ld-cris/tls-ldgdx-15.d              |  16 +-
 ld/testsuite/ld-cris/tls-legdx-16.d              |  12 +-
 ld/testsuite/ld-cris/tls-legdx-17.d              |  12 +-
 ld/testsuite/ld-cris/tls-local-54.d              |   8 +-
 ld/testsuite/ld-cris/tls-local-60.d              |  12 +-
 ld/testsuite/ld-cris/tls-local-61.d              |  12 +-
 ld/testsuite/ld-cris/tls-local-63.d              |  12 +-
 ld/testsuite/ld-cris/tls-local-64.d              |  16 +-
 ld/testsuite/ld-cris/tls-ok-30.d                 |  18 +-
 ld/testsuite/ld-cris/tls-ok-32.d                 |  12 +-
 ld/testsuite/ld-cris/tls-ok-34.d                 |  16 +-
 ld/testsuite/ld-cris/tls-und-38.d                |   6 +-
 ld/testsuite/ld-cris/tls-und-42.d                |   4 +-
 ld/testsuite/ld-cris/tls-und-46.d                |   6 +-
 ld/testsuite/ld-cris/tls-und-50.d                |   4 +-
 ld/testsuite/ld-cris/weakhiddso.d                |  13 +-
 ld/testsuite/ld-cris/weakref2.d                  |   2 +-
 ld/testsuite/ld-elf/pr23161.map                  |   4 +
 ld/testsuite/ld-elf/pr23161a.c                   |   9 +
 ld/testsuite/ld-elf/pr23161a.rd                  |  19 ++
 ld/testsuite/ld-elf/pr23161b.c                   |  23 ++
 ld/testsuite/ld-elf/pr23161b.rd                  |  14 ++
 ld/testsuite/ld-elf/pr23161c.c                   |   9 +
 ld/testsuite/ld-elf/pr23161c.rd                  |  12 +
 ld/testsuite/ld-elf/pr23161d.rd                  |   8 +
 ld/testsuite/ld-elf/pr23162.rd                   |   9 +-
 ld/testsuite/ld-elf/shared.exp                   |  60 +++++
 ld/testsuite/ld-frv/fdpic-shared-1.d             |   6 +-
 ld/testsuite/ld-frv/fdpic-shared-2.d             |  14 +-
 ld/testsuite/ld-frv/fdpic-shared-3.d             |   6 +-
 ld/testsuite/ld-frv/fdpic-shared-4.d             |   6 +-
 ld/testsuite/ld-frv/fdpic-shared-5.d             |   8 +-
 ld/testsuite/ld-frv/fdpic-shared-7.d             |   6 +-
 ld/testsuite/ld-frv/fdpic-shared-8.d             |   6 +-
 ld/testsuite/ld-frv/tls-dynamic-2.d              |  18 +-
 ld/testsuite/ld-i386/ibt-plt-1.d                 |  20 +-
 ld/testsuite/ld-i386/ibt-plt-2a.d                |  20 +-
 ld/testsuite/ld-i386/ibt-plt-2b.d                |  20 +-
 ld/testsuite/ld-i386/ibt-plt-2c.d                |  20 +-
 ld/testsuite/ld-i386/ibt-plt-2d.d                |  20 +-
 ld/testsuite/ld-i386/ibt-plt-3a.d                |  20 +-
 ld/testsuite/ld-i386/ibt-plt-3b.d                |  20 +-
 ld/testsuite/ld-i386/ibt-plt-3c.d                |  20 +-
 ld/testsuite/ld-i386/ibt-plt-3d.d                |  20 +-
 ld/testsuite/ld-i386/plt2.dd                     |  26 +--
 ld/testsuite/ld-i386/pr20830.d                   |  18 +-
 ld/testsuite/ld-i386/tlsbin-nacl.rd              |   3 -
 ld/testsuite/ld-i386/tlsbin.rd                   |   3 -
 ld/testsuite/ld-i386/tlsbin2-nacl.rd             |   3 -
 ld/testsuite/ld-i386/tlsbin2.rd                  |   3 -
 ld/testsuite/ld-i386/tlsbindesc-nacl.rd          |   9 +-
 ld/testsuite/ld-i386/tlsbindesc.rd               |   9 +-
 ld/testsuite/ld-i386/tlsdesc-nacl.rd             |   6 -
 ld/testsuite/ld-i386/tlsdesc.rd                  |   6 -
 ld/testsuite/ld-i386/tlsgdesc-nacl.rd            |   6 -
 ld/testsuite/ld-i386/tlsgdesc.rd                 |   6 -
 ld/testsuite/ld-i386/tlsnopic-nacl.rd            |  14 +-
 ld/testsuite/ld-i386/tlsnopic.dd                 |  12 +-
 ld/testsuite/ld-i386/tlsnopic.rd                 |   6 -
 ld/testsuite/ld-i386/tlsnopic.sd                 |   4 +-
 ld/testsuite/ld-i386/tlspic-nacl.rd              |   6 -
 ld/testsuite/ld-i386/tlspic.rd                   |   6 -
 ld/testsuite/ld-i386/tlspic2-nacl.rd             |   6 -
 ld/testsuite/ld-i386/tlspic2.rd                  |   6 -
 ld/testsuite/ld-ia64/merge1.d                    |   2 +-
 ld/testsuite/ld-ia64/merge2.d                    |   2 +-
 ld/testsuite/ld-ia64/merge3.d                    |   2 +-
 ld/testsuite/ld-ia64/merge4.d                    |   2 +-
 ld/testsuite/ld-ia64/merge5.d                    |   2 +-
 ld/testsuite/ld-ia64/tlsbin.rd                   |   3 -
 ld/testsuite/ld-ia64/tlspic.rd                   |   6 -
 ld/testsuite/ld-ifunc/ifunc-2-i386-now.d         |  14 +-
 ld/testsuite/ld-ifunc/ifunc-2-local-i386-now.d   |  14 +-
 ld/testsuite/ld-ifunc/ifunc-2-local-x86-64-now.d |  20 +-
 ld/testsuite/ld-ifunc/ifunc-2-local-x86-64.d     |   4 +-
 ld/testsuite/ld-ifunc/ifunc-2-x86-64-now.d       |  20 +-
 ld/testsuite/ld-ifunc/ifunc-2-x86-64.d           |   4 +-
 ld/testsuite/ld-ifunc/pr17154-i386-now.d         |  34 +--
 ld/testsuite/ld-ifunc/pr17154-i386.d             |  34 +--
 ld/testsuite/ld-ifunc/pr17154-x86-64-now.d       |  46 ++--
 ld/testsuite/ld-ifunc/pr17154-x86-64.d           |  64 +++---
 ld/testsuite/ld-m68k/tls-def-1.d                 |   3 -
 ld/testsuite/ld-m68k/tls-gd-1.d2                 |   3 -
 ld/testsuite/ld-metag/shared.d                   |   4 +-
 ld/testsuite/ld-metag/stub_pic_app.d             |   8 +-
 ld/testsuite/ld-mips-elf/rel32-n32.d             |   6 +-
 ld/testsuite/ld-mips-elf/rel32-o32.d             |   6 +-
 ld/testsuite/ld-mips-elf/rel64.d                 |   6 +-
 ld/testsuite/ld-powerpc/ambiguousv1.d            |   2 +-
 ld/testsuite/ld-powerpc/ambiguousv1b.d           |   2 +-
 ld/testsuite/ld-powerpc/ambiguousv2.d            |   3 +-
 ld/testsuite/ld-powerpc/ambiguousv2b.d           |   2 +-
 ld/testsuite/ld-powerpc/tlsexe.d                 |   4 +-
 ld/testsuite/ld-powerpc/tlsexe.r                 |   3 -
 ld/testsuite/ld-powerpc/tlsexe32.d               |   8 +-
 ld/testsuite/ld-powerpc/tlsexe32.g               |   2 +-
 ld/testsuite/ld-powerpc/tlsexe32.r               |   4 -
 ld/testsuite/ld-powerpc/tlsexetoc.d              |   4 +-
 ld/testsuite/ld-powerpc/tlsexetoc.r              |   3 -
 ld/testsuite/ld-powerpc/tlsso.d                  |   4 +-
 ld/testsuite/ld-powerpc/tlsso.r                  |   8 +-
 ld/testsuite/ld-powerpc/tlsso32.g                |   2 +-
 ld/testsuite/ld-powerpc/tlsso32.r                |  14 +-
 ld/testsuite/ld-powerpc/tlstocso.d               |   4 +-
 ld/testsuite/ld-powerpc/tlstocso.g               |   2 +-
 ld/testsuite/ld-powerpc/tlstocso.r               |  10 +-
 ld/testsuite/ld-s390/gotreloc_31-1.dd            |   6 +-
 ld/testsuite/ld-s390/tlsbin.dd                   |   2 +-
 ld/testsuite/ld-s390/tlsbin.rd                   |   3 -
 ld/testsuite/ld-s390/tlsbin_64.dd                |   2 +-
 ld/testsuite/ld-s390/tlsbin_64.rd                |   3 -
 ld/testsuite/ld-s390/tlspic.rd                   |   6 -
 ld/testsuite/ld-s390/tlspic_64.rd                |   6 -
 ld/testsuite/ld-sh/tlsbin-2.d                    |   2 -
 ld/testsuite/ld-sh/tlspic-2.d                    |   2 -
 ld/testsuite/ld-sparc/gotop32.rd                 |   6 -
 ld/testsuite/ld-sparc/gotop64.rd                 |   6 -
 ld/testsuite/ld-sparc/tlssunbin32.rd             |   3 -
 ld/testsuite/ld-sparc/tlssunbin64.rd             |   3 -
 ld/testsuite/ld-sparc/tlssunnopic32.rd           |   6 -
 ld/testsuite/ld-sparc/tlssunnopic64.rd           |   6 -
 ld/testsuite/ld-sparc/tlssunpic32.rd             |   6 -
 ld/testsuite/ld-sparc/tlssunpic64.rd             |   6 -
 ld/testsuite/ld-x86-64/bnd-branch-1-now.d        |  44 ++--
 ld/testsuite/ld-x86-64/bnd-ifunc-1-now.d         |  18 +-
 ld/testsuite/ld-x86-64/bnd-ifunc-2-now.d         |  46 ++--
 ld/testsuite/ld-x86-64/bnd-ifunc-2.d             |  46 ++--
 ld/testsuite/ld-x86-64/bnd-plt-1-now.d           |  44 ++--
 ld/testsuite/ld-x86-64/bnd-plt-1.d               |  44 ++--
 ld/testsuite/ld-x86-64/ibt-plt-1-x32.d           |  24 +-
 ld/testsuite/ld-x86-64/ibt-plt-1.d               |  24 +-
 ld/testsuite/ld-x86-64/ibt-plt-2a-x32.d          |  24 +-
 ld/testsuite/ld-x86-64/ibt-plt-2a.d              |  24 +-
 ld/testsuite/ld-x86-64/ibt-plt-2b-x32.d          |  14 +-
 ld/testsuite/ld-x86-64/ibt-plt-2b.d              |  14 +-
 ld/testsuite/ld-x86-64/ibt-plt-2c-x32.d          |  24 +-
 ld/testsuite/ld-x86-64/ibt-plt-2c.d              |  24 +-
 ld/testsuite/ld-x86-64/ibt-plt-2d-x32.d          |  14 +-
 ld/testsuite/ld-x86-64/ibt-plt-2d.d              |  15 +-
 ld/testsuite/ld-x86-64/ibt-plt-3a-x32.d          |  24 +-
 ld/testsuite/ld-x86-64/ibt-plt-3a.d              |  24 +-
 ld/testsuite/ld-x86-64/ibt-plt-3b-x32.d          |  14 +-
 ld/testsuite/ld-x86-64/ibt-plt-3b.d              |  14 +-
 ld/testsuite/ld-x86-64/ibt-plt-3c-x32.d          |  24 +-
 ld/testsuite/ld-x86-64/ibt-plt-3c.d              |  24 +-
 ld/testsuite/ld-x86-64/ibt-plt-3d-x32.d          |  14 +-
 ld/testsuite/ld-x86-64/ibt-plt-3d.d              |  14 +-
 ld/testsuite/ld-x86-64/ilp32-4-nacl.d            |  16 +-
 ld/testsuite/ld-x86-64/ilp32-4.d                 |   8 +-
 ld/testsuite/ld-x86-64/load1c-nacl.d             |  72 +++---
 ld/testsuite/ld-x86-64/load1c.d                  |  72 +++---
 ld/testsuite/ld-x86-64/load1d-nacl.d             |  72 +++---
 ld/testsuite/ld-x86-64/load1d.d                  |  72 +++---
 ld/testsuite/ld-x86-64/mpx3n.dd                  |  18 +-
 ld/testsuite/ld-x86-64/mpx4.dd                   |  26 +--
 ld/testsuite/ld-x86-64/mpx4n.dd                  |  16 +-
 ld/testsuite/ld-x86-64/plt2.dd                   |  26 +--
 ld/testsuite/ld-x86-64/pr14207.d                 |   4 +-
 ld/testsuite/ld-x86-64/pr19162.d                 |   2 +-
 ld/testsuite/ld-x86-64/pr20253-1f.d              |  18 +-
 ld/testsuite/ld-x86-64/pr20253-1l.d              |  18 +-
 ld/testsuite/ld-x86-64/pr20830a-now.d            |  26 +--
 ld/testsuite/ld-x86-64/pr20830a.d                |  26 +--
 ld/testsuite/ld-x86-64/pr20830b-now.d            |  26 +--
 ld/testsuite/ld-x86-64/pr20830b.d                |  26 +--
 ld/testsuite/ld-x86-64/pr21038a-now.d            |  26 +--
 ld/testsuite/ld-x86-64/pr21038a.d                |  26 +--
 ld/testsuite/ld-x86-64/pr21038b-now.d            |  26 +--
 ld/testsuite/ld-x86-64/pr21038b.d                |  26 +--
 ld/testsuite/ld-x86-64/pr21038c-now.d            |  36 +--
 ld/testsuite/ld-x86-64/pr21038c.d                |  36 +--
 ld/testsuite/ld-x86-64/tlsbin-nacl.rd            |  21 +-
 ld/testsuite/ld-x86-64/tlsbin.rd                 |   3 -
 ld/testsuite/ld-x86-64/tlsbin2-nacl.rd           |  21 +-
 ld/testsuite/ld-x86-64/tlsbin2.rd                |   3 -
 ld/testsuite/ld-x86-64/tlsbindesc-nacl.rd        |  33 ++-
 ld/testsuite/ld-x86-64/tlsbindesc.rd             |   7 +-
 ld/testsuite/ld-x86-64/tlsdesc-nacl.rd           |  54 ++---
 ld/testsuite/ld-x86-64/tlsdesc.rd                |  10 +-
 ld/testsuite/ld-x86-64/tlsgdesc-nacl.rd          |  14 +-
 ld/testsuite/ld-x86-64/tlsgdesc.rd               |  14 +-
 ld/testsuite/ld-x86-64/tlspic-nacl.rd            |  24 +-
 ld/testsuite/ld-x86-64/tlspic.rd                 |   6 -
 ld/testsuite/ld-x86-64/tlspic2-nacl.rd           |  24 +-
 ld/testsuite/ld-x86-64/tlspic2.rd                |   6 -
 268 files changed, 2241 insertions(+), 2108 deletions(-)

diff --git a/ld/ChangeLog b/ld/ChangeLog
index 070e21d..0dcfcbb 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,282 @@
+2018-06-08  H.J. Lu  <hongjiu.lu@intel.com>
+	    Alan Modra  <amodra@gmail.com>
+
+	PR ld/23161
+	* emulparams/aarch64cloudabi.sh: PROVIDE __bss_start__, _bss_end__,
+	and __end__ in shared libraries.
+	* emulparams/aarch64fbsd.sh: Likewise.
+	* emulparams/aarch64linux.sh: Likewise.
+	* emulparams/aarch64linux32.sh: Likewise.
+	* emulparams/armelf_fuchsia.sh: Likewise.
+	* emulparams/armelf_linux.sh: Likewise.
+	* emulparams/armelf_phoenix.sh: Likewise.
+	* emulparams/aarch64elf.sh: Likewise, and __data_start
+	* emulparams/aarch64elf32.sh: Likewise.
+	* emulparams/armelf.sh: Likewise.
+	* emulparams/armnto.sh: Likewise.
+	* emulparams/elf32bmip.sh: Remove duplicate ". = ." from
+	OTHER_GOT_SYMBOLS.  PROVIDE _ftext, _fdata, and _fbss in shared libs.
+	* emulparams/elf32bmipn32-defs.sh: Likewise.
+	* emulparams/elf32frv.sh: PROVIDE __end and __data_start in shared libs.
+	* emulparams/elf32lriscv-defs.sh: Tidy.
+	* emulparams/elf32mcore.sh: PROVIDE __bss_start and _bss_end in
+	shared libs
+	* emulparams/elf32ppccommon.sh: PROVIDE __end in shared libs.
+	* emulparams/elf32rl78.sh: Tidy.
+	* emulparams/i386nto.sh: PROVIDE _btext in shared libs.
+	* emulparams/shelf_nto.sh: Likewise.
+	* emulparams/shlelf_nto.sh: Likewise.
+	* emulparams/score3_elf.sh: PROVIDE _gp, _bss_start__, _bss_end__,
+	__bss_end__, __end__, _fdata, _sdata_begin, and _bss_start in
+	shared libs.
+	* scripttempl/elf.sc: Don't use EXECUTABLE_SYMBOLS for shared
+	libraries.  PROVIDE _edata, edata, __bss_start, and _end in shared
+	libraries.
+	* testsuite/ld-elf/pr23161.map,
+	* testsuite/ld-elf/pr23161a.c,
+	* testsuite/ld-elf/pr23161b.c,
+	* testsuite/ld-elf/pr23161c.c,
+	* testsuite/ld-elf/pr23161a.rd,
+	* testsuite/ld-elf/pr23161b.rd,
+	* testsuite/ld-elf/pr23161c.rd,
+	* testsuite/ld-elf/pr23161d.rd: New tests.
+	* testsuite/ld-elf/shared.exp: Run ld/23161 tests.
+	* testsuite/ld-elf/pr23162.rd,
+	* testsuite/ld-aarch64/ifunc-1-local.d,
+	* testsuite/ld-aarch64/ifunc-1.d,
+	* testsuite/ld-aarch64/ifunc-2-local.d,
+	* testsuite/ld-aarch64/ifunc-2.d,
+	* testsuite/ld-aarch64/ifunc-21.d,
+	* testsuite/ld-aarch64/ifunc-3a.d,
+	* testsuite/ld-alpha/tlsbin.rd,
+	* testsuite/ld-alpha/tlsbin.sd,
+	* testsuite/ld-alpha/tlsbinr.rd,
+	* testsuite/ld-alpha/tlspic.rd,
+	* testsuite/ld-alpha/tlspic.sd,
+	* testsuite/ld-cris/dso-pltdis1.d,
+	* testsuite/ld-cris/dso-pltdis2.d,
+	* testsuite/ld-cris/dso12-pltdis.d,
+	* testsuite/ld-cris/gotplt1.d,
+	* testsuite/ld-cris/gotplt2.d,
+	* testsuite/ld-cris/gotplt3.d,
+	* testsuite/ld-cris/hiddef1.d,
+	* testsuite/ld-cris/libdso-1.d,
+	* testsuite/ld-cris/libdso-10.d,
+	* testsuite/ld-cris/libdso-11.d,
+	* testsuite/ld-cris/libdso-12.d,
+	* testsuite/ld-cris/libdso-12b.d,
+	* testsuite/ld-cris/libdso-12c.d,
+	* testsuite/ld-cris/libdso-13.d,
+	* testsuite/ld-cris/libdso-13b.d,
+	* testsuite/ld-cris/libdso-14.d,
+	* testsuite/ld-cris/libdso-15.d,
+	* testsuite/ld-cris/libdso-15b.d,
+	* testsuite/ld-cris/libdso-1c.d,
+	* testsuite/ld-cris/libdso-1d.d,
+	* testsuite/ld-cris/libdso-2.d,
+	* testsuite/ld-cris/pic-gc-72.d,
+	* testsuite/ld-cris/pic-gc-73.d,
+	* testsuite/ld-cris/pr16044.d,
+	* testsuite/ld-cris/pv32-1.d,
+	* testsuite/ld-cris/tls-dso-dtpoffd2.d,
+	* testsuite/ld-cris/tls-dso-dtpoffd4.d,
+	* testsuite/ld-cris/tls-dso-tpoffgotcomm1.d,
+	* testsuite/ld-cris/tls-gc-71.d,
+	* testsuite/ld-cris/tls-gd-1.d,
+	* testsuite/ld-cris/tls-gd-1h.d,
+	* testsuite/ld-cris/tls-gd-2.d,
+	* testsuite/ld-cris/tls-gd-2h.d,
+	* testsuite/ld-cris/tls-ie-10.d,
+	* testsuite/ld-cris/tls-ie-11.d,
+	* testsuite/ld-cris/tls-ie-78.d,
+	* testsuite/ld-cris/tls-ie-8.d,
+	* testsuite/ld-cris/tls-ie-9.d,
+	* testsuite/ld-cris/tls-js1.d,
+	* testsuite/ld-cris/tls-ld-4.d,
+	* testsuite/ld-cris/tls-ld-5.d,
+	* testsuite/ld-cris/tls-ld-6.d,
+	* testsuite/ld-cris/tls-ld-7.d,
+	* testsuite/ld-cris/tls-ldgd-14.d,
+	* testsuite/ld-cris/tls-ldgd-15.d,
+	* testsuite/ld-cris/tls-ldgdex-14.d,
+	* testsuite/ld-cris/tls-ldgdex-15.d,
+	* testsuite/ld-cris/tls-ldgdx-14.d,
+	* testsuite/ld-cris/tls-ldgdx-15.d,
+	* testsuite/ld-cris/tls-legdx-16.d,
+	* testsuite/ld-cris/tls-legdx-17.d,
+	* testsuite/ld-cris/tls-local-54.d,
+	* testsuite/ld-cris/tls-local-60.d,
+	* testsuite/ld-cris/tls-local-61.d,
+	* testsuite/ld-cris/tls-local-63.d,
+	* testsuite/ld-cris/tls-local-64.d,
+	* testsuite/ld-cris/tls-ok-30.d,
+	* testsuite/ld-cris/tls-ok-32.d,
+	* testsuite/ld-cris/tls-ok-34.d,
+	* testsuite/ld-cris/tls-und-38.d,
+	* testsuite/ld-cris/tls-und-42.d,
+	* testsuite/ld-cris/tls-und-46.d,
+	* testsuite/ld-cris/tls-und-50.d,
+	* testsuite/ld-cris/weakhiddso.d,
+	* testsuite/ld-cris/weakref2.d,
+	* testsuite/ld-frv/fdpic-shared-1.d,
+	* testsuite/ld-frv/fdpic-shared-2.d,
+	* testsuite/ld-frv/fdpic-shared-3.d,
+	* testsuite/ld-frv/fdpic-shared-4.d,
+	* testsuite/ld-frv/fdpic-shared-5.d,
+	* testsuite/ld-frv/fdpic-shared-7.d,
+	* testsuite/ld-frv/fdpic-shared-8.d,
+	* testsuite/ld-frv/tls-dynamic-2.d,
+	* testsuite/ld-i386/ibt-plt-1.d,
+	* testsuite/ld-i386/ibt-plt-2a.d,
+	* testsuite/ld-i386/ibt-plt-2b.d,
+	* testsuite/ld-i386/ibt-plt-2c.d,
+	* testsuite/ld-i386/ibt-plt-2d.d,
+	* testsuite/ld-i386/ibt-plt-3a.d,
+	* testsuite/ld-i386/ibt-plt-3b.d,
+	* testsuite/ld-i386/ibt-plt-3c.d,
+	* testsuite/ld-i386/ibt-plt-3d.d,
+	* testsuite/ld-i386/plt2.dd,
+	* testsuite/ld-i386/pr20830.d,
+	* testsuite/ld-i386/tlsbin-nacl.rd,
+	* testsuite/ld-i386/tlsbin.rd,
+	* testsuite/ld-i386/tlsbin2-nacl.rd,
+	* testsuite/ld-i386/tlsbin2.rd,
+	* testsuite/ld-i386/tlsbindesc-nacl.rd,
+	* testsuite/ld-i386/tlsbindesc.rd,
+	* testsuite/ld-i386/tlsdesc-nacl.rd,
+	* testsuite/ld-i386/tlsdesc.rd,
+	* testsuite/ld-i386/tlsgdesc-nacl.rd,
+	* testsuite/ld-i386/tlsgdesc.rd,
+	* testsuite/ld-i386/tlsnopic-nacl.rd,
+	* testsuite/ld-i386/tlsnopic.dd,
+	* testsuite/ld-i386/tlsnopic.rd,
+	* testsuite/ld-i386/tlsnopic.sd,
+	* testsuite/ld-i386/tlspic-nacl.rd,
+	* testsuite/ld-i386/tlspic.rd,
+	* testsuite/ld-i386/tlspic2-nacl.rd,
+	* testsuite/ld-i386/tlspic2.rd,
+	* testsuite/ld-ia64/merge1.d,
+	* testsuite/ld-ia64/merge2.d,
+	* testsuite/ld-ia64/merge3.d,
+	* testsuite/ld-ia64/merge4.d,
+	* testsuite/ld-ia64/merge5.d,
+	* testsuite/ld-ia64/tlsbin.rd,
+	* testsuite/ld-ia64/tlspic.rd,
+	* testsuite/ld-ifunc/ifunc-2-i386-now.d,
+	* testsuite/ld-ifunc/ifunc-2-local-i386-now.d,
+	* testsuite/ld-ifunc/ifunc-2-local-x86-64-now.d,
+	* testsuite/ld-ifunc/ifunc-2-local-x86-64.d,
+	* testsuite/ld-ifunc/ifunc-2-x86-64-now.d,
+	* testsuite/ld-ifunc/ifunc-2-x86-64.d,
+	* testsuite/ld-ifunc/pr17154-i386-now.d,
+	* testsuite/ld-ifunc/pr17154-i386.d,
+	* testsuite/ld-ifunc/pr17154-x86-64-now.d,
+	* testsuite/ld-ifunc/pr17154-x86-64.d,
+	* testsuite/ld-m68k/tls-def-1.d,
+	* testsuite/ld-m68k/tls-gd-1.d2,
+	* testsuite/ld-metag/shared.d,
+	* testsuite/ld-metag/stub_pic_app.d,
+	* testsuite/ld-mips-elf/rel32-n32.d,
+	* testsuite/ld-mips-elf/rel32-o32.d,
+	* testsuite/ld-mips-elf/rel64.d,
+	* testsuite/ld-powerpc/ambiguousv1.d,
+	* testsuite/ld-powerpc/ambiguousv1b.d,
+	* testsuite/ld-powerpc/ambiguousv2.d,
+	* testsuite/ld-powerpc/ambiguousv2b.d,
+	* testsuite/ld-powerpc/tlsexe.d,
+	* testsuite/ld-powerpc/tlsexe.r,
+	* testsuite/ld-powerpc/tlsexe32.d,
+	* testsuite/ld-powerpc/tlsexe32.g,
+	* testsuite/ld-powerpc/tlsexe32.r,
+	* testsuite/ld-powerpc/tlsexetoc.d,
+	* testsuite/ld-powerpc/tlsexetoc.r,
+	* testsuite/ld-powerpc/tlsso.d,
+	* testsuite/ld-powerpc/tlsso.r,
+	* testsuite/ld-powerpc/tlsso32.g,
+	* testsuite/ld-powerpc/tlsso32.r,
+	* testsuite/ld-powerpc/tlstocso.d,
+	* testsuite/ld-powerpc/tlstocso.g,
+	* testsuite/ld-powerpc/tlstocso.r,
+	* testsuite/ld-s390/gotreloc_31-1.dd,
+	* testsuite/ld-s390/tlsbin.dd,
+	* testsuite/ld-s390/tlsbin.rd,
+	* testsuite/ld-s390/tlsbin_64.dd,
+	* testsuite/ld-s390/tlsbin_64.rd,
+	* testsuite/ld-s390/tlspic.rd,
+	* testsuite/ld-s390/tlspic_64.rd,
+	* testsuite/ld-sh/tlsbin-2.d,
+	* testsuite/ld-sh/tlspic-2.d,
+	* testsuite/ld-sparc/gotop32.rd,
+	* testsuite/ld-sparc/gotop64.rd,
+	* testsuite/ld-sparc/tlssunbin32.rd,
+	* testsuite/ld-sparc/tlssunbin64.rd,
+	* testsuite/ld-sparc/tlssunnopic32.rd,
+	* testsuite/ld-sparc/tlssunnopic64.rd,
+	* testsuite/ld-sparc/tlssunpic32.rd,
+	* testsuite/ld-sparc/tlssunpic64.rd,
+	* testsuite/ld-x86-64/bnd-branch-1-now.d,
+	* testsuite/ld-x86-64/bnd-ifunc-1-now.d,
+	* testsuite/ld-x86-64/bnd-ifunc-2-now.d,
+	* testsuite/ld-x86-64/bnd-ifunc-2.d,
+	* testsuite/ld-x86-64/bnd-plt-1-now.d,
+	* testsuite/ld-x86-64/bnd-plt-1.d,
+	* testsuite/ld-x86-64/ibt-plt-1-x32.d,
+	* testsuite/ld-x86-64/ibt-plt-1.d,
+	* testsuite/ld-x86-64/ibt-plt-2a-x32.d,
+	* testsuite/ld-x86-64/ibt-plt-2a.d,
+	* testsuite/ld-x86-64/ibt-plt-2b-x32.d,
+	* testsuite/ld-x86-64/ibt-plt-2b.d,
+	* testsuite/ld-x86-64/ibt-plt-2c-x32.d,
+	* testsuite/ld-x86-64/ibt-plt-2c.d,
+	* testsuite/ld-x86-64/ibt-plt-2d-x32.d,
+	* testsuite/ld-x86-64/ibt-plt-2d.d,
+	* testsuite/ld-x86-64/ibt-plt-3a-x32.d,
+	* testsuite/ld-x86-64/ibt-plt-3a.d,
+	* testsuite/ld-x86-64/ibt-plt-3b-x32.d,
+	* testsuite/ld-x86-64/ibt-plt-3b.d,
+	* testsuite/ld-x86-64/ibt-plt-3c-x32.d,
+	* testsuite/ld-x86-64/ibt-plt-3c.d,
+	* testsuite/ld-x86-64/ibt-plt-3d-x32.d,
+	* testsuite/ld-x86-64/ibt-plt-3d.d,
+	* testsuite/ld-x86-64/ilp32-4-nacl.d,
+	* testsuite/ld-x86-64/ilp32-4.d,
+	* testsuite/ld-x86-64/load1c-nacl.d,
+	* testsuite/ld-x86-64/load1c.d,
+	* testsuite/ld-x86-64/load1d-nacl.d,
+	* testsuite/ld-x86-64/load1d.d,
+	* testsuite/ld-x86-64/mpx3n.dd,
+	* testsuite/ld-x86-64/mpx4.dd,
+	* testsuite/ld-x86-64/mpx4n.dd,
+	* testsuite/ld-x86-64/plt2.dd,
+	* testsuite/ld-x86-64/pr14207.d,
+	* testsuite/ld-x86-64/pr19162.d,
+	* testsuite/ld-x86-64/pr20253-1f.d,
+	* testsuite/ld-x86-64/pr20253-1l.d,
+	* testsuite/ld-x86-64/pr20830a-now.d,
+	* testsuite/ld-x86-64/pr20830a.d,
+	* testsuite/ld-x86-64/pr20830b-now.d,
+	* testsuite/ld-x86-64/pr20830b.d,
+	* testsuite/ld-x86-64/pr21038a-now.d,
+	* testsuite/ld-x86-64/pr21038a.d,
+	* testsuite/ld-x86-64/pr21038b-now.d,
+	* testsuite/ld-x86-64/pr21038b.d,
+	* testsuite/ld-x86-64/pr21038c-now.d,
+	* testsuite/ld-x86-64/pr21038c.d,
+	* testsuite/ld-x86-64/tlsbin-nacl.rd,
+	* testsuite/ld-x86-64/tlsbin.rd,
+	* testsuite/ld-x86-64/tlsbin2-nacl.rd,
+	* testsuite/ld-x86-64/tlsbin2.rd,
+	* testsuite/ld-x86-64/tlsbindesc-nacl.rd,
+	* testsuite/ld-x86-64/tlsbindesc.rd,
+	* testsuite/ld-x86-64/tlsdesc-nacl.rd,
+	* testsuite/ld-x86-64/tlsdesc.rd,
+	* testsuite/ld-x86-64/tlsgdesc-nacl.rd,
+	* testsuite/ld-x86-64/tlsgdesc.rd,
+	* testsuite/ld-x86-64/tlspic-nacl.rd,
+	* testsuite/ld-x86-64/tlspic.rd,
+	* testsuite/ld-x86-64/tlspic2-nacl.rd,
+	* testsuite/ld-x86-64/tlspic2.rd: Update.
+
 2018-06-07  Alan Modra  <amodra@gmail.com>
 
 	* emulparams/elf64bmip.sh (EXECUTABLE_SYMBOLS): Don't define.
diff --git a/ld/emulparams/aarch64cloudabi.sh b/ld/emulparams/aarch64cloudabi.sh
index 6223f26..1b8ca15 100644
--- a/ld/emulparams/aarch64cloudabi.sh
+++ b/ld/emulparams/aarch64cloudabi.sh
@@ -27,9 +27,9 @@ DATA_START_SYMBOLS='PROVIDE (__data_start = .);';
 # AArch64 does not support .s* sections.
 NO_SMALL_DATA=yes
 
-OTHER_BSS_SYMBOLS='__bss_start__ = .;'
-OTHER_BSS_END_SYMBOLS='_bss_end__ = . ; __bss_end__ = . ;'
-OTHER_END_SYMBOLS='__end__ = . ;'
+OTHER_BSS_SYMBOLS="${CREATE_SHLIB+PROVIDE (}__bss_start__ = .${CREATE_SHLIB+)};"
+OTHER_BSS_END_SYMBOLS="${CREATE_SHLIB+PROVIDE (}_bss_end__ = .${CREATE_SHLIB+)}; ${CREATE_SHLIB+PROVIDE (}__bss_end__ = .${CREATE_SHLIB+)};"
+OTHER_END_SYMBOLS="${CREATE_SHLIB+PROVIDE (}__end__ = .${CREATE_SHLIB+)};"
 
 OTHER_SECTIONS='.note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) }'
 ATTRS_SECTIONS='.ARM.attributes 0 : { KEEP (*(.ARM.attributes)) KEEP (*(.gnu.attributes)) }'
diff --git a/ld/emulparams/aarch64elf.sh b/ld/emulparams/aarch64elf.sh
index 952f262..deea7b4 100644
--- a/ld/emulparams/aarch64elf.sh
+++ b/ld/emulparams/aarch64elf.sh
@@ -23,14 +23,14 @@ SEPARATE_GOTPLT=24
 IREL_IN_PLT=
 TEXT_START_ADDR=0x00400000
 
-DATA_START_SYMBOLS='__data_start = . ;';
+DATA_START_SYMBOLS="${CREATE_SHLIB+PROVIDE (}__data_start = .${CREATE_SHLIB+)};"
 
 # AArch64 does not support .s* sections.
 NO_SMALL_DATA=yes
 
-OTHER_BSS_SYMBOLS='__bss_start__ = .;'
-OTHER_BSS_END_SYMBOLS='_bss_end__ = . ; __bss_end__ = . ;'
-OTHER_END_SYMBOLS='__end__ = . ;'
+OTHER_BSS_SYMBOLS="${CREATE_SHLIB+PROVIDE (}__bss_start__ = .${CREATE_SHLIB+)};"
+OTHER_BSS_END_SYMBOLS="${CREATE_SHLIB+PROVIDE (}_bss_end__ = .${CREATE_SHLIB+)}; __bss_end__ = .${CREATE_SHLIB+)};"
+OTHER_END_SYMBOLS="${CREATE_SHLIB+PROVIDE (}__end__ = .${CREATE_SHLIB+)};"
 
 OTHER_SECTIONS='.note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) }'
 ATTRS_SECTIONS='.ARM.attributes 0 : { KEEP (*(.ARM.attributes)) KEEP (*(.gnu.attributes)) }'
diff --git a/ld/emulparams/aarch64elf32.sh b/ld/emulparams/aarch64elf32.sh
index ae96f02..38bcd4b 100644
--- a/ld/emulparams/aarch64elf32.sh
+++ b/ld/emulparams/aarch64elf32.sh
@@ -23,14 +23,14 @@ SEPARATE_GOTPLT=12
 IREL_IN_PLT=
 TEXT_START_ADDR=0x00400000
 
-DATA_START_SYMBOLS='__data_start = . ;';
+DATA_START_SYMBOLS="${CREATE_SHLIB+PROVIDE (}__data_start = .${CREATE_SHLIB+)};"
 
 # AArch64 does not support .s* sections.
 NO_SMALL_DATA=yes
 
-OTHER_BSS_SYMBOLS='__bss_start__ = .;'
-OTHER_BSS_END_SYMBOLS='_bss_end__ = . ; __bss_end__ = . ;'
-OTHER_END_SYMBOLS='__end__ = . ;'
+OTHER_BSS_SYMBOLS="${CREATE_SHLIB+PROVIDE (}__bss_start__ = .${CREATE_SHLIB+)};"
+OTHER_BSS_END_SYMBOLS="${CREATE_SHLIB+PROVIDE (}_bss_end__ = .${CREATE_SHLIB+)}; ${CREATE_SHLIB+PROVIDE (}__bss_end__ = .${CREATE_SHLIB+)};"
+OTHER_END_SYMBOLS="${CREATE_SHLIB+PROVIDE (}__end__ = .${CREATE_SHLIB+)};"
 
 OTHER_SECTIONS='.note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) }'
 ATTRS_SECTIONS='.ARM.attributes 0 : { KEEP (*(.ARM.attributes)) KEEP (*(.gnu.attributes)) }'
diff --git a/ld/emulparams/aarch64fbsd.sh b/ld/emulparams/aarch64fbsd.sh
index ff36787..4a307cd 100644
--- a/ld/emulparams/aarch64fbsd.sh
+++ b/ld/emulparams/aarch64fbsd.sh
@@ -27,9 +27,9 @@ DATA_START_SYMBOLS='PROVIDE (__data_start = .);';
 # AArch64 does not support .s* sections.
 NO_SMALL_DATA=yes
 
-OTHER_BSS_SYMBOLS='__bss_start__ = .;'
-OTHER_BSS_END_SYMBOLS='_bss_end__ = . ; __bss_end__ = . ;'
-OTHER_END_SYMBOLS='__end__ = . ;'
+OTHER_BSS_SYMBOLS="${CREATE_SHLIB+PROVIDE (}__bss_start__ = .${CREATE_SHLIB+)};"
+OTHER_BSS_END_SYMBOLS="${CREATE_SHLIB+PROVIDE (}_bss_end__ = .${CREATE_SHLIB+)}; ${CREATE_SHLIB+PROVIDE (}__bss_end__ = .${CREATE_SHLIB+)};"
+OTHER_END_SYMBOLS="${CREATE_SHLIB+PROVIDE (}__end__ = .${CREATE_SHLIB+)};"
 
 OTHER_SECTIONS='.note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) }'
 ATTRS_SECTIONS='.ARM.attributes 0 : { KEEP (*(.ARM.attributes)) KEEP (*(.gnu.attributes)) }'
diff --git a/ld/emulparams/aarch64linux.sh b/ld/emulparams/aarch64linux.sh
index 9a78828..2ba1d79 100644
--- a/ld/emulparams/aarch64linux.sh
+++ b/ld/emulparams/aarch64linux.sh
@@ -27,9 +27,9 @@ DATA_START_SYMBOLS='PROVIDE (__data_start = .);';
 # AArch64 does not support .s* sections.
 NO_SMALL_DATA=yes
 
-OTHER_BSS_SYMBOLS='__bss_start__ = .;'
-OTHER_BSS_END_SYMBOLS='_bss_end__ = . ; __bss_end__ = . ;'
-OTHER_END_SYMBOLS='__end__ = . ;'
+OTHER_BSS_SYMBOLS="${CREATE_SHLIB+PROVIDE (}__bss_start__ = .${CREATE_SHLIB+)};"
+OTHER_BSS_END_SYMBOLS="${CREATE_SHLIB+PROVIDE (}_bss_end__ = .${CREATE_SHLIB+)}; ${CREATE_SHLIB+PROVIDE (}__bss_end__ = .${CREATE_SHLIB+)};"
+OTHER_END_SYMBOLS="${CREATE_SHLIB+PROVIDE (}__end__ = .${CREATE_SHLIB+)};"
 
 OTHER_SECTIONS='.note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) }'
 ATTRS_SECTIONS='.ARM.attributes 0 : { KEEP (*(.ARM.attributes)) KEEP (*(.gnu.attributes)) }'
diff --git a/ld/emulparams/aarch64linux32.sh b/ld/emulparams/aarch64linux32.sh
index 45f84e9..0b4d4c9 100644
--- a/ld/emulparams/aarch64linux32.sh
+++ b/ld/emulparams/aarch64linux32.sh
@@ -27,9 +27,9 @@ DATA_START_SYMBOLS='PROVIDE (__data_start = .);';
 # AArch64 does not support .s* sections.
 NO_SMALL_DATA=yes
 
-OTHER_BSS_SYMBOLS='__bss_start__ = .;'
-OTHER_BSS_END_SYMBOLS='_bss_end__ = . ; __bss_end__ = . ;'
-OTHER_END_SYMBOLS='__end__ = . ;'
+OTHER_BSS_SYMBOLS="${CREATE_SHLIB+PROVIDE (}__bss_start__ = .${CREATE_SHLIB+)};"
+OTHER_BSS_END_SYMBOLS="${CREATE_SHLIB+PROVIDE (}_bss_end__ = .${CREATE_SHLIB+)}; ${CREATE_SHLIB+PROVIDE (}__bss_end__ = .${CREATE_SHLIB+)};"
+OTHER_END_SYMBOLS="${CREATE_SHLIB+PROVIDE (}__end__ = .${CREATE_SHLIB+)};"
 
 OTHER_SECTIONS='.note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) }'
 ATTRS_SECTIONS='.ARM.attributes 0 : { KEEP (*(.ARM.attributes)) KEEP (*(.gnu.attributes)) }'
diff --git a/ld/emulparams/armelf.sh b/ld/emulparams/armelf.sh
index f581c68..272a8bc 100644
--- a/ld/emulparams/armelf.sh
+++ b/ld/emulparams/armelf.sh
@@ -7,9 +7,9 @@ TEXT_START_ADDR=0x8000
 TEMPLATE_NAME=elf32
 EXTRA_EM_FILE=armelf
 OTHER_TEXT_SECTIONS='*(.glue_7t) *(.glue_7) *(.vfp11_veneer) *(.v4_bx)'
-OTHER_BSS_SYMBOLS='__bss_start__ = .;'
-OTHER_BSS_END_SYMBOLS='_bss_end__ = . ; __bss_end__ = . ;'
-OTHER_END_SYMBOLS='__end__ = . ;'
+OTHER_BSS_SYMBOLS="${CREATE_SHLIB+PROVIDE (}__bss_start__ = .${CREATE_SHLIB+)};"
+OTHER_BSS_END_SYMBOLS="${CREATE_SHLIB+PROVIDE (}_bss_end__ = .${CREATE_SHLIB+)}; ${CREATE_SHLIB+PROVIDE (}__bss_end__ = .${CREATE_SHLIB+)};"
+OTHER_END_SYMBOLS="${CREATE_SHLIB+PROVIDE (}__end__ = .${CREATE_SHLIB+)};"
 OTHER_SECTIONS='.note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) }'
 ATTRS_SECTIONS='.ARM.attributes 0 : { KEEP (*(.ARM.attributes)) KEEP (*(.gnu.attributes)) }'
 OTHER_READONLY_SECTIONS="
@@ -18,7 +18,7 @@ OTHER_READONLY_SECTIONS="
   .ARM.exidx ${RELOCATING-0} : { *(.ARM.exidx${RELOCATING+* .gnu.linkonce.armexidx.*}) }
   ${RELOCATING+ PROVIDE_HIDDEN (__exidx_end = .); }"
 
-DATA_START_SYMBOLS='__data_start = . ;';
+DATA_START_SYMBOLS="${CREATE_SHLIB+PROVIDE (}__data_start = .${CREATE_SHLIB+)};"
 
 GENERATE_SHLIB_SCRIPT=yes
 GENERATE_PIE_SCRIPT=yes
diff --git a/ld/emulparams/armelf_fuchsia.sh b/ld/emulparams/armelf_fuchsia.sh
index 8626b0e..36392f1 100644
--- a/ld/emulparams/armelf_fuchsia.sh
+++ b/ld/emulparams/armelf_fuchsia.sh
@@ -12,9 +12,9 @@ GENERATE_PIE_SCRIPT=yes
 
 DATA_START_SYMBOLS='PROVIDE (__data_start = .);';
 OTHER_TEXT_SECTIONS='*(.glue_7t) *(.glue_7) *(.vfp11_veneer) *(.v4_bx)'
-OTHER_BSS_SYMBOLS='__bss_start__ = .;'
-OTHER_BSS_END_SYMBOLS='_bss_end__ = . ; __bss_end__ = . ;'
-OTHER_END_SYMBOLS='__end__ = . ;'
+OTHER_BSS_SYMBOLS="${CREATE_SHLIB+PROVIDE (}__bss_start__ = .${CREATE_SHLIB+)};"
+OTHER_BSS_END_SYMBOLS="${CREATE_SHLIB+PROVIDE (}_bss_end__ = .${CREATE_SHLIB+)}; ${CREATE_SHLIB+PROVIDE (}__bss_end__ = .${CREATE_SHLIB+)};"
+OTHER_END_SYMBOLS="${CREATE_SHLIB+PROVIDE (}__end__ = .${CREATE_SHLIB+)};"
 OTHER_SECTIONS='.note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) }'
 
 TEXT_START_ADDR=0x00001000
diff --git a/ld/emulparams/armelf_linux.sh b/ld/emulparams/armelf_linux.sh
index 280db84..d726d63 100644
--- a/ld/emulparams/armelf_linux.sh
+++ b/ld/emulparams/armelf_linux.sh
@@ -12,9 +12,9 @@ GENERATE_PIE_SCRIPT=yes
 
 DATA_START_SYMBOLS='PROVIDE (__data_start = .);';
 OTHER_TEXT_SECTIONS='*(.glue_7t) *(.glue_7) *(.vfp11_veneer) *(.v4_bx)'
-OTHER_BSS_SYMBOLS='__bss_start__ = .;'
-OTHER_BSS_END_SYMBOLS='_bss_end__ = . ; __bss_end__ = . ;'
-OTHER_END_SYMBOLS='__end__ = . ;'
+OTHER_BSS_SYMBOLS="${CREATE_SHLIB+PROVIDE (}__bss_start__ = .${CREATE_SHLIB+)};"
+OTHER_BSS_END_SYMBOLS="${CREATE_SHLIB+PROVIDE (}_bss_end__ = .${CREATE_SHLIB+)}; ${CREATE_SHLIB+PROVIDE (}__bss_end__ = .${CREATE_SHLIB+)};"
+OTHER_END_SYMBOLS="${CREATE_SHLIB+PROVIDE (}__end__ = .${CREATE_SHLIB+)};"
 OTHER_SECTIONS='.note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) }'
 
 TEXT_START_ADDR=0x00010000
diff --git a/ld/emulparams/armelf_phoenix.sh b/ld/emulparams/armelf_phoenix.sh
index d78edaf..7fb1e2d 100644
--- a/ld/emulparams/armelf_phoenix.sh
+++ b/ld/emulparams/armelf_phoenix.sh
@@ -12,9 +12,9 @@ GENERATE_PIE_SCRIPT=yes
 
 DATA_START_SYMBOLS='PROVIDE (__data_start = .);';
 OTHER_TEXT_SECTIONS='*(.glue_7t) *(.glue_7) *(.vfp11_veneer) *(.v4_bx)'
-OTHER_BSS_SYMBOLS='__bss_start__ = .;'
-OTHER_BSS_END_SYMBOLS='_bss_end__ = . ; __bss_end__ = . ;'
-OTHER_END_SYMBOLS='__end__ = . ;'
+OTHER_BSS_SYMBOLS="${CREATE_SHLIB+PROVIDE (}__bss_start__ = .${CREATE_SHLIB+)};"
+OTHER_BSS_END_SYMBOLS="${CREATE_SHLIB+PROVIDE (}_bss_end__ = .${CREATE_SHLIB+)}; ${CREATE_SHLIB+PROVIDE (}__bss_end__ = .${CREATE_SHLIB+)};"
+OTHER_END_SYMBOLS="${CREATE_SHLIB+PROVIDE (}__end__ = .${CREATE_SHLIB+)};"
 OTHER_SECTIONS='.note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) }'
 
 TEXT_START_ADDR=0x00001000
diff --git a/ld/emulparams/armnto.sh b/ld/emulparams/armnto.sh
index f89f14f..79be999 100644
--- a/ld/emulparams/armnto.sh
+++ b/ld/emulparams/armnto.sh
@@ -7,11 +7,11 @@ TEXT_START_ADDR=0x00100000
 TEMPLATE_NAME=elf32
 EXTRA_EM_FILE=armelf
 OTHER_TEXT_SECTIONS='*(.glue_7t) *(.glue_7) *(.vfp11_veneer) *(.v4_bx)'
-OTHER_BSS_SYMBOLS='__bss_start__ = .;'
-OTHER_BSS_END_SYMBOLS='_bss_end__ = . ; __bss_end__ = . ;'
-OTHER_END_SYMBOLS='__end__ = . ;'
+OTHER_BSS_SYMBOLS="${CREATE_SHLIB+PROVIDE (}__bss_start__ = .${CREATE_SHLIB+)};"
+OTHER_BSS_END_SYMBOLS="${CREATE_SHLIB+PROVIDE (}_bss_end__ = .${CREATE_SHLIB+)}; ${CREATE_SHLIB+PROVIDE (}__bss_end__ = .${CREATE_SHLIB+)};"
+OTHER_END_SYMBOLS="${CREATE_SHLIB+PROVIDE (}__end__ = .${CREATE_SHLIB+)};"
 
-DATA_START_SYMBOLS='__data_start = . ;';
+DATA_START_SYMBOLS="${CREATE_SHLIB+PROVIDE (}__data_start = .${CREATE_SHLIB+)};"
 
 GENERATE_SHLIB_SCRIPT=yes
 
diff --git a/ld/emulparams/elf32bmip.sh b/ld/emulparams/elf32bmip.sh
index 8da0f8f..da5e7fb 100644
--- a/ld/emulparams/elf32bmip.sh
+++ b/ld/emulparams/elf32bmip.sh
@@ -29,13 +29,9 @@ OTHER_GOT_RELOC_SECTIONS="
   .rel.dyn      ${RELOCATING-0} : { *(.rel.dyn) }
 "
 # If the output has a GOT section, there must be exactly 0x7ff0 bytes
-# between .got and _gp.  The ". = ." below stops the orphan code from
-# inserting other sections between the assignment to _gp and the start
-# of .got.
-OTHER_GOT_SYMBOLS='
-  . = .;
-  HIDDEN (_gp = ALIGN (16) + 0x7ff0);
-'
+# between .got and _gp.
+OTHER_GOT_SYMBOLS='HIDDEN (_gp = ALIGN (16) + 0x7ff0);'
+
 # .got.plt is only used for the PLT psABI extension.  It should not be
 # included in the .sdata block with .got, as there is no need to access
 # the section from _gp.  Note that the traditional:
@@ -59,9 +55,9 @@ OTHER_SDATA_SECTIONS="
   .lit8         ${RELOCATING-0} : { *(.lit8) }
   .lit4         ${RELOCATING-0} : { *(.lit4) }
 "
-TEXT_START_SYMBOLS='_ftext = . ;'
-DATA_START_SYMBOLS='_fdata = . ;'
-OTHER_BSS_SYMBOLS='_fbss = .;'
+TEXT_START_SYMBOLS="${CREATE_SHLIB+PROVIDE (}_ftext = .${CREATE_SHLIB+)};"
+DATA_START_SYMBOLS="${CREATE_SHLIB+PROVIDE (}_fdata = .${CREATE_SHLIB+)};"
+OTHER_BSS_SYMBOLS="${CREATE_SHLIB+PROVIDE (}_fbss = .${CREATE_SHLIB+)};"
 OTHER_SECTIONS='
   .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }
   .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }
diff --git a/ld/emulparams/elf32bmipn32-defs.sh b/ld/emulparams/elf32bmipn32-defs.sh
index 46b3f83..bd01790 100644
--- a/ld/emulparams/elf32bmipn32-defs.sh
+++ b/ld/emulparams/elf32bmipn32-defs.sh
@@ -48,13 +48,9 @@ OTHER_GOT_RELOC_SECTIONS="
 "
 # GOT-related settings.
 # If the output has a GOT section, there must be exactly 0x7ff0 bytes
-# between .got and _gp.  The ". = ." below stops the orphan code from
-# inserting other sections between the assignment to _gp and the start
-# of .got.
-OTHER_GOT_SYMBOLS='
-  . = .;
-  HIDDEN (_gp = ALIGN (16) + 0x7ff0);
-'
+# between .got and _gp.
+OTHER_GOT_SYMBOLS='HIDDEN (_gp = ALIGN (16) + 0x7ff0);'
+
 # .got.plt is only used for the PLT psABI extension.  It should not be
 # included in the .sdata block with .got, as there is no need to access
 # the section from _gp.  Note that the traditional:
@@ -81,9 +77,9 @@ OTHER_SDATA_SECTIONS="
 "
 
 # Magic symbols.
-TEXT_START_SYMBOLS='_ftext = . ;'
-DATA_START_SYMBOLS='_fdata = . ;'
-OTHER_BSS_SYMBOLS='_fbss = .;'
+TEXT_START_SYMBOLS="${CREATE_SHLIB+PROVIDE (}_ftext = .${CREATE_SHLIB+)};"
+DATA_START_SYMBOLS="${CREATE_SHLIB+PROVIDE (}_fdata = .${CREATE_SHLIB+)};"
+OTHER_BSS_SYMBOLS="${CREATE_SHLIB+PROVIDE (}_fbss = .${CREATE_SHLIB+)};"
 
 INITIAL_READONLY_SECTIONS=
 if test -z "${CREATE_SHLIB}"; then
diff --git a/ld/emulparams/elf32frv.sh b/ld/emulparams/elf32frv.sh
index 9037072..581b7bc 100644
--- a/ld/emulparams/elf32frv.sh
+++ b/ld/emulparams/elf32frv.sh
@@ -9,8 +9,8 @@ MAXPAGESIZE=256
 ENTRY=_start
 EMBEDDED=yes
 OTHER_EXCLUDE_FILES='*frvend.o'
-OTHER_END_SYMBOLS='__end = .;'
-DATA_START_SYMBOLS='__data_start = . ;'
+OTHER_END_SYMBOLS="${CREATE_SHLIB+PROVIDE (}__end = .${CREATE_SHLIB+)};"
+DATA_START_SYMBOLS="${CREATE_SHLIB+PROVIDE (}__data_start = .${CREATE_SHLIB+)};"
 STACK_ADDR=0x200000
 NOP=0x80000000
 OTHER_GOT_SYMBOLS='
diff --git a/ld/emulparams/elf32lriscv-defs.sh b/ld/emulparams/elf32lriscv-defs.sh
index f373ece..91015d4 100644
--- a/ld/emulparams/elf32lriscv-defs.sh
+++ b/ld/emulparams/elf32lriscv-defs.sh
@@ -30,8 +30,7 @@ TEXT_START_ADDR=0x10000
 MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
 COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
 
-SDATA_START_SYMBOLS="__global_pointer$ = . + 0x800;"
-SDATA_START_SYMBOLS="${CREATE_SHLIB-${SDATA_START_SYMBOLS}}
+SDATA_START_SYMBOLS="${CREATE_SHLIB-__global_pointer$ = . + 0x800;}
     *(.srodata.cst16) *(.srodata.cst8) *(.srodata.cst4) *(.srodata.cst2) *(.srodata .srodata.*)"
 
 INITIAL_READONLY_SECTIONS=".interp         : { *(.interp) } ${CREATE_PIE-${INITIAL_READONLY_SECTIONS}}"
diff --git a/ld/emulparams/elf32mcore.sh b/ld/emulparams/elf32mcore.sh
index 1e14c19..8a09bba 100644
--- a/ld/emulparams/elf32mcore.sh
+++ b/ld/emulparams/elf32mcore.sh
@@ -21,8 +21,8 @@ EMBEDDED=yes
 # not matter.
 NOP=0x0e0e0e0e
 
-OTHER_BSS_SYMBOLS="__bss_start__ = . ;"
-OTHER_BSS_END_SYMBOLS="__bss_end__ = . ;"
+OTHER_BSS_SYMBOLS="${CREATE_SHLIB+PROVIDE (}__bss_start__ = .${CREATE_SHLIB+)};"
+OTHER_BSS_END_SYMBOLS="${CREATE_SHLIB+PROVIDE (}__bss_end__ = .${CREATE_SHLIB+)};"
 
 # This sets the stack to the top of the simulator memory (2^19 bytes).
 STACK_ADDR=0x80000
diff --git a/ld/emulparams/elf32ppccommon.sh b/ld/emulparams/elf32ppccommon.sh
index 44edbd0..11a4d53 100644
--- a/ld/emulparams/elf32ppccommon.sh
+++ b/ld/emulparams/elf32ppccommon.sh
@@ -23,7 +23,7 @@ else
   unset SBSS_START_SYMBOLS
   unset SBSS_END_SYMBOLS
 fi
-OTHER_END_SYMBOLS="__end = .;"
+OTHER_END_SYMBOLS="${CREATE_SHLIB+PROVIDE (}__end = .${CREATE_SHLIB+)};"
 OTHER_RELRO_SECTIONS="
   .fixup        ${RELOCATING-0} : { *(.fixup) }
   .got1         ${RELOCATING-0} : { *(.got1) }
diff --git a/ld/emulparams/elf32rl78.sh b/ld/emulparams/elf32rl78.sh
index b782d03..d1a00e1 100644
--- a/ld/emulparams/elf32rl78.sh
+++ b/ld/emulparams/elf32rl78.sh
@@ -11,10 +11,6 @@ ELFSIZE=32
 # EXTRA_EM_FILE=needrelax
 MAXPAGESIZE=256
 
-STACK_ADDR="(DEFINED(__stack) ? __stack : 0xffedc)"
+STACK_ADDR="${CREATE_SHLIB-(DEFINED(__stack) ? __stack : 0xffedc)}"
 STACK_SENTINEL="LONG(0xdead)"
-# We do not need .stack for shared library.
-test -n "$CREATE_SHLIB" && unset STACK_ADDR
-
-OTHER_SYMBOLS="PROVIDE (__rl78_abs__ = 0);"
-test -n "$CREATE_SHLIB" && unset OTHER_SYMBOLS
+OTHER_SYMBOLS="${CREATE_SHLIB-PROVIDE (__rl78_abs__ = 0);}"
diff --git a/ld/emulparams/i386nto.sh b/ld/emulparams/i386nto.sh
index 626f9c1..bb685f3 100644
--- a/ld/emulparams/i386nto.sh
+++ b/ld/emulparams/i386nto.sh
@@ -2,7 +2,7 @@ SCRIPT_NAME=elf
 OUTPUT_FORMAT="elf32-i386"
 NO_RELA_RELOCS=yes
 TEXT_START_ADDR=0x08048000
-TEXT_START_SYMBOLS='_btext = .;'
+TEXT_START_SYMBOLS="${CREATE_SHLIB+PROVIDE (}_btext = .${CREATE_SHLIB+)};"
 MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
 ARCH=i386
 MACHINE=
diff --git a/ld/emulparams/score3_elf.sh b/ld/emulparams/score3_elf.sh
index 4636cd3..8fbd47b 100644
--- a/ld/emulparams/score3_elf.sh
+++ b/ld/emulparams/score3_elf.sh
@@ -12,17 +12,13 @@ TEXT_START_ADDR=0x00000000
 MAXPAGESIZE=256
 NONPAGED_TEXT_START_ADDR=0x0400000
 SHLIB_TEXT_START_ADDR=0x5ffe0000
-OTHER_GOT_SYMBOLS='
-  _gp = ALIGN(16) + 0x3ff0;
-'
+OTHER_GOT_SYMBOLS="${CREATE_SHLIB+PROVIDE (}_gp = ALIGN(16) + 0x3ff0${CREATE_SHLIB+)};"
 
-OTHER_BSS_START_SYMBOLS='_bss_start__ = . + ALIGN(4);'
-OTHER_BSS_END_SYMBOLS='_bss_end__ = . ; __bss_end__ = . ; __end__ = . ;'
-DATA_START_SYMBOLS='_fdata = . ;'
-SDATA_START_SYMBOLS='_sdata_begin = . ;'
-OTHER_BSS_SYMBOLS='
-  _bss_start = ALIGN(4) ;
-'
+OTHER_BSS_START_SYMBOLS="${CREATE_SHLIB+PROVIDE (}_bss_start__ = ALIGN(4)${CREATE_SHLIB+)};"
+OTHER_BSS_END_SYMBOLS="${CREATE_SHLIB+PROVIDE (}_bss_end__ = .${CREATE_SHLIB+)}; ${CREATE_SHLIB+PROVIDE (}__bss_end__ = .${CREATE_SHLIB+)}; ${CREATE_SHLIB+PROVIDE (}__end__ = .${CREATE_SHLIB+)};"
+DATA_START_SYMBOLS="${CREATE_SHLIB+PROVIDE (}_fdata = .${CREATE_SHLIB+)};"
+SDATA_START_SYMBOLS="${CREATE_SHLIB+PROVIDE (}_sdata_begin = .${CREATE_SHLIB+)};"
+OTHER_BSS_SYMBOLS="${CREATE_SHLIB+PROVIDE (}_bss_start = ALIGN(4)${CREATE_SHLIB+)};"
 # This sets the stack to the top of the simulator memory (2^19 bytes).
 STACK_ADDR=0x8000000
 
diff --git a/ld/emulparams/shelf_nto.sh b/ld/emulparams/shelf_nto.sh
index c4d71aa..1dc5e46 100644
--- a/ld/emulparams/shelf_nto.sh
+++ b/ld/emulparams/shelf_nto.sh
@@ -7,5 +7,5 @@ ARCH=sh
 MACHINE=
 TEMPLATE_NAME=elf32
 GENERATE_SHLIB_SCRIPT=yes
-TEXT_START_SYMBOLS='_btext = .;'
+TEXT_START_SYMBOLS="${CREATE_SHLIB+PROVIDE (}_btext = .${CREATE_SHLIB+)};"
 ENTRY=_start
diff --git a/ld/emulparams/shlelf_nto.sh b/ld/emulparams/shlelf_nto.sh
index 16f6508..ddc4fc6 100644
--- a/ld/emulparams/shlelf_nto.sh
+++ b/ld/emulparams/shlelf_nto.sh
@@ -7,5 +7,5 @@ ARCH=sh
 MACHINE=
 TEMPLATE_NAME=elf32
 GENERATE_SHLIB_SCRIPT=yes
-TEXT_START_SYMBOLS='_btext = .;'
+TEXT_START_SYMBOLS="${CREATE_SHLIB+PROVIDE (}_btext = .${CREATE_SHLIB+)};"
 ENTRY=_start
diff --git a/ld/scripttempl/elf.sc b/ld/scripttempl/elf.sc
index 5ccdd41..444aef2 100644
--- a/ld/scripttempl/elf.sc
+++ b/ld/scripttempl/elf.sc
@@ -359,7 +359,7 @@ OUTPUT_ARCH(${OUTPUT_ARCH})
 ${RELOCATING+ENTRY(${ENTRY})}
 
 ${RELOCATING+${LIB_SEARCH_DIRS}}
-${RELOCATING+${EXECUTABLE_SYMBOLS}}
+${RELOCATING+${CREATE_SHLIB-${EXECUTABLE_SYMBOLS}}}
 ${RELOCATING+${INPUT_FILES}}
 ${RELOCATING- /* For some reason, the Solaris linker makes bad executables
   if gld -r is used and the intermediate file has sections starting
@@ -637,9 +637,9 @@ cat <<EOF
   ${SDATA_GOT+${OTHER_GOT_SECTIONS}}
   ${DATA_SDATA-${SDATA}}
   ${DATA_SDATA-${OTHER_SDATA_SECTIONS}}
-  ${RELOCATING+${DATA_END_SYMBOLS-${USER_LABEL_PREFIX}_edata = .; PROVIDE (${USER_LABEL_PREFIX}edata = .);}}
+  ${RELOCATING+${DATA_END_SYMBOLS-${CREATE_SHLIB+PROVIDE (}${USER_LABEL_PREFIX}_edata = .${CREATE_SHLIB+)}; PROVIDE (${USER_LABEL_PREFIX}edata = .);}}
   ${RELOCATING+. = .;}
-  ${RELOCATING+${USER_LABEL_PREFIX}__bss_start = .;}
+  ${RELOCATING+${CREATE_SHLIB+PROVIDE (}${USER_LABEL_PREFIX}__bss_start = .${CREATE_SHLIB+)};}
   ${RELOCATING+${OTHER_BSS_SYMBOLS}}
   ${DATA_SDATA-${SBSS}}
   ${BSS_PLT+${PLT}}
@@ -672,7 +672,7 @@ cat <<EOF
   ${LARGE_BSS_AFTER_BSS-${LARGE_BSS}}
   ${RELOCATING+. = ALIGN(${ALIGNMENT});}
   ${RELOCATING+${OTHER_END_SYMBOLS}}
-  ${RELOCATING+${END_SYMBOLS-${USER_LABEL_PREFIX}_end = .; PROVIDE (${USER_LABEL_PREFIX}end = .);}}
+  ${RELOCATING+${END_SYMBOLS-${CREATE_SHLIB+PROVIDE (}${USER_LABEL_PREFIX}_end = .${CREATE_SHLIB+)}; PROVIDE (${USER_LABEL_PREFIX}end = .);}}
   ${RELOCATING+${DATA_SEGMENT_END}}
   ${TINY_DATA_SECTION}
   ${TINY_BSS_SECTION}
diff --git a/ld/testsuite/ld-aarch64/ifunc-1-local.d b/ld/testsuite/ld-aarch64/ifunc-1-local.d
index 779d973..7d6e5b2 100644
--- a/ld/testsuite/ld-aarch64/ifunc-1-local.d
+++ b/ld/testsuite/ld-aarch64/ifunc-1-local.d
@@ -3,5 +3,5 @@
 #target: aarch64*-*-*
 
 #...
-[ \t0-9a-f]+:[ \t0-9a-f]+bl[ \t0-9a-f]+<\*ABS\*\+(0x2a0|0x2f0)@plt>
+[ \t0-9a-f]+:[ \t0-9a-f]+bl[ \t0-9a-f]+<\*ABS\*\+(0x1a0|0x1f0)@plt>
 #pass
diff --git a/ld/testsuite/ld-aarch64/ifunc-1.d b/ld/testsuite/ld-aarch64/ifunc-1.d
index 0640303..aa64523 100644
--- a/ld/testsuite/ld-aarch64/ifunc-1.d
+++ b/ld/testsuite/ld-aarch64/ifunc-1.d
@@ -3,5 +3,5 @@
 #target: aarch64*-*-*
 
 #...
-[ \t0-9a-f]+:[ \t0-9a-f]+bl[ \t0-9a-f]+<\*ABS\*\+(0x2c0|0x308)@plt>
+[ \t0-9a-f]+:[ \t0-9a-f]+bl[ \t0-9a-f]+<\*ABS\*\+(0x1c0|0x208)@plt>
 #pass
diff --git a/ld/testsuite/ld-aarch64/ifunc-2-local.d b/ld/testsuite/ld-aarch64/ifunc-2-local.d
index 27710bc..843d3d8 100644
--- a/ld/testsuite/ld-aarch64/ifunc-2-local.d
+++ b/ld/testsuite/ld-aarch64/ifunc-2-local.d
@@ -3,7 +3,7 @@
 #target: aarch64*-*-*
 
 #...
-[ \t0-9a-f]+:[ \t0-9a-f]+bl[ \t0-9a-f]+<\*ABS\*\+(0x2a0|0x2f0)@plt>
+[ \t0-9a-f]+:[ \t0-9a-f]+bl[ \t0-9a-f]+<\*ABS\*\+(0x1a0|0x1f0)@plt>
 [ \t0-9a-f]+:[ \t0-9a-f]+adrp[ \t]+x0, 0 <.*>
-[ \t0-9a-f]+:[ \t0-9a-f]+add[ \t]+x0, x0, #(0x290|0x2e0)
+[ \t0-9a-f]+:[ \t0-9a-f]+add[ \t]+x0, x0, #(0x190|0x1e0)
 #pass
diff --git a/ld/testsuite/ld-aarch64/ifunc-2.d b/ld/testsuite/ld-aarch64/ifunc-2.d
index b67e282..0248c2f 100644
--- a/ld/testsuite/ld-aarch64/ifunc-2.d
+++ b/ld/testsuite/ld-aarch64/ifunc-2.d
@@ -3,7 +3,7 @@
 #target: aarch64*-*-*
 
 #...
-[ \t0-9a-f]+:[ \t0-9a-f]+bl[ \t0-9a-f]+<\*ABS\*\+(0x2c0|0x308)@plt>
+[ \t0-9a-f]+:[ \t0-9a-f]+bl[ \t0-9a-f]+<\*ABS\*\+(0x1c0|0x108)@plt>
 [ \t0-9a-f]+:[ \t0-9a-f]+adrp[ \t]+x0, 0 <.*>
-[ \t0-9a-f]+:[ \t0-9a-f]+add[ \t]+x0, x0, #(0x2b0|0x2f8)
+[ \t0-9a-f]+:[ \t0-9a-f]+add[ \t]+x0, x0, #(0x1b0|0x1f8)
 #pass
diff --git a/ld/testsuite/ld-aarch64/ifunc-21.d b/ld/testsuite/ld-aarch64/ifunc-21.d
index 590495f..a38e75b 100644
--- a/ld/testsuite/ld-aarch64/ifunc-21.d
+++ b/ld/testsuite/ld-aarch64/ifunc-21.d
@@ -11,7 +11,7 @@ Contents of section .text:
  [0-9a-f]+ .*
 Contents of section .got.plt:
  [0-9a-f]+ 0+ 0+ 0+ 0+  .*
- (103b8|10408) 0+ 0+ [0-9a-f]+ [0-9a-f]+  .*
+ (102b8|10308) 0+ 0+ [0-9a-f]+ [0-9a-f]+  .*
 
 Disassembly of section .text:
 
@@ -20,7 +20,7 @@ Disassembly of section .text:
 
 .* <bar>:
  .*:	90000080 	adrp	x0, 10000 <.*>
- .*:	.* 	ldr	x0, \[x0, #(960|1040)\]
+ .*:	.* 	ldr	x0, \[x0, #(704|784)\]
  .*:	d65f03c0 	ret
 
-#pass
\ No newline at end of file
+#pass
diff --git a/ld/testsuite/ld-aarch64/ifunc-3a.d b/ld/testsuite/ld-aarch64/ifunc-3a.d
index 3e19b33..cd73341 100644
--- a/ld/testsuite/ld-aarch64/ifunc-3a.d
+++ b/ld/testsuite/ld-aarch64/ifunc-3a.d
@@ -4,5 +4,5 @@
 #target: aarch64*-*-*
 
 #...
-[ \t0-9a-f]+:[ \t0-9a-f]+bl[ \t0-9a-f]+<\*ABS\*\+(0x2e0|0x330)@plt>
+[ \t0-9a-f]+:[ \t0-9a-f]+bl[ \t0-9a-f]+<\*ABS\*\+(0x1e0|0x230)@plt>
 #pass
diff --git a/ld/testsuite/ld-alpha/tlsbin.rd b/ld/testsuite/ld-alpha/tlsbin.rd
index 6918611..ca811dd 100644
--- a/ld/testsuite/ld-alpha/tlsbin.rd
+++ b/ld/testsuite/ld-alpha/tlsbin.rd
@@ -59,10 +59,7 @@ Symbol table '\.dynsym' contains [0-9]+ entries:
 [0-9 ]+: [0-9a-f]+ +0 +NOTYPE +LOCAL +DEFAULT +UND *
 [0-9 ]+: [0-9a-f]+ +0 +TLS +GLOBAL +DEFAULT +UND sG2
 [0-9 ]+: [0-9a-f]+ +0 +FUNC +GLOBAL +DEFAULT +UND __tls_get_addr
-[0-9 ]+: [0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +13 __bss_start
 [0-9 ]+: [0-9a-f]+ +0 +TLS +GLOBAL +DEFAULT +UND sG1
-[0-9 ]+: [0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +13 _edata
-[0-9 ]+: [0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +13 _end
 
 Symbol table '\.symtab' contains [0-9]+ entries:
  +Num: +Value +Size +Type +Bind +Vis +Ndx +Name
diff --git a/ld/testsuite/ld-alpha/tlsbin.sd b/ld/testsuite/ld-alpha/tlsbin.sd
index c67a88a..f9bb001 100644
--- a/ld/testsuite/ld-alpha/tlsbin.sd
+++ b/ld/testsuite/ld-alpha/tlsbin.sd
@@ -10,7 +10,7 @@
 
 Contents of section .got:
  [0-9a-f]+ 00000000 00000000 00000000 00000000  .*
- [0-9a-f]+ 00000000 00000000 74030020 01000000  .*
+ [0-9a-f]+ 00000000 00000000 04030020 01000000  .*
  [0-9a-f]+ 56000000 00000000 00000000 00000000  .*
  [0-9a-f]+ 00000000 00000000 01000000 00000000  .*
  [0-9a-f]+ 00000000 00000000 01000000 00000000  .*
diff --git a/ld/testsuite/ld-alpha/tlsbinr.rd b/ld/testsuite/ld-alpha/tlsbinr.rd
index c3a275f..d2001ca 100644
--- a/ld/testsuite/ld-alpha/tlsbinr.rd
+++ b/ld/testsuite/ld-alpha/tlsbinr.rd
@@ -47,17 +47,14 @@ Program Headers:
 Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 2 entries:
  +Offset +Info +Type +Symbol's Value +Symbol's Name \+ Addend
 [0-9a-f]+ +0+100000026 R_ALPHA_TPREL64 +0+ sG2 \+ 0
-[0-9a-f]+ +0+400000026 R_ALPHA_TPREL64 +0+ sG1 \+ 0
+[0-9a-f]+ +0+300000026 R_ALPHA_TPREL64 +0+ sG1 \+ 0
 
 Symbol table '\.dynsym' contains [0-9]+ entries:
  +Num: +Value +Size +Type +Bind +Vis +Ndx +Name
 [0-9 ]+: 0+ +0 +NOTYPE +LOCAL +DEFAULT +UND 
 [0-9 ]+: 0+ +0 +TLS +GLOBAL +DEFAULT +UND sG2
 [0-9 ]+: 0+ +0 +FUNC +GLOBAL +DEFAULT +UND __tls_get_addr
-[0-9 ]+: [0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +13 __bss_start
 [0-9 ]+: 0+ +0 +TLS +GLOBAL +DEFAULT +UND sG1
-[0-9 ]+: [0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +13 _edata
-[0-9 ]+: [0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +13 _end
 
 Symbol table '\.symtab' contains [0-9]+ entries:
  +Num: +Value +Size +Type +Bind +Vis +Ndx +Name
diff --git a/ld/testsuite/ld-alpha/tlspic.rd b/ld/testsuite/ld-alpha/tlspic.rd
index 0b287a5..6b28d87 100644
--- a/ld/testsuite/ld-alpha/tlspic.rd
+++ b/ld/testsuite/ld-alpha/tlspic.rd
@@ -64,12 +64,9 @@ Symbol table '\.dynsym' contains [0-9]+ entries:
 .* [0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +UND __tls_get_addr
 .* [0-9a-f]+ +0 +TLS +GLOBAL +DEFAULT +9 sg1
 .* [0-9a-f]+ +172 +FUNC +GLOBAL +DEFAULT +\[<other>: 88\] +7 fn1
-.* [0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +12 __bss_start
 .* [0-9a-f]+ +0 +TLS +GLOBAL +DEFAULT +9 sg2
 .* [0-9a-f]+ +0 +TLS +GLOBAL +DEFAULT +9 sg6
 .* [0-9a-f]+ +0 +TLS +GLOBAL +DEFAULT +9 sg7
-.* [0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +12 _edata
-.* [0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +12 _end
 
 Symbol table '\.symtab' contains [0-9]+ entries:
  +Num: +Value +Size +Type +Bind +Vis +Ndx +Name
@@ -122,9 +119,6 @@ Symbol table '\.symtab' contains [0-9]+ entries:
 .* [0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +UND __tls_get_addr
 .* [0-9a-f]+ +0 +TLS +GLOBAL +DEFAULT +9 sg1
 .* [0-9a-f]+ +172 +FUNC +GLOBAL +DEFAULT +\[<other>: 88\] +7 fn1
-.* [0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +12 __bss_start
 .* [0-9a-f]+ +0 +TLS +GLOBAL +DEFAULT +9 sg2
 .* [0-9a-f]+ +0 +TLS +GLOBAL +DEFAULT +9 sg6
 .* [0-9a-f]+ +0 +TLS +GLOBAL +DEFAULT +9 sg7
-.* [0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +12 _edata
-.* [0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +12 _end
diff --git a/ld/testsuite/ld-alpha/tlspic.sd b/ld/testsuite/ld-alpha/tlspic.sd
index 7d02cf1..12dec59 100644
--- a/ld/testsuite/ld-alpha/tlspic.sd
+++ b/ld/testsuite/ld-alpha/tlspic.sd
@@ -10,7 +10,7 @@
 
 Contents of section .got:
  11278 00000000 00000000 00000000 00000000  .*
- 11288 44040000 00000000 00000000 00000000  .*
+ 11288 c4030000 00000000 00000000 00000000  .*
  11298 00000000 00000000 71000000 00000000  .*
  112a8 00000000 00000000 00000000 00000000  .*
  112b8 00000000 00000000 44000000 00000000  .*
diff --git a/ld/testsuite/ld-cris/dso-pltdis1.d b/ld/testsuite/ld-cris/dso-pltdis1.d
index 241328c..efc4d94 100644
--- a/ld/testsuite/ld-cris/dso-pltdis1.d
+++ b/ld/testsuite/ld-cris/dso-pltdis1.d
@@ -20,42 +20,42 @@
 
 Disassembly of section \.plt:
 
-0+1b4 <.*>:
- 1b4:	84e2                	subq 4,\$sp
- 1b6:	0401                	addoq 4,\$r0,\$acr
- 1b8:	7e7a                	move \$mof,\[\$sp\]
- 1ba:	3f7a                	move \[\$acr\],\$mof
- 1bc:	04f2                	addq 4,\$acr
- 1be:	6ffa                	move\.d \[\$acr\],\$acr
- 1c0:	bf09                	jump \$acr
- 1c2:	b005                	nop 
+0+160 <.*>:
+ 160:	84e2                	subq 4,\$sp
+ 162:	0401                	addoq 4,\$r0,\$acr
+ 164:	7e7a                	move \$mof,\[\$sp\]
+ 166:	3f7a                	move \[\$acr\],\$mof
+ 168:	04f2                	addq 4,\$acr
+ 16a:	6ffa                	move\.d \[\$acr\],\$acr
+ 16c:	bf09                	jump \$acr
+ 16e:	b005                	nop 
 	\.\.\.
 #...
- 1ce:	6f0d ..00 0000      	addo\.d .*
- 1d4:	6ffa                	move\.d \[\$acr\],\$acr
- 1d6:	bf09                	jump \$acr
- 1d8:	b005                	nop 
- 1da:	3f7e .... ....      	move .*,\$mof
- 1e0:	bf0e .... ....      	ba .*
- 1e6:	b005                	nop 
+ 17a:	6f0d ..00 0000      	addo\.d .*
+ 180:	6ffa                	move\.d \[\$acr\],\$acr
+ 182:	bf09                	jump \$acr
+ 184:	b005                	nop 
+ 186:	3f7e .... ....      	move .*,\$mof
+ 18c:	bf0e .... ....      	ba .*
+ 192:	b005                	nop 
 
-0+1e8 <dsofn@plt>:
- 1e8:	6f0d ..00 0000      	addo\.d .*
- 1ee:	6ffa                	move\.d \[\$acr\],\$acr
- 1f0:	bf09                	jump \$acr
- 1f2:	b005                	nop 
- 1f4:	3f7e .... ....      	move .*,\$mof
- 1fa:	bf0e baff ffff      	ba 1b4 <.*>
- 200:	b005                	nop 
+0+194 <dsofn@plt>:
+ 194:	6f0d ..00 0000      	addo\.d .*
+ 19a:	6ffa                	move\.d \[\$acr\],\$acr
+ 19c:	bf09                	jump \$acr
+ 19e:	b005                	nop 
+ 1a0:	3f7e .... ....      	move .*,\$mof
+ 1a6:	bf0e baff ffff      	ba 160 <.*>
+ 1ac:	b005                	nop 
 
 Disassembly of section \.text:
 #...
-0+202 <dsofn3>:
- 202:	bfbe e6ff ffff      	bsr 1e8 <dsofn@plt>
- 208:	b005                	nop 
+0+1ae <dsofn3>:
+ 1ae:	bfbe e6ff ffff      	bsr 194 <dsofn@plt>
+ 1b4:	b005                	nop 
 
-0+20a <dsofn4>:
- 20a:	7f0d ae20 0000      	lapc 22b8 <_GLOBAL_OFFSET_TABLE_>,\$r0
- 210:	5f0d 1400           	addo\.w 0x14,\$r0,\$acr
- 214:	bfbe baff ffff      	bsr 1ce <.*>
+0+1b6 <dsofn4>:
+ 1b6:	7f0d ae20 0000      	lapc 2264 <_GLOBAL_OFFSET_TABLE_>,\$r0
+ 1bc:	5f0d 1400           	addo\.w 0x14,\$r0,\$acr
+ 1c0:	bfbe baff ffff      	bsr 17a <.*>
 #pass
diff --git a/ld/testsuite/ld-cris/dso-pltdis2.d b/ld/testsuite/ld-cris/dso-pltdis2.d
index 1acea4e..c6f53fd 100644
--- a/ld/testsuite/ld-cris/dso-pltdis2.d
+++ b/ld/testsuite/ld-cris/dso-pltdis2.d
@@ -12,43 +12,43 @@
 
 Disassembly of section \.plt:
 
-0+1b4 <.*>:
-
- 1b4:	84e2                	subq 4,\$sp
- 1b6:	0401                	addoq 4,\$r0,\$acr
- 1b8:	7e7a                	move \$mof,\[\$sp\]
- 1ba:	3f7a                	move \[\$acr\],\$mof
- 1bc:	04f2                	addq 4,\$acr
- 1be:	6ffa                	move\.d \[\$acr\],\$acr
- 1c0:	bf09                	jump \$acr
- 1c2:	b005                	nop 
+0+160 <.*>:
+
+ 160:	84e2                	subq 4,\$sp
+ 162:	0401                	addoq 4,\$r0,\$acr
+ 164:	7e7a                	move \$mof,\[\$sp\]
+ 166:	3f7a                	move \[\$acr\],\$mof
+ 168:	04f2                	addq 4,\$acr
+ 16a:	6ffa                	move\.d \[\$acr\],\$acr
+ 16c:	bf09                	jump \$acr
+ 16e:	b005                	nop 
 	\.\.\.
 
-000001ce <dsofn4@plt>:
- 1ce:	6f0d ..00 0000      	addo\.d .*
- 1d4:	6ffa                	move\.d \[\$acr\],\$acr
- 1d6:	bf09                	jump \$acr
- 1d8:	b005                	nop 
- 1da:	3f7e .... ....      	move .*,\$mof
- 1e0:	bf0e .... ....      	ba .*
- 1e6:	b005                	nop 
+0000017a <dsofn4@plt>:
+ 17a:	6f0d ..00 0000      	addo\.d .*
+ 180:	6ffa                	move\.d \[\$acr\],\$acr
+ 182:	bf09                	jump \$acr
+ 184:	b005                	nop 
+ 186:	3f7e .... ....      	move .*,\$mof
+ 18c:	bf0e .... ....      	ba .*
+ 192:	b005                	nop 
 #...
- 1e8:	6f0d ..00 0000      	addo\.d .*
- 1ee:	6ffa                	move\.d \[\$acr\],\$acr
- 1f0:	bf09                	jump \$acr
- 1f2:	b005                	nop 
- 1f4:	3f7e .... ....      	move .*,\$mof
- 1fa:	bf0e .... ....      	ba .*
- 200:	b005                	nop 
+ 194:	6f0d ..00 0000      	addo\.d .*
+ 19a:	6ffa                	move\.d \[\$acr\],\$acr
+ 19c:	bf09                	jump \$acr
+ 19e:	b005                	nop 
+ 1a0:	3f7e .... ....      	move .*,\$mof
+ 1a6:	bf0e .... ....      	ba .*
+ 1ac:	b005                	nop 
 
 Disassembly of section \.text:
 #...
-0+202 <dsofn3>:
- 202:	bfbe e6ff ffff      	bsr 1e8 <.*>
- 208:	b005                	nop 
-
-0+20a <dsofn4>:
- 20a:	7f0d ae20 0000      	lapc 22b8 <_GLOBAL_OFFSET_TABLE_>,\$r0
- 210:	5f0d ..00           	addo\.w 0x..,\$r0,\$acr
- 214:	bfbe baff ffff      	bsr 1ce <dsofn4@plt>
+0+1ae <dsofn3>:
+ 1ae:	bfbe e6ff ffff      	bsr 194 <.*>
+ 1b4:	b005                	nop 
+
+0+1b6 <dsofn4>:
+ 1b6:	7f0d ae20 0000      	lapc 2264 <_GLOBAL_OFFSET_TABLE_>,\$r0
+ 1bc:	5f0d ..00           	addo\.w 0x..,\$r0,\$acr
+ 1c0:	bfbe baff ffff      	bsr 17a <dsofn4@plt>
 #pass
diff --git a/ld/testsuite/ld-cris/dso12-pltdis.d b/ld/testsuite/ld-cris/dso12-pltdis.d
index 0bfb846..429f91e 100644
--- a/ld/testsuite/ld-cris/dso12-pltdis.d
+++ b/ld/testsuite/ld-cris/dso12-pltdis.d
@@ -11,44 +11,44 @@
 
 Disassembly of section \.plt:
 
-0+1e4 <.plt>:
-
- 1e4:	84e2                	subq 4,\$sp
- 1e6:	0401                	addoq 4,\$r0,\$acr
- 1e8:	7e7a                	move \$mof,\[\$sp\]
- 1ea:	3f7a                	move \[\$acr\],\$mof
- 1ec:	04f2                	addq 4,\$acr
- 1ee:	6ffa                	move\.d \[\$acr\],\$acr
- 1f0:	bf09                	jump \$acr
- 1f2:	b005                	nop 
+0+198 <.plt>:
+
+ 198:	84e2                	subq 4,\$sp
+ 19a:	0401                	addoq 4,\$r0,\$acr
+ 19c:	7e7a                	move \$mof,\[\$sp\]
+ 19e:	3f7a                	move \[\$acr\],\$mof
+ 1a0:	04f2                	addq 4,\$acr
+ 1a2:	6ffa                	move\.d \[\$acr\],\$acr
+ 1a4:	bf09                	jump \$acr
+ 1a6:	b005                	nop 
 	\.\.\.
 
-0+1fe <dsofn4@plt>:
- 1fe:	6f0d 0c00 0000      	addo\.d c <.*>,\$r0,\$acr
- 204:	6ffa                	move\.d \[\$acr\],\$acr
- 206:	bf09                	jump \$acr
- 208:	b005                	nop 
- 20a:	3f7e 0000 0000      	move 0 <.*>,\$mof
- 210:	bf0e d4ff ffff      	ba 1e4 <.*>
- 216:	b005                	nop 
-
-0+218 <dsofn@plt>:
- 218:	6f0d 1000 0000      	addo\.d 10 <.*>,\$r0,\$acr
- 21e:	6ffa                	move\.d \[\$acr\],\$acr
- 220:	bf09                	jump \$acr
- 222:	b005                	nop 
- 224:	3f7e 0c00 0000      	move c <.*>,\$mof
- 22a:	bf0e baff ffff      	ba 1e4 <.*>
- 230:	b005                	nop 
+0+1b2 <dsofn4@plt>:
+ 1b2:	6f0d 0c00 0000      	addo\.d c <.*>,\$r0,\$acr
+ 1b8:	6ffa                	move\.d \[\$acr\],\$acr
+ 1ba:	bf09                	jump \$acr
+ 1bc:	b005                	nop 
+ 1be:	3f7e 0000 0000      	move 0 <.*>,\$mof
+ 1c4:	bf0e d4ff ffff      	ba 198 <.*>
+ 1ca:	b005                	nop 
+
+0+1cc <dsofn@plt>:
+ 1cc:	6f0d 1000 0000      	addo\.d 10 <.*>,\$r0,\$acr
+ 1d2:	6ffa                	move\.d \[\$acr\],\$acr
+ 1d4:	bf09                	jump \$acr
+ 1d6:	b005                	nop 
+ 1d8:	3f7e 0c00 0000      	move c <.*>,\$mof
+ 1de:	bf0e baff ffff      	ba 198 <.*>
+ 1e4:	b005                	nop 
 
 Disassembly of section \.text:
 #...
-0+236 <dsofn3>:
- 236:	bfbe e2ff ffff      	bsr 218 <dsofn@plt>
- 23c:	b005                	nop 
-
-0+23e <dsofn4>:
- 23e:	7f0d a620 0000      	lapc 22e4 <_GLOBAL_OFFSET_TABLE_>,\$r0
- 244:	5f0d 1400           	addo\.w 0x14,\$r0,\$acr
- 248:	bfbe b6ff ffff      	bsr 1fe <dsofn4@plt>
+0+1ea <dsofn3>:
+ 1ea:	bfbe e2ff ffff      	bsr 1cc <dsofn@plt>
+ 1f0:	b005                	nop 
+
+0+1f2 <dsofn4>:
+ 1f2:	7f0d a620 0000      	lapc 2298 <_GLOBAL_OFFSET_TABLE_>,\$r0
+ 1f8:	5f0d 1400           	addo\.w 0x14,\$r0,\$acr
+ 1fc:	bfbe b6ff ffff      	bsr 1b2 <dsofn4@plt>
 #pass
diff --git a/ld/testsuite/ld-cris/gotplt1.d b/ld/testsuite/ld-cris/gotplt1.d
index 0f5472f..28724d7 100644
--- a/ld/testsuite/ld-cris/gotplt1.d
+++ b/ld/testsuite/ld-cris/gotplt1.d
@@ -19,30 +19,30 @@
 
 DYNAMIC RELOCATION RECORDS
 OFFSET   TYPE              VALUE 
-00082280 R_CRIS_JUMP_SLOT  dsofn
+00082224 R_CRIS_JUMP_SLOT  dsofn
 
 Contents of section .*
 #...
 Contents of section \.rela\.plt:
- 80190 80220800 0b040000 00000000           .*
+ 80134 24220800 0b010000 00000000           .*
 Contents of section \.plt:
- 8019c fce17e7e 7f0d7822 0800307a 7f0d7c22  .*
- 801ac 08003009 7f0d8022 08003009 3f7e0000  .*
- 801bc 00002ffe d8ffffff                    .*
+ 80140 fce17e7e 7f0d1c22 0800307a 7f0d2022  .*
+ 80150 08003009 7f0d2422 08003009 3f7e0000  .*
+ 80160 00002ffe d8ffffff                    .*
 Contents of section \.text:
- 801c4 5f1d0c00 30096f1d 0c000000 30090000  .*
- 801d4 6f0d1000 0000611a 6f2eb001 08000000  .*
- 801e4 6f3e70df ffff0000                    .*
+ 80168 5f1d0c00 30096f1d 0c000000 30090000  .*
+ 80178 6f0d1000 0000611a 6f2e5401 08000000  .*
+ 80188 6f3e70df ffff0000                    .*
 Contents of section \.dynamic:
- 821ec 01000000 01000000 04000000 e4000800  .*
- 821fc 05000000 5c010800 06000000 0c010800  .*
- 8220c 0a000000 32000000 0b000000 10000000  .*
- 8221c 15000000 00000000 03000000 74220800  .*
- 8222c 02000000 0c000000 14000000 07000000  .*
- 8223c 17000000 90010800 00000000 00000000  .*
- 8224c 00000000 00000000 00000000 00000000  .*
- 8225c 00000000 00000000 00000000 00000000  .*
- 8226c 00000000 00000000                    .*
+ 82190 01000000 01000000 04000000 e4000800  .*
+ 821a0 05000000 18010800 06000000 f8000800  .*
+ 821b0 0a000000 1a000000 0b000000 10000000  .*
+ 821c0 15000000 00000000 03000000 18220800  .*
+ 821d0 02000000 0c000000 14000000 07000000  .*
+ 821e0 17000000 34010800 00000000 00000000  .*
+ 821f0 00000000 00000000 00000000 00000000  .*
+ 82200 00000000 00000000 00000000 00000000  .*
+ 82210 00000000 00000000                    .*
 Contents of section \.got:
- 82274 ec210800 00000000 00000000 b8010800  .*
- 82284 b0010800                             .*
+ 82218 90210800 00000000 00000000 5c010800  .*
+ 82228 54010800                             .*
diff --git a/ld/testsuite/ld-cris/gotplt2.d b/ld/testsuite/ld-cris/gotplt2.d
index 3a28111..9f618d2 100644
--- a/ld/testsuite/ld-cris/gotplt2.d
+++ b/ld/testsuite/ld-cris/gotplt2.d
@@ -16,22 +16,22 @@
 
 DYNAMIC RELOCATION RECORDS
 OFFSET   TYPE              VALUE 
-00002230 R_CRIS_GLOB_DAT   dsofn
+000021e4 R_CRIS_GLOB_DAT   dsofn
 
 Contents of section .*
 #...
 Contents of section \.rela\.got:
- 0188 30220000 0a080000 00000000           .*
+ 013c e4210000 0a050000 00000000           .*
 Contents of section \.text:
- 0194 5f1d0c00 30096f1d 0c000000 30090000  .*
- 01a4 6f0d0c00 0000611a 6f3e88df ffff0000  .*
+ 0148 5f1d0c00 30096f1d 0c000000 30090000  .*
+ 0158 6f0d0c00 0000611a 6f3e88df ffff0000  .*
 Contents of section \.dynamic:
- 21b4 04000000 94000000 05000000 5c010000  .*
- 21c4 06000000 cc000000 0a000000 2a000000  .*
- 21d4 0b000000 10000000 07000000 88010000  .*
- 21e4 08000000 0c000000 09000000 0c000000  .*
- 21f4 00000000 00000000 00000000 00000000  .*
- 2204 00000000 00000000 00000000 00000000  .*
- 2214 00000000 00000000 00000000 00000000  .*
+ 2168 04000000 94000000 05000000 20010000  .*
+ 2178 06000000 c0000000 0a000000 19000000  .*
+ 2188 0b000000 10000000 07000000 3c010000  .*
+ 2198 08000000 0c000000 09000000 0c000000  .*
+ 21a8 00000000 00000000 00000000 00000000  .*
+ 21b8 00000000 00000000 00000000 00000000  .*
+ 21c8 00000000 00000000 00000000 00000000  .*
 Contents of section \.got:
- 2224 b4210000 00000000 00000000 00000000  .*
+ 21d8 68210000 00000000 00000000 00000000  .*
diff --git a/ld/testsuite/ld-cris/gotplt3.d b/ld/testsuite/ld-cris/gotplt3.d
index 727a17c..331626f 100644
--- a/ld/testsuite/ld-cris/gotplt3.d
+++ b/ld/testsuite/ld-cris/gotplt3.d
@@ -13,23 +13,23 @@
 
 DYNAMIC RELOCATION RECORDS
 OFFSET   TYPE              VALUE 
-00002234 R_CRIS_GLOB_DAT   dsofn
+000021e8 R_CRIS_GLOB_DAT   dsofn
 
 Contents of section .*
 #...
 Contents of section \.rela\.got:
- 0188 34220000 0a080000 00000000           .*
+ 013c e8210000 0a050000 00000000           .*
 Contents of section \.text:
- 0194 5f1d0c00 30096f1d 0c000000 30090000  .*
- 01a4 6f0d0c00 0000611a 6f3e84df ffff0000  .*
- 01b4 0f050000                             .*
+ 0148 5f1d0c00 30096f1d 0c000000 30090000  .*
+ 0158 6f0d0c00 0000611a 6f3e84df ffff0000  .*
+ 0168 0f050000                             .*
 Contents of section \.dynamic:
- 21b8 04000000 94000000 05000000 5c010000  .*
- 21c8 06000000 cc000000 0a000000 2a000000  .*
- 21d8 0b000000 10000000 07000000 88010000  .*
- 21e8 08000000 0c000000 09000000 0c000000  .*
- 21f8 00000000 00000000 00000000 00000000  .*
- 2208 00000000 00000000 00000000 00000000  .*
- 2218 00000000 00000000 00000000 00000000  .*
+ 216c 04000000 94000000 05000000 20010000  .*
+ 217c 06000000 c0000000 0a000000 19000000  .*
+ 218c 0b000000 10000000 07000000 3c010000  .*
+ 219c 08000000 0c000000 09000000 0c000000  .*
+ 21ac 00000000 00000000 00000000 00000000  .*
+ 21bc 00000000 00000000 00000000 00000000  .*
+ 21cc 00000000 00000000 00000000 00000000  .*
 Contents of section \.got:
- 2228 b8210000 00000000 00000000 00000000  .*
+ 21dc 6c210000 00000000 00000000 00000000  .*
diff --git a/ld/testsuite/ld-cris/hiddef1.d b/ld/testsuite/ld-cris/hiddef1.d
index 3d158d1..602f1bf 100644
--- a/ld/testsuite/ld-cris/hiddef1.d
+++ b/ld/testsuite/ld-cris/hiddef1.d
@@ -22,7 +22,7 @@ Relocation section '\.rela\.dyn' at offset 0x[0-9a-f]+ contains 1 entry:
 #...
 [0-9a-f]+  0+c R_CRIS_RELATIVE +[0-9a-f]+
 #...
-Symbol table '\.dynsym' contains 6 entries:
+Symbol table '\.dynsym' contains 3 entries:
 #...
-Symbol table '\.symtab' contains 18 entries:
+Symbol table '\.symtab' contains 15 entries:
 #pass
diff --git a/ld/testsuite/ld-cris/libdso-1.d b/ld/testsuite/ld-cris/libdso-1.d
index aa41d4f..2ad44af 100644
--- a/ld/testsuite/ld-cris/libdso-1.d
+++ b/ld/testsuite/ld-cris/libdso-1.d
@@ -9,5 +9,5 @@
 
 DYNAMIC SYMBOL TABLE:
 #...
-00000[12].[02468ace] g    DF .text	0+2 dsofn
+000000.[02468ace] g    DF .text	0+2 dsofn
 #pass
diff --git a/ld/testsuite/ld-cris/libdso-10.d b/ld/testsuite/ld-cris/libdso-10.d
index 83a1464..ee7f7e1 100644
--- a/ld/testsuite/ld-cris/libdso-10.d
+++ b/ld/testsuite/ld-cris/libdso-10.d
@@ -9,29 +9,29 @@
 
 Program Header:
     LOAD off    0x0+ vaddr 0x0+ paddr 0x0+ align 2\*\*13
-         filesz 0x0+144 memsz 0x0+144 flags r-x
-    LOAD off    0x0+144 vaddr 0x0+2144 paddr 0x0+2144 align 2\*\*13
+         filesz 0x0+e8 memsz 0x0+e8 flags r-x
+    LOAD off    0x0+e8 vaddr 0x0+20e8 paddr 0x0+20e8 align 2\*\*13
          filesz 0x0+64 memsz 0x0+64 flags rw-
- DYNAMIC off    0x0+144 vaddr 0x0+2144 paddr 0x0+2144 align 2\*\*2
+ DYNAMIC off    0x0+e8 vaddr 0x0+20e8 paddr 0x0+20e8 align 2\*\*2
          filesz 0x0+58 memsz 0x0+58 flags rw-
 Dynamic Section:
   HASH.*0x0*94
-  STRTAB.*0x0*120
-  SYMTAB.*0x0*c0
-  STRSZ.*0x0*1f
+  STRTAB.*0x0*dc
+  SYMTAB.*0x0*ac
+  STRSZ.*0x0*7
   SYMENT.*0x0*10
 private flags = 2: \[v32\]
 Sections:
 Idx Name          Size      VMA       LMA       File off  Algn
-  0 \.hash         0+2c  0+94  0+94  0+94  2\*\*2
+  0 \.hash         0+18  0+94  0+94  0+94  2\*\*2
                   CONTENTS, ALLOC, LOAD, READONLY, DATA
-  1 \.dynsym       0+60  0+c0  0+c0  0+c0  2\*\*2
+  1 \.dynsym       0+30  0+ac  0+ac  0+ac  2\*\*2
                   CONTENTS, ALLOC, LOAD, READONLY, DATA
-  2 \.dynstr       0+1f  0+120  0+120  0+120  2\*\*0
+  2 \.dynstr       0+7  0+dc  0+dc  0+dc  2\*\*0
                   CONTENTS, ALLOC, LOAD, READONLY, DATA
-  3 \.text         0+4  0+140  0+140  0+140  2\*\*1
+  3 \.text         0+4  0+e4  0+e4  0+e4  2\*\*1
                   CONTENTS, ALLOC, LOAD, READONLY, CODE
-  4 \.dynamic      0+58  0+2144  0+2144  0+144  2\*\*2
+  4 \.dynamic      0+58  0+20e8  0+20e8  0+e8  2\*\*2
                   CONTENTS, ALLOC, LOAD, DATA
-  5 \.got          0+c  0+219c  0+219c  0+19c  2\*\*2
+  5 \.got          0+c  0+2140  0+2140  0+140  2\*\*2
                   CONTENTS, ALLOC, LOAD, DATA
diff --git a/ld/testsuite/ld-cris/libdso-11.d b/ld/testsuite/ld-cris/libdso-11.d
index b462433..b8e3742 100644
--- a/ld/testsuite/ld-cris/libdso-11.d
+++ b/ld/testsuite/ld-cris/libdso-11.d
@@ -8,20 +8,20 @@
 
 DYNAMIC SYMBOL TABLE:
 #...
-0+1a0 g    DF \.text	0+8 dsofn3
+0+144 g    DF \.text	0+8 dsofn3
 #...
-0+19c g    DF \.text	0+2 dsofn
+0+140 g    DF \.text	0+2 dsofn
 #...
 Contents of section \.rela\.plt:
- 015c 2c220000 0b060000 00000000           .*
+ 0100 d0210000 0b030000 00000000           .*
 Contents of section \.plt:
- 0168 84e20401 7e7a3f7a 04f26ffa bf09b005  .*
- 0178 00000000 00000000 00006f0d 0c000000  .*
- 0188 6ffabf09 b0053f7e 00000000 bf0ed4ff  .*
- 0198 ffffb005                             .*
+ 010c 84e20401 7e7a3f7a 04f26ffa bf09b005  .*
+ 011c 00000000 00000000 00006f0d 0c000000  .*
+ 012c 6ffabf09 b0053f7e 00000000 bf0ed4ff  .*
+ 013c ffffb005                             .*
 Contents of section \.text:
- 019c b0050000 bfbee2ff ffffb005           .*
+ 0140 b0050000 bfbee2ff ffffb005           .*
 Contents of section \.dynamic:
 #...
 Contents of section \.got:
- 2220 a8210000 00000000 00000000 8e010000  .*
+ 21c4 4c210000 00000000 00000000 32010000  .*
diff --git a/ld/testsuite/ld-cris/libdso-12.d b/ld/testsuite/ld-cris/libdso-12.d
index eba3ef4..7fe8342 100644
--- a/ld/testsuite/ld-cris/libdso-12.d
+++ b/ld/testsuite/ld-cris/libdso-12.d
@@ -12,40 +12,40 @@
 
 DYNAMIC SYMBOL TABLE:
 #...
-0+23e g    DF \.text	0+12 dsofn4
-0+234 g    DF \.text	0+2 expfn
-0+22fc g    DO \.data	0+4 expobj
+0+1f2 g    DF \.text	0+12 dsofn4
+0+1e8 g    DF \.text	0+2 expfn
+0+22b0 g    DO \.data	0+4 expobj
 #...
-0+236 g    DF \.text	0+8 dsofn3
+0+1ea g    DF \.text	0+8 dsofn3
 #...
 0+      D  \*UND\*	0+ dsofn
 #...
 Contents of section \.rela\.got:
- 01c0 f8220000 0a040000 00000000           .*
+ 0174 ac220000 0a040000 00000000           .*
 Contents of section \.rela\.plt:
- 01cc f0220000 0b020000 00000000 f4220000  .*
- 01dc 0b0a0000 00000000                    .*
+ 0180 a4220000 0b020000 00000000 a8220000  .*
+ 0190 0b070000 00000000                    .*
 Contents of section \.plt:
- 01e4 84e20401 7e7a3f7a 04f26ffa bf09b005  .*
- 01f4 00000000 00000000 00006f0d 0c000000  .*
- 0204 6ffabf09 b0053f7e 00000000 bf0ed4ff  .*
- 0214 ffffb005 6f0d1000 00006ffa bf09b005  .*
- 0224 3f7e0c00 0000bf0e baffffff b005      .*
+ 0198 84e20401 7e7a3f7a 04f26ffa bf09b005  .*
+ 01a8 00000000 00000000 00006f0d 0c000000  .*
+ 01b8 6ffabf09 b0053f7e 00000000 bf0ed4ff  .*
+ 01c8 ffffb005 6f0d1000 00006ffa bf09b005  .*
+ 01d8 3f7e0c00 0000bf0e baffffff b005      .*
 Contents of section \.text:
- 0232 b005b005 bfbee2ff ffffb005 7f0da620  .*
- 0242 00005f0d 1400bfbe b6ffffff b0050000  .*
+ 01e6 b005b005 bfbee2ff ffffb005 7f0da620  .*
+ 01f6 00005f0d 1400bfbe b6ffffff b0050000  .*
 Contents of section \.dynamic:
- 2254 04000000 94000000 05000000 84010000  .*
- 2264 06000000 d4000000 0a000000 3a000000  .*
- 2274 0b000000 10000000 03000000 e4220000  .*
- 2284 02000000 18000000 14000000 07000000  .*
- 2294 17000000 cc010000 07000000 c0010000  .*
- 22a4 08000000 0c000000 09000000 0c000000  .*
- 22b4 00000000 00000000 00000000 00000000  .*
- 22c4 00000000 00000000 00000000 00000000  .*
- 22d4 00000000 00000000 00000000 00000000  .*
+ 2208 04000000 94000000 05000000 48010000  .*
+ 2218 06000000 c8000000 0a000000 29000000  .*
+ 2228 0b000000 10000000 03000000 98220000  .*
+ 2238 02000000 18000000 14000000 07000000  .*
+ 2248 17000000 80010000 07000000 74010000  .*
+ 2258 08000000 0c000000 09000000 0c000000  .*
+ 2268 00000000 00000000 00000000 00000000  .*
+ 2278 00000000 00000000 00000000 00000000  .*
+ 2288 00000000 00000000 00000000 00000000  .*
 Contents of section \.got:
- 22e4 54220000 00000000 00000000 0a020000  .*
- 22f4 24020000 00000000                    .*
+ 2298 08220000 00000000 00000000 be010000  .*
+ 22a8 d8010000 00000000                    .*
 Contents of section \.data:
- 22fc 00000000                             .*
+ 22b0 00000000                             .*
diff --git a/ld/testsuite/ld-cris/libdso-12b.d b/ld/testsuite/ld-cris/libdso-12b.d
index fb63d84..215d188 100644
--- a/ld/testsuite/ld-cris/libdso-12b.d
+++ b/ld/testsuite/ld-cris/libdso-12b.d
@@ -11,40 +11,40 @@
 
 DYNAMIC SYMBOL TABLE:
 #...
-0+23e g    DF \.text	0+12 dsofn4
-0+234 g    DF \.text	0+2 expfn
-0+22fc g    DO \.data	0+4 expobj
+0+1f2 g    DF \.text	0+12 dsofn4
+0+1e8 g    DF \.text	0+2 expfn
+0+22b0 g    DO \.data	0+4 expobj
 #...
-0+236 g    DF \.text	0+8 dsofn3
+0+1ea g    DF \.text	0+8 dsofn3
 #...
 0+      D  \*UND\*	0+ dsofn
 #...
 Contents of section \.rela\.dyn:
- 01c0 f8220000 0a040000 00000000           .*
+ 0174 ac220000 0a040000 00000000           .*
 Contents of section \.rela\.plt:
- 01cc f0220000 0b020000 00000000 f4220000  .*
- 01dc 0b0a0000 00000000                    .*
+ 0180 a4220000 0b020000 00000000 a8220000  .*
+ 0190 0b070000 00000000                    .*
 Contents of section \.plt:
- 01e4 84e20401 7e7a3f7a 04f26ffa bf09b005  .*
- 01f4 00000000 00000000 00006f0d 0c000000  .*
- 0204 6ffabf09 b0053f7e 00000000 bf0ed4ff  .*
- 0214 ffffb005 6f0d1000 00006ffa bf09b005  .*
- 0224 3f7e0c00 0000bf0e baffffff b005      .*
+ 0198 84e20401 7e7a3f7a 04f26ffa bf09b005  .*
+ 01a8 00000000 00000000 00006f0d 0c000000  .*
+ 01b8 6ffabf09 b0053f7e 00000000 bf0ed4ff  .*
+ 01c8 ffffb005 6f0d1000 00006ffa bf09b005  .*
+ 01d8 3f7e0c00 0000bf0e baffffff b005      .*
 Contents of section \.text:
- 0232 b005b005 bfbee2ff ffffb005 7f0da620  .*
- 0242 00005f0d 1400bfbe b6ffffff b0050000  .*
+ 01e6 b005b005 bfbee2ff ffffb005 7f0da620  .*
+ 01f6 00005f0d 1400bfbe b6ffffff b0050000  .*
 Contents of section \.dynamic:
- 2254 04000000 94000000 05000000 84010000  .*
- 2264 06000000 d4000000 0a000000 3a000000  .*
- 2274 0b000000 10000000 03000000 e4220000  .*
- 2284 02000000 18000000 14000000 07000000  .*
- 2294 17000000 cc010000 07000000 c0010000  .*
- 22a4 08000000 0c000000 09000000 0c000000  .*
- 22b4 00000000 00000000 00000000 00000000  .*
- 22c4 00000000 00000000 00000000 00000000  .*
- 22d4 00000000 00000000 00000000 00000000  .*
+ 2208 04000000 94000000 05000000 48010000  .*
+ 2218 06000000 c8000000 0a000000 29000000  .*
+ 2228 0b000000 10000000 03000000 98220000  .*
+ 2238 02000000 18000000 14000000 07000000  .*
+ 2248 17000000 80010000 07000000 74010000  .*
+ 2258 08000000 0c000000 09000000 0c000000  .*
+ 2268 00000000 00000000 00000000 00000000  .*
+ 2278 00000000 00000000 00000000 00000000  .*
+ 2288 00000000 00000000 00000000 00000000  .*
 Contents of section \.got:
- 22e4 54220000 00000000 00000000 0a020000  .*
- 22f4 24020000 00000000                    .*
+ 2298 08220000 00000000 00000000 be010000  .*
+ 22a8 d8010000 00000000                    .*
 Contents of section \.data:
- 22fc 00000000                             .*
+ 22b0 00000000                             .*
diff --git a/ld/testsuite/ld-cris/libdso-12c.d b/ld/testsuite/ld-cris/libdso-12c.d
index 5936956..949a0e7 100644
--- a/ld/testsuite/ld-cris/libdso-12c.d
+++ b/ld/testsuite/ld-cris/libdso-12c.d
@@ -14,28 +14,28 @@
 
 DYNAMIC SYMBOL TABLE:
 #...
-0+202 g[ 	]+DF \.text	0+2  Base[ 	]+expfn
-0+22bc g[ 	]+DO \.data	0+4  Base[ 	]+expobj
+0+1ae g[ 	]+DF \.text	0+2  Base[ 	]+expfn
+0+2268 g[ 	]+DO \.data	0+4  Base[ 	]+expobj
 #...
-0+204 g[ 	]+DF \.text	0+8  Base[ 	]+dsofn3
+0+1b0 g[ 	]+DF \.text	0+8  Base[ 	]+dsofn3
 #...
 Contents of section \.rela\.dyn:
- 01f4 b8220000 0a040000 00000000           .*
+ 01a0 64220000 0a040000 00000000           .*
 Contents of section \.text:
- 0200 b005b005 bfbe1c00 0000b005 7f0da020  .*
- 0210 00005f0d 0c00bfbe f6ffffff b0050000  .*
- 0220 b0050000                             .*
+ 01ac b005b005 bfbe1c00 0000b005 7f0da020  .*
+ 01bc 00005f0d 0c00bfbe f6ffffff b0050000  .*
+ 01cc b0050000                             .*
 Contents of section .dynamic:
- 2224 04000000 94000000 05000000 70010000  .*
- 2234 06000000 d0000000 0a000000 37000000  .*
- 2244 0b000000 10000000 07000000 f4010000  .*
- 2254 08000000 0c000000 09000000 0c000000  .*
- 2264 fcffff6f bc010000 fdffff6f 02000000  .*
- 2274 f0ffff6f a8010000 00000000 00000000  .*
- 2284 00000000 00000000 00000000 00000000  .*
- 2294 00000000 00000000 00000000 00000000  .*
- 22a4 00000000 00000000                    .*
+ 21d0 04000000 94000000 05000000 34010000  .*
+ 21e0 06000000 c4000000 0a000000 26000000  .*
+ 21f0 0b000000 10000000 07000000 a0010000  .*
+ 2200 08000000 0c000000 09000000 0c000000  .*
+ 2210 fcffff6f 68010000 fdffff6f 02000000  .*
+ 2220 f0ffff6f 5a010000 00000000 00000000  .*
+ 2230 00000000 00000000 00000000 00000000  .*
+ 2240 00000000 00000000 00000000 00000000  .*
+ 2250 00000000 00000000                    .*
 Contents of section \.got:
- 22ac 24220000 00000000 00000000 00000000  .*
+ 2258 d0210000 00000000 00000000 00000000  .*
 Contents of section \.data:
- 22bc 00000000                             .*
+ 2268 00000000                             .*
diff --git a/ld/testsuite/ld-cris/libdso-13.d b/ld/testsuite/ld-cris/libdso-13.d
index 11ee52c..b50a5af 100644
--- a/ld/testsuite/ld-cris/libdso-13.d
+++ b/ld/testsuite/ld-cris/libdso-13.d
@@ -15,9 +15,9 @@
 Dynamic section at offset 0x[0-9a-f][0-9a-f][0-9a-f] contains 11 entries:
   Tag[ 	]+Type[ 	]+Name/Value
  0x0+4 \(HASH\)[ 	]+0x94
- 0x0+5 \(STRTAB\)[ 	]+0x[12][0-9a-f][0-9a-f]
+ 0x0+5 \(STRTAB\)[ 	]+0x[0-9a-f][0-9a-f]
  0x0+6 \(SYMTAB\)[ 	]+0x[0-9a-f][0-9a-f]
- 0x0+a \(STRSZ\)[ 	]+38 \(bytes\)
+ 0x0+a \(STRSZ\)[ 	]+14 \(bytes\)
  0x0+b \(SYMENT\)[ 	]+16 \(bytes\)
  0x0+7 \(RELA\)[ 	]+0x[12][0-9a-f][0-9a-f]
  0x0+8 \(RELASZ\)[ 	]+12 \(bytes\)
diff --git a/ld/testsuite/ld-cris/libdso-13b.d b/ld/testsuite/ld-cris/libdso-13b.d
index 4008946..1afa0ea 100644
--- a/ld/testsuite/ld-cris/libdso-13b.d
+++ b/ld/testsuite/ld-cris/libdso-13b.d
@@ -8,7 +8,7 @@
 # script hiding the function called pcrel-without-plt.  There should
 # be no warning, no relocations in the output and no TEXTREL marking.
 
-Dynamic section at offset 0x1b0 contains 9 entries:
+Dynamic section at offset 0x150 contains 9 entries:
   Tag        Type                         Name/Value
  0x00000004 \(HASH\) .*
  0x00000005 \(STRTAB\) .*
diff --git a/ld/testsuite/ld-cris/libdso-14.d b/ld/testsuite/ld-cris/libdso-14.d
index b60f5e5..a697e97 100644
--- a/ld/testsuite/ld-cris/libdso-14.d
+++ b/ld/testsuite/ld-cris/libdso-14.d
@@ -7,12 +7,12 @@
 # Checking that a bsr to a non-PLT-decorated nonvisible function
 # doesn't make the DSO textrel.
 
-Dynamic section at offset 0x16c contains 6 entries:
+Dynamic section at offset 0x110 contains 6 entries:
   Tag[ 	]+Type[ 	]+Name/Value
  0x0+4 \(HASH\)[ 	]+0x94
- 0x0+5 \(STRTAB\)[ 	]+0x134
- 0x0+6 \(SYMTAB\)[ 	]+0xc4
- 0x0+a \(STRSZ\)[ 	]+38 \(bytes\)
+ 0x0+5 \(STRTAB\)[ 	]+0xf0
+ 0x0+6 \(SYMTAB\)[ 	]+0xb0
+ 0x0+a \(STRSZ\)[ 	]+14 \(bytes\)
  0x0+b \(SYMENT\)[ 	]+16 \(bytes\)
  0x0+ \(NULL\)[ 	]+0x0
 
diff --git a/ld/testsuite/ld-cris/libdso-15.d b/ld/testsuite/ld-cris/libdso-15.d
index 61b546b..6a53b1f 100644
--- a/ld/testsuite/ld-cris/libdso-15.d
+++ b/ld/testsuite/ld-cris/libdso-15.d
@@ -10,15 +10,15 @@
 
 DYNAMIC SYMBOL TABLE:
 #...
-0+2288 g[ 	]+DO .data[	 ]+0+4  TST3[ 	]+__expobj2
-0+20a g[ 	]+DF .text[	 ]+0+2  TST3[ 	]+__expfn2
-0+20a  w[ 	]+DF .text[	 ]+0+2  TST3[ 	]+expfn2
-0+2288  w[ 	]+DO .data[	 ]+0+4  TST3[ 	]+expobj2
+0+2238 g[ 	]+DO .data[	 ]+0+4  TST3[ 	]+__expobj2
+0+1ba g[ 	]+DF .text[	 ]+0+2  TST3[ 	]+__expfn2
+0+1ba  w[ 	]+DF .text[	 ]+0+2  TST3[ 	]+expfn2
+0+2238  w[ 	]+DO .data[	 ]+0+4  TST3[ 	]+expobj2
 #...
 Contents of section .text:
- 0208 0f050f05                             .*
+ 01b8 0f050f05                             .*
 #...
 Contents of section .got:
- 227c 0c220000 00000000 00000000           .*
+ 222c bc210000 00000000 00000000           .*
 Contents of section .data:
- 2288 00000000                             .*
+ 2238 00000000                             .*
diff --git a/ld/testsuite/ld-cris/libdso-15b.d b/ld/testsuite/ld-cris/libdso-15b.d
index 61ead56..4e2bddb 100644
--- a/ld/testsuite/ld-cris/libdso-15b.d
+++ b/ld/testsuite/ld-cris/libdso-15b.d
@@ -22,17 +22,17 @@ DYNAMIC SYMBOL TABLE:
 0+[	 ]+DF \*UND\*[	 ]+0+  TST3[	 ]+expfn2
 #...
 Contents of section .rela.dyn:
- 01d4 fc220000 0a040000 00000000 00230000  .*
- 01e4 0a050000 00000000                    .*
+ 017c a4220000 0a040000 00000000 a8220000  .*
+ 018c 0a050000 00000000                    .*
 Contents of section .plt:
- 01ec fce17e7e 0401307a 08013009 00000000  .*
- 01fc 00000000 6f0d0c00 00003009 3f7e0000  .*
- 020c 00002ffe ecffffff 6f0d1000 00003009  .*
- 021c 3f7e0000 00002ffe ecffffff           .*
+ 0194 fce17e7e 0401307a 08013009 00000000  .*
+ 01a4 00000000 6f0d0c00 00003009 3f7e0000  .*
+ 01b4 00002ffe ecffffff 6f0d1000 00003009  .*
+ 01c4 3f7e0000 00002ffe ecffffff           .*
 Contents of section .text:
- 0228 6fae0c00 00006fae ccffffff 6fae1000  .*
- 0238 00006fae d4ffffff                    .*
+ 01d0 6fae0c00 00006fae ccffffff 6fae1000  .*
+ 01e0 00006fae d4ffffff                    .*
 #...
 Contents of section .got:
- 22f0 40220000 00000000 00000000 00000000  .*
- 2300 00000000                             .*
+ 2298 e8210000 00000000 00000000 00000000  .*
+ 22a8 00000000                             .*
diff --git a/ld/testsuite/ld-cris/libdso-1c.d b/ld/testsuite/ld-cris/libdso-1c.d
index 0588d39..f02dc5e 100644
--- a/ld/testsuite/ld-cris/libdso-1c.d
+++ b/ld/testsuite/ld-cris/libdso-1c.d
@@ -19,17 +19,17 @@ DYNAMIC SYMBOL TABLE:
 0+[ 	]+DF \*UND\*	0+[ 	]+TST2[	 ]+expfn
 #...
 Contents of section .rela.dyn:
- 01a4 cc220000 0a030000 00000000 d0220000  .*
- 01b4 0a040000 00000000                    .*
+ 0140 68220000 0a020000 00000000 6c220000  .*
+ 0150 0a030000 00000000                    .*
 Contents of section .plt:
- 01bc fce17e7e 0401307a 08013009 00000000  .*
- 01cc 00000000 6f0d0c00 00003009 3f7e0000  .*
- 01dc 00002ffe ecffffff 6f0d1000 00003009  .*
- 01ec 3f7e0000 00002ffe ecffffff           .*
+ 0158 fce17e7e 0401307a 08013009 00000000  .*
+ 0168 00000000 6f0d0c00 00003009 3f7e0000  .*
+ 0178 00002ffe ecffffff 6f0d1000 00003009  .*
+ 0188 3f7e0000 00002ffe ecffffff           .*
 Contents of section .text:
- 01f8 6fae0c00 00006fae ccffffff 6fae1000  .*
- 0208 00006fae d4ffffff                    .*
+ 0194 6fae0c00 00006fae ccffffff 6fae1000  .*
+ 01a4 00006fae d4ffffff                    .*
 #...
 Contents of section .got:
- 22c0 10220000 00000000 00000000 00000000  .*
- 22d0 00000000                             .*
+ 225c ac210000 00000000 00000000 00000000  .*
+ 226c 00000000                             .*
diff --git a/ld/testsuite/ld-cris/libdso-1d.d b/ld/testsuite/ld-cris/libdso-1d.d
index a2a0ce5..06e72fc 100644
--- a/ld/testsuite/ld-cris/libdso-1d.d
+++ b/ld/testsuite/ld-cris/libdso-1d.d
@@ -13,24 +13,24 @@
 
 DYNAMIC SYMBOL TABLE:
 #...
-0+1f2  w   DF .text	0+2 expfn
-0+22a0  w   DO .data	0+4 expobj
+0+1a6  w   DF .text	0+2 expfn
+0+2254  w   DO .data	0+4 expobj
 #...
 Contents of section .rela.dyn:
- 0184 98220000 0a020000 00000000 9c220000  .*
- 0194 0a030000 00000000                    .*
+ 0138 4c220000 0a020000 00000000 50220000  .*
+ 0148 0a030000 00000000                    .*
 Contents of section .plt:
- 019c fce17e7e 0401307a 08013009 00000000  .*
- 01ac 00000000 6f0d0c00 00003009 3f7e0000  .*
- 01bc 00002ffe ecffffff 6f0d1000 00003009  .*
- 01cc 3f7e0000 00002ffe ecffffff           .*
+ 0150 fce17e7e 0401307a 08013009 00000000  .*
+ 0160 00000000 6f0d0c00 00003009 3f7e0000  .*
+ 0170 00002ffe ecffffff 6f0d1000 00003009  .*
+ 0180 3f7e0000 00002ffe ecffffff           .*
 Contents of section .text:
- 01d8 6fae1000 00006fae e0ffffff 6fae0c00  .*
- 01e8 00006fae c0ffffff 0f050f05           .*
+ 018c 6fae1000 00006fae e0ffffff 6fae0c00  .*
+ 019c 00006fae c0ffffff 0f050f05           .*
 Contents of section .dynamic:
 #...
 Contents of section .got:
- 228c f4210000 00000000 00000000 00000000  .*
- 229c 00000000                             .*
+ 2240 a8210000 00000000 00000000 00000000  .*
+ 2250 00000000                             .*
 Contents of section .data:
- 22a0 00000000                             .*
+ 2254 00000000                             .*
diff --git a/ld/testsuite/ld-cris/libdso-2.d b/ld/testsuite/ld-cris/libdso-2.d
index 7285b3d..83d56a1 100644
--- a/ld/testsuite/ld-cris/libdso-2.d
+++ b/ld/testsuite/ld-cris/libdso-2.d
@@ -36,7 +36,7 @@ Symbol table '\.dynsym' contains 4 entries:
  +2: 0+ +0 +OBJECT +GLOBAL +DEFAULT +ABS TST1
  +3: 0+154 +0 +FUNC +GLOBAL +DEFAULT +7 export_1@@TST1
 
-Symbol table '\.symtab' contains 18 entries:
+Symbol table '\.symtab' contains 15 entries:
  +Num: +Value +Size +Type +Bind +Vis +Ndx +Name
  +0: 0+ +0 +NOTYPE +LOCAL +DEFAULT +UND 
  +1: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +1 
@@ -49,10 +49,7 @@ Symbol table '\.symtab' contains 18 entries:
  +8: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +8 
  +9: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +9 
  +10: 0+2..[046c] +0 +OBJECT +LOCAL +DEFAULT +ABS _DYNAMIC
- +11: 0+2..[046c] +0 +NOTYPE +LOCAL +DEFAULT +9 __bss_start
- +12: 0+2..[046c] +0 +NOTYPE +LOCAL +DEFAULT +9 _edata
- +13: 0+2..[046c] +0 +OBJECT +LOCAL +DEFAULT +ABS _GLOBAL_OFFSET_TABLE_
- +14: 0+2..[046c] +0 +NOTYPE +LOCAL +DEFAULT +9 _end
- +15: 0+150 +2 +FUNC +LOCAL +DEFAULT +7 dsofn
- +16: 0+ +0 +OBJECT +GLOBAL +DEFAULT +ABS TST1
- +17: 0+154 +0 +FUNC +GLOBAL +DEFAULT +7 export_1
+ +11: 0+2..[046c] +0 +OBJECT +LOCAL +DEFAULT +ABS _GLOBAL_OFFSET_TABLE_
+ +12: 0+150 +2 +FUNC +LOCAL +DEFAULT +7 dsofn
+ +13: 0+ +0 +OBJECT +GLOBAL +DEFAULT +ABS TST1
+ +14: 0+154 +0 +FUNC +GLOBAL +DEFAULT +7 export_1
diff --git a/ld/testsuite/ld-cris/pic-gc-72.d b/ld/testsuite/ld-cris/pic-gc-72.d
index a471da5..65bd989 100644
--- a/ld/testsuite/ld-cris/pic-gc-72.d
+++ b/ld/testsuite/ld-cris/pic-gc-72.d
@@ -19,11 +19,11 @@ Contents of section .dynsym:
 Contents of section .dynstr:
 #...
 Contents of section .text:
- 016e 0f050f05                             .*
+ 0121 0f050f05                             .*
 Contents of section .dynamic:
- 2174 .*
+ 2128 .*
 #...
 Contents of section .got:
- 21cc 74210000 00000000 00000000           .*
+ 2180 28210000 00000000 00000000           .*
 Contents of section .data:
- 21d8 00000000                             .*
+ 218c 00000000                             .*
diff --git a/ld/testsuite/ld-cris/pic-gc-73.d b/ld/testsuite/ld-cris/pic-gc-73.d
index 8fd7f38..7f599b9 100644
--- a/ld/testsuite/ld-cris/pic-gc-73.d
+++ b/ld/testsuite/ld-cris/pic-gc-73.d
@@ -17,10 +17,10 @@ Contents of section .dynsym:
 Contents of section .dynstr:
 #...
 Contents of section .text:
- 016e 0f050f05                             .*
+ 0121 0f050f05                             .*
 Contents of section .dynamic:
 #...
 Contents of section .got:
- 21cc 74210000 00000000 00000000           .*
+ 2180 28210000 00000000 00000000           .*
 Contents of section .data:
- 21d8 00000000                             .*
+ 218c 00000000                             .*
diff --git a/ld/testsuite/ld-cris/pr16044.d b/ld/testsuite/ld-cris/pr16044.d
index cde2d39..30988b8 100644
--- a/ld/testsuite/ld-cris/pr16044.d
+++ b/ld/testsuite/ld-cris/pr16044.d
@@ -25,19 +25,16 @@
 
 Relocation section '\.rela\.dyn' at offset 0x[0-9a-f]+ contains 1 entry:
  Offset[ 	]+Info[ 	]+Type[ 	]+Sym\.Value  Sym\. Name \+ Addend
-[0-9a-f]+  0+[0-9a-f]+ R_CRIS_RELATIVE[ 	]+184
+[0-9a-f]+  0+[0-9a-f]+ R_CRIS_RELATIVE[ 	]+128
 
-Symbol table '\.dynsym' contains 7 entries:
+Symbol table '\.dynsym' contains 4 entries:
  +Num: +Value +Size +Type +Bind +Vis +Ndx +Name
  +0: 0+ +0 +NOTYPE +LOCAL +DEFAULT +UND 
  +1: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +5 
  +2: [0-9a-f]+ +0 +FUNC +GLOBAL +DEFAULT +5 export_1
- +3: [0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +7 __bss_start
- +4: [0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +7 _edata
- +5: [0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +7 _end
- +6: [0-9a-f]+ +0 +FUNC +GLOBAL +DEFAULT +5 export_2
+ +3: [0-9a-f]+ +0 +FUNC +GLOBAL +DEFAULT +5 export_2
 
 Symbol table '\.symtab' contains [0-9]+ entries:
 #...
- +[0-9]+: 0+184  +2 FUNC + LOCAL + DEFAULT + 5 dsofn
+ +[0-9]+: 0+128  +2 FUNC + LOCAL + DEFAULT + 5 dsofn
 #...
diff --git a/ld/testsuite/ld-cris/pv32-1.d b/ld/testsuite/ld-cris/pv32-1.d
index c811744..3b17e23 100644
--- a/ld/testsuite/ld-cris/pv32-1.d
+++ b/ld/testsuite/ld-cris/pv32-1.d
@@ -8,33 +8,30 @@
 .*:     file format elf32-cris
 
 DYNAMIC SYMBOL TABLE:
-0+8021e      DF \*UND\*	0+ expfn
-0+82324 g    DO \.bss	0+4 expobj
-0+82324 g    D  \.bss	0+ __bss_start
-0+80238      DF \*UND\*	0+ dsofn3
-0+82324 g    D  \.got	0+ _edata
-0+82340 g    D  \.bss	0+ _end
-0+80264 g    DF \.text	0+8 dsofn
+0+801ca      DF \*UND\*	0+ expfn
+0+822d0 g    DO \.bss	0+4 expobj
+0+801e4      DF \*UND\*	0+ dsofn3
+0+80210 g    DF \.text	0+8 dsofn
 
 Contents of section \.interp:
  800d4 2f6c6962 2f6c642e 736f2e31 00        .*
 #...
 Contents of section \.rela\.dyn:
- 801e0 24230800 09020000 00000000           .*
+ 8018c d0220800 09020000 00000000           .*
 Contents of section \.rela\.plt:
- 801ec 1c230800 0b010000 00000000 20230800  .*
- 801fc 0b040000 00000000                    .*
+ 80198 c8220800 0b010000 00000000 cc220800  .*
+ 801a8 0b030000 00000000                    .*
 Contents of section \.plt:
- 80204 84e26ffe 14230800 7e7a3f7a 04f26ffa  .*
- 80214 bf09b005 00000000 00006ffe 1c230800  .*
- 80224 6ffabf09 b0053f7e 00000000 bf0ed4ff  .*
- 80234 ffffb005 6ffe2023 08006ffa bf09b005  .*
- 80244 3f7e0c00 0000bf0e baffffff b005      .*
+ 801b0 84e26ffe c0220800 7e7a3f7a 04f26ffa  .*
+ 801c0 bf09b005 00000000 00006ffe c8220800  .*
+ 801d0 6ffabf09 b0053f7e 00000000 bf0ed4ff  .*
+ 801e0 ffffb005 6ffecc22 08006ffa bf09b005  .*
+ 801f0 3f7e0c00 0000bf0e baffffff b005      .*
 Contents of section \.text:
- 80252 b005bfbe caffffff b005bfbe dcffffff  .*
- 80262 b0056fae 24230800 b0050000           .*
+ 801fe b005bfbe caffffff b005bfbe dcffffff  .*
+ 8020e b0056fae d0220800 b0050000           .*
 Contents of section \.dynamic:
 #...
 Contents of section \.got:
- 82310 70220800 00000000 00000000 2a020800  .*
- 82320 44020800                             .*
+ 822bc 1c220800 00000000 00000000 d6010800  .*
+ 822cc f0010800                             .*
diff --git a/ld/testsuite/ld-cris/tls-dso-dtpoffd2.d b/ld/testsuite/ld-cris/tls-dso-dtpoffd2.d
index 7459d9f..12fe7f8 100644
--- a/ld/testsuite/ld-cris/tls-dso-dtpoffd2.d
+++ b/ld/testsuite/ld-cris/tls-dso-dtpoffd2.d
@@ -23,13 +23,13 @@ SYMBOL TABLE:
 0+80 g       .tdata	0+4 x
 #...
 Contents of section .rela.dyn:
- 01a4 b8220000 17030000 00000000           .*
+ 0154 68220000 17030000 00000000           .*
 Contents of section .text:
- 01b0 41b20000 5fae0c00                    .*
+ 0160 41b20000 5fae0c00                    .*
 #...
 Contents of section .got:
- 22ac 3c220000 00000000 00000000 00000000  .*
- 22bc 00000000                             .*
+ 225c ec210000 00000000 00000000 00000000  .*
+ 226c 00000000                             .*
 Contents of section .debug_info:
  0000 80000000                             .*
 #...
diff --git a/ld/testsuite/ld-cris/tls-dso-dtpoffd4.d b/ld/testsuite/ld-cris/tls-dso-dtpoffd4.d
index c66a982..bb72e87 100644
--- a/ld/testsuite/ld-cris/tls-dso-dtpoffd4.d
+++ b/ld/testsuite/ld-cris/tls-dso-dtpoffd4.d
@@ -23,13 +23,13 @@ SYMBOL TABLE:
 0+80 g       .tbss	0+4 x
 #...
 Contents of section .rela.dyn:
- 01a4 b4220000 17030000 00000000           .*
+ 0154 64220000 17030000 00000000           .*
 Contents of section .text:
- 01b0 41b20000 5fae0c00                    .*
+ 0160 41b20000 5fae0c00                    .*
 #...
 Contents of section .got:
- 22a8 38220000 00000000 00000000 00000000  .*
- 22b8 00000000                             .*
+ 2258 e8210000 00000000 00000000 00000000  .*
+ 2268 00000000                             .*
 Contents of section .debug_info:
  0000 80000000                             .*
 #...
diff --git a/ld/testsuite/ld-cris/tls-dso-tpoffgotcomm1.d b/ld/testsuite/ld-cris/tls-dso-tpoffgotcomm1.d
index cfb44ac..4aa2794 100644
--- a/ld/testsuite/ld-cris/tls-dso-tpoffgotcomm1.d
+++ b/ld/testsuite/ld-cris/tls-dso-tpoffgotcomm1.d
@@ -11,7 +11,7 @@
 
 Program Header:
     LOAD off    0x0+ vaddr 0x0+ paddr 0x0+ align 2\*\*13
-         filesz 0x0+1c8 memsz 0x0+1c8 flags r-x
+         filesz 0x0+178 memsz 0x0+178 flags r-x
     LOAD off .*
          filesz .*
  DYNAMIC off .*
@@ -21,7 +21,7 @@ Program Header:
 #...
 Sections:
 #...
-  7 .got          0+14  0+2240  0+2240  0+240  2\*\*2
+  7 .got          0+14  0+21f0  0+21f0  0+1f0  2\*\*2
                   CONTENTS, ALLOC, LOAD, DATA
 SYMBOL TABLE:
 #...
@@ -31,16 +31,16 @@ SYMBOL TABLE:
 
 #...
 Contents of section .got:
- 2240 c8210000 00000000 00000000 00000000  .*
- 2250 00000000                             .*
+ 21f0 78210000 00000000 00000000 00000000  .*
+ 2200 00000000                             .*
 
 Disassembly of section \.text:
 
-0+1b8 <_start>:
- 1b8:	41b2                	moveq 1,\$r11
+0+168 <_start>:
+ 168:	41b2                	moveq 1,\$r11
 	\.\.\.
 
-0+1bc <do_test>:
- 1bc:	2f0e 0c00 0000      	add\.d c <bar\+0x8>,\$r0
- 1c2:	1f1e 1000           	add\.w 0x10,\$r1
+0+16c <do_test>:
+ 16c:	2f0e 0c00 0000      	add\.d c <bar\+0x8>,\$r0
+ 172:	1f1e 1000           	add\.w 0x10,\$r1
 	\.\.\.
diff --git a/ld/testsuite/ld-cris/tls-gc-71.d b/ld/testsuite/ld-cris/tls-gc-71.d
index 14feb3d..e32aada 100644
--- a/ld/testsuite/ld-cris/tls-gc-71.d
+++ b/ld/testsuite/ld-cris/tls-gc-71.d
@@ -15,18 +15,15 @@
          filesz 0x0+80 memsz 0x0+80 flags r--
 #...
 DYNAMIC SYMBOL TABLE:
-0+18e l    d  \.text	0+ \.text
-0+2194 l    d  \.tdata	0+ \.tdata
-0+18e g    DF \.text	0+2 _init
-0+2280 g    D  \.got	0+ __bss_start
+0+132 l    d  \.text	0+ \.text
+0+2138 l    d  \.tdata	0+ \.tdata
+0+132 g    DF \.text	0+2 _init
 0+ g    D  .tdata	0+80 tls128
-0+2280 g    D  \.got	0+ _edata
-0+2280 g    D  \.got	0+ _end
 
 DYNAMIC RELOCATION RECORDS \(none\)
 #...
 Contents of section \.text:
- 018e 0f050000                             .*
+ 0132 0f050000                             .*
 #...
 Contents of section \.got:
- 2274 14220000 00000000 00000000           .*
+ 2218 b8210000 00000000 00000000           .*
diff --git a/ld/testsuite/ld-cris/tls-gd-1.d b/ld/testsuite/ld-cris/tls-gd-1.d
index 789c54e..30ab7ef 100644
--- a/ld/testsuite/ld-cris/tls-gd-1.d
+++ b/ld/testsuite/ld-cris/tls-gd-1.d
@@ -12,21 +12,21 @@
 
 Program Header:
     LOAD off    0x0+ vaddr 0x0+ paddr 0x0+ align 2\*\*13
-         filesz 0x0+1a0 memsz 0x0+1a0 flags r-x
-    LOAD off    0x0+1a0 vaddr 0x0+21a0 paddr 0x0+21a0 align 2\*\*13
+         filesz 0x0+144 memsz 0x0+144 flags r-x
+    LOAD off    0x0+144 vaddr 0x0+2144 paddr 0x0+2144 align 2\*\*13
          filesz 0x0+108 memsz 0x0+108 flags rw-
- DYNAMIC off    0x0+224 vaddr 0x0+2224 paddr 0x0+2224 align 2\*\*2
+ DYNAMIC off    0x0+1c8 vaddr 0x0+21c8 paddr 0x0+21c8 align 2\*\*2
          filesz 0x0+70 memsz 0x0+70 flags rw-
-     TLS off    0x0+1a0 vaddr 0x0+21a0 paddr 0x0+21a0 align 2\*\*2
+     TLS off    0x0+144 vaddr 0x0+2144 paddr 0x0+2144 align 2\*\*2
          filesz 0x0+84 memsz 0x0+84 flags r--
 
 Dynamic Section:
   HASH                 0x0+b4
-  STRTAB               0x0+168
-  SYMTAB               0x0+e8
-  STRSZ                0x0+25
+  STRTAB               0x0+124
+  SYMTAB               0x0+d4
+  STRSZ                0x0+d
   SYMENT               0x0+10
-  RELA                 0x0+190
+  RELA                 0x0+134
   RELASZ               0x0+c
   RELAENT              0x0+c
 private flags = 0:
@@ -42,13 +42,13 @@ DYNAMIC SYMBOL TABLE:
 
 DYNAMIC RELOCATION RECORDS
 OFFSET   TYPE              VALUE 
-0+22a0 R_CRIS_DTP        x
+0+2244 R_CRIS_DTP        x
 
 Contents of section \.hash:
 #...
 Contents of section \.text:
- 019c 5fae0c00                             .*
+ 0140 5fae0c00                             .*
 #...
 Contents of section \.got:
- 2294 24220+ 0+ 0+ 0+  .*
- 22a4 0+                             .*
+ 2238 c8210+ 0+ 0+ 0+  .*
+ 2248 0+                             .*
diff --git a/ld/testsuite/ld-cris/tls-gd-1h.d b/ld/testsuite/ld-cris/tls-gd-1h.d
index db60081..b323312 100644
--- a/ld/testsuite/ld-cris/tls-gd-1h.d
+++ b/ld/testsuite/ld-cris/tls-gd-1h.d
@@ -12,21 +12,21 @@
 
 Program Header:
     LOAD off    0x0+ vaddr 0x0+ paddr 0x0+ align 2\*\*13
-         filesz 0x0+1a4 memsz 0x0+1a4 flags r-x
-    LOAD off    0x0+1a4 vaddr 0x0+21a4 paddr 0x0+21a4 align 2\*\*13
+         filesz 0x0+148 memsz 0x0+148 flags r-x
+    LOAD off    0x0+148 vaddr 0x0+2148 paddr 0x0+2148 align 2\*\*13
          filesz 0x0+108 memsz 0x0+108 flags rw-
- DYNAMIC off    0x0+228 vaddr 0x0+2228 paddr 0x0+2228 align 2\*\*2
+ DYNAMIC off    0x0+1cc vaddr 0x0+21cc paddr 0x0+21cc align 2\*\*2
          filesz 0x0+70 memsz 0x0+70 flags rw-
-     TLS off    0x0+1a4 vaddr 0x0+21a4 paddr 0x0+21a4 align 2\*\*2
+     TLS off    0x0+148 vaddr 0x0+2148 paddr 0x0+2148 align 2[...]

[diff truncated at 100000 bytes]


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]