Commit Graph

74 Commits

Author SHA1 Message Date
Alan Modra 4b95cf5c0c Update copyright years 2014-03-05 22:16:15 +10:30
Alan Modra 4115bfc683 Allow for extra st_other readelf output in ld testsuite
On PowerPC64 ELFv2 readelf emits [<localentry>: 8] describing extra
symbol st_other bits.

	* ld-elfvers/vers24.rd: Allow extra readelf output after
	symbol visibility.
	* ld-ifunc/ifunc.exp: Likewise.
2013-11-04 10:18:47 +10:30
Will Newton b59369fcbb ld/testsuite/ChangeLog:
2013-03-20  Will Newton  <will.newton@linaro.org>

        * ld-elfvers/vers.exp (objdump_symstuff): Sort objdump output
	based on the symbol name rather than address.
	* ld-elfvers/vers1.sym: Reorder contents to match changes to vers.exp.
	* ld-elfvers/vers15.sym: Likewise.
	* ld-elfvers/vers18.sym: Likewise.
	* ld-elfvers/vers21.sym: Likewise.
	* ld-elfvers/vers9.sym: Likewise.
2013-03-20 12:46:27 +00:00
Alan Modra 75c8d84d74 * ld-elfvers/vers.exp: Add -Wl,--no-as-needed to all tests
linking against shared libraries.
	* ld-elfweak/elfweak.exp: Likewise.  Enable for x86_64-linux.
	Build main1.o using $picflag.
2013-03-20 02:28:17 +00:00
Maciej W. Rozycki 897aea504d * lib/ld-lib.exp (run_ld_link_tests): Add another argument, pass
its contents to ar_simple_create and ld_simple_link after
	objfiles.
	* ld-aarch64/aarch64-elf.exp: Adjust accordingly.
	* ld-alpha/alpha.exp: Likewise.
	* ld-arm/arm-elf.exp: Likewise.
	* ld-arm/export-class.exp: Likewise.
	* ld-elf/comm-data.exp: Likewise.
	* ld-elf/eh-group.exp: Likewise.
	* ld-elf/elf.exp: Likewise.
	* ld-elf/export-class.exp: Likewise.
	* ld-elfvers/vers.exp: Likewise.
	* ld-frv/tls.exp: Likewise.
	* ld-i386/export-class.exp: Likewise.
	* ld-i386/i386.exp: Likewise.
	* ld-ia64/ia64.exp: Likewise.
	* ld-libs/libs.exp: Likewise.
	* ld-m68k/m68k.exp: Likewise.
	* ld-metag/metag.exp: Likewise.
	* ld-mips-elf/comm-data.exp: Likewise.
	* ld-mips-elf/export-class.exp: Likewise.
	* ld-mips-elf/mips-elf.exp: Likewise.
	* ld-mn10300/mn10300.exp: Likewise.
	* ld-pe/pe-compile.exp: Likewise.
	* ld-pe/pe.exp: Likewise.
	* ld-plugin/plugin.exp: Likewise.
	* ld-powerpc/aix52.exp: Likewise.
	* ld-powerpc/export-class.exp: Likewise.
	* ld-powerpc/powerpc.exp: Likewise.
	* ld-s390/s390.exp: Likewise.
	* ld-sh/sh-vxworks.exp: Likewise.
	* ld-sh/sh64/sh64.exp: Likewise.
	* ld-sparc/sparc.exp: Likewise.
	* ld-tic6x/tic6x.exp: Likewise.
	* ld-tilegx/tilegx.exp: Likewise.
	* ld-tilepro/tilepro.exp: Likewise.
	* ld-undefined/entry.exp: Likewise.
	* ld-vax-elf/vax-elf.exp: Likewise.
	* ld-x86-64/dwarfreloc.exp: Likewise.
	* ld-x86-64/export-class.exp: Likewise.
	* ld-x86-64/x86-64.exp: Likewise.
	* ld-xc16x/xc16x.exp: Likewise.
	* ld-xstormy16/xstormy16.exp: Likewise.
	* ld-xtensa/xtensa.exp: Likewise.
2013-02-19 01:10:06 +00:00
Nick Clifton a06ea96464 Add support for 64-bit ARM architecture: AArch64 2012-08-13 14:52:54 +00:00
Roland McGrath 5a68afcf73 bfd/
2012-04-03  Roland McGrath  <mcgrathr@google.com>

	* elf-nacl.c: New file.
	* elf-nacl.h: New file.
	* elf32-i386.c (elf_backend_modify_segment_map): Define for
	bfd_elf32_i386_nacl_vec.
	(elf_backend_modify_program_headers): Likewise.
	* elf64-x86-64.c (elf_backend_modify_segment_map): Define for
	bfd_elf64_x86_64_nacl_vec and bfd_elf32_x86_64_nacl_vec.
	(elf_backend_modify_program_headers): Likewise.
	* Makefile.am (BFD32_BACKENDS, BFD64_BACKENDS): Add elf-nacl.lo here.
	(BFD32_BACKENDS_CFILES, BFD64_BACKENDS_CFILES): Add elf-nacl.c here.
	* Makefile.in: Regenerated.
	* configure.in (bfd_elf64_x86_64_nacl_vec): Add elf-nacl.o to tb here.
	(bfd_elf32_x86_64_nacl_vec): Likewise.
	(bfd_elf64_x86_64_vec, bfd_elf32_x86_64_vec): Likewise.
	(bfd_elf64_x86_64_freebsd_vec, bfd_elf64_x86_64_sol2_vec): Likewise.
	(bfd_elf64_l1om_vec, bfd_elf64_l1om_freebsd_vec): Likewise.
	(bfd_elf64_k1om_vec, bfd_elf64_k1om_freebsd_vec): Likewise.
	(bfd_elf32_i386_nacl_vec): Likewise.
	(bfd_elf32_i386_sol2_vec, bfd_elf32_i386_freebsd_vec): Likewise.
	(bfd_elf32_i386_vxworks_vec, bfd_elf32_i386_vec): Likewise.
	* configure: Regenerated.

binutils/testsuite/
2012-04-03  Roland McGrath  <mcgrathr@google.com>

	* lib/binutils-common.exp (is_elf_format): Consider *-*-nacl* to
	be ELF too.

	* binutils-all/elfedit-4.d: Add "#as: --64" option.

	* binutils-all/i386/i386.exp: Accept nacl targets too.
	* binutils-all/x86-64/x86-64.exp: Likewise.

gas/testsuite/
2012-04-03  Roland McGrath  <mcgrathr@google.com>

	* gas/i386/k1om.d: Add not-target match for *-*-nacl*.
	* gas/i386/l1om.d: Likewise.

ld/
2012-04-03  Roland McGrath  <mcgrathr@google.com>

	* configure.tgt (i[3-7]86-*-nacl*, x86_64-*-nacl*): Handle them.
	* emulparams/elf_nacl.sh: New file.
	* emulparams/elf_i386_nacl.sh: New file.
	* emulparams/elf32_x86_64_nacl.sh: New file.
	* emulparams/elf_x86_64_nacl.sh: New file.
	* Makefile.am (ALL_EMULATION_SOURCES): Add eelf_i386_nacl.c here.
	(ALL_64_EMULATION_SOURCES): Add eelf32_x86_64_nacl.c and
	eelf_x86_64_nacl.c here.
	(eelf_i386_nacl.c, eelf32_x86_64_nacl.c, eelf_x86_64_nacl.c):
	New targets.
	* Makefile.in: Regenerated.

	* scripttempl/elf.sc: Handle SEPARATE_CODE cases.

ld/testsuite/
2012-04-03  Roland McGrath  <mcgrathr@google.com>

	* ld-x86-64/ilp32-4-nacl.d: New file.
	* ld-x86-64/x86-64.exp: Run it.

	* ld-discard/discard.exp: Accept nacl targets too.
	* ld-elf/binutils.exp: Likewise.
	* ld-elf/comm-data.exp: Likewise.
	* ld-elf/elf.exp: Likewise.
	* ld-elf/tls_common.exp: Likewise.
	* ld-elfvers/vers.exp: Likewise.
	* ld-elfvsb/elfvsb.exp: Likewise.
	* ld-elfweak/elfweak.exp: Likewise.
	* ld-gc/gc.exp: Likewise.
	* ld-ifunc/binutils.exp: Likewise.
	* ld-ifunc/ifunc.exp: Likewise.
	* ld-linkonce/linkonce.exp:Likewise.
	* ld-pie/pie.exp: Likewise.
	* ld-shared/shared.exp: Likewise.
	* ld-undefined/weak-undef.exp: Likewise.
	* ld-unique/unique.exp: Likewise.
	* ld-x86-64/dwarfreloc.exp: Likewise.
	* ld-x86-64/line.exp: Likewise.

	* lib/ld-lib.exp (slurp_options): Support global array
	options_regsub to apply substitutions to the contents
	of options lines read from the file.
	* ld-i386/emit-relocs.d: Renamed to ...
	* ld-i386/emit-relocs.rd: ... this.
	* ld-i386/i386.exp: Accept nacl targets too.
	For them, use options_regsub to replace elf_i386 with
	elf_i386_nacl in run_dump_test cases; apply the same
	substitution in $i386tests; replace foo.rd expectations
	files with foo-nacl.rd in $i386tests.
	(i386tests): Change emit-relocs.d to emit-relocs.rd here.
	* ld-i386/emit-relocs-nacl.rd: New file.
	* ld-i386/plt-nacl.pd: New file.
	* ld-i386/plt-pic-nacl.pd: New file.
	* ld-i386/tlsbin-nacl.rd: New file.
	* ld-i386/tlsbindesc-nacl.rd: New file.
	* ld-i386/tlsdesc-nacl.rd: New file.
	* ld-i386/tlsgdesc-nacl.rd: New file.
	* ld-i386/tlsnopic-nacl.rd: New file.
	* ld-i386/tlspic-nacl.rd: New file.
	* ld-x86-64/x86-64.exp: Accept nacl targets too.
	For them, use options_regsub to replace elf_x86_64 with
	elf_x86_64_nacl in run_dump_test cases; apply the same
	substitution in $x86_64tests; replace foo.rd expectations
	files with foo-nacl.rd in $x86_64tests.
	Add explicit -melf_x86_64 to ld options in tests that need it,
	in case the default emulation is x32 (as it is for x86_64-nacl).
	* ld/testsuite/ld-x86-64/plt-nacl.pd: New file.
	* ld/testsuite/ld-x86-64/split-by-file-nacl.rd: New file.
	* ld/testsuite/ld-x86-64/tlsbin-nacl.rd: New file.
	* ld/testsuite/ld-x86-64/tlsbindesc-nacl.rd: New file.
	* ld/testsuite/ld-x86-64/tlsdesc-nacl.pd: New file.
	* ld/testsuite/ld-x86-64/tlsdesc-nacl.rd: New file.
	* ld/testsuite/ld-x86-64/tlsgdesc-nacl.rd: New file.
	* ld/testsuite/ld-x86-64/tlspic-nacl.rd: New file.

	* ld-i386/hidden2.d: Loosen regexps to match any file format variant,
	and not to depend on exact addresses, displacements, etc. where
	they are irrelevant.
	* ld-i386/pcrel16.d: Likewise.
	* ld-i386/pcrel16abs.d: Likewise.
	* ld-i386/pr12718.d: Likewise.
	* ld-i386/pr12921.d: Likewise.
	* ld-i386/reloc.d: Likewise.
	* ld-i386/tlsbin.dd: Likewise.
	* ld-i386/tlsbin.sd: Likewise.
	* ld-i386/tlsbin.td: Likewise.
	* ld-i386/tlsbindesc.dd: Likewise.
	* ld-i386/tlsbindesc.sd: Likewise.
	* ld-i386/tlsbindesc.td: Likewise.
	* ld-i386/tlsdesc.dd: Likewise.
	* ld-i386/tlsdesc.sd: Likewise.
	* ld-i386/tlsdesc.td: Likewise.
	* ld-i386/tlsg.sd: Likewise.
	* ld-i386/tlsgdesc.dd: Likewise.
	* ld-i386/tlsindntpoff.dd: Likewise.
	* ld-i386/tlsnopic.dd: Likewise.
	* ld-i386/tlsnopic.sd: Likewise.
	* ld-i386/tlspic.dd: Likewise.
	* ld-i386/tlspic.sd: Likewise.
	* ld-i386/tlspic.td: Likewise.
	* ld-i386/tlspie2.d: Likewise.
	* ld-x86-64/hidden2.d: Likewise.
	* ld-x86-64/pcrel16.d: Likewise.
	* ld-x86-64/pr12718.d: Likewise.
	* ld-x86-64/pr12921.d: Likewise.
	* ld-x86-64/protected3.d: Likewise.
	* ld-x86-64/tlsbin.dd: Likewise.
	* ld-x86-64/tlsbin.sd: Likewise.
	* ld-x86-64/tlsbin.td: Likewise.
	* ld-x86-64/tlsbindesc.dd: Likewise.
	* ld-x86-64/tlsbindesc.sd: Likewise.
	* ld-x86-64/tlsbindesc.td: Likewise.
	* ld-x86-64/tlsdesc.dd: Likewise.
	* ld-x86-64/tlsdesc.sd: Likewise.
	* ld-x86-64/tlsdesc.td: Likewise.
	* ld-x86-64/tlsg.sd: Likewise.
	* ld-x86-64/tlsgd5.dd: Likewise.
	* ld-x86-64/tlsgd6.dd: Likewise.
	* ld-x86-64/tlsgdesc.dd: Likewise.
	* ld-x86-64/tlspic.dd: Likewise.
	* ld-x86-64/tlspic.sd: Likewise.
	* ld-x86-64/tlspic.td: Likewise.

	* ld-x86-64/ilp32-8.d: Match any file format variant.
	Use a -Ttext and adjust expected results, to handle variant layouts.
	* ld-x86-64/ilp32-9.d: Likewise.

	* ld-i386/alloc.t: Remove superfluous OUTPUT_FORMAT statement.
	* ld-i386/pr12627.t: Likewise.

	* ld-x86-64/abs-l1om.d: Add target: constraint.
	* ld-x86-64/protected2-l1om.d: Likewise.
	* ld-x86-64/protected3-l1om.d: Likewise.
	* ld-x86-64/ilp32-4.d: Likewise.

	* ld-x86-64/plt.s: New file.
	* ld-x86-64/pltlib.s: New file.
	* ld-x86-64/plt.pd: New file.
	* ld-x86-64/x86-64.exp (x86_64tests): Add them.

	* ld-i386/plt.s: New file.
	* ld-i386/pltlib.s: New file.
	* ld-i386/plt.pd: New file.
	* ld-i386/plt-pic.s: New file.
	* ld-i386/plt-pic.pd: New file.
	* ld-i386/i386.exp (i386tests): Add them.
2012-04-03 16:01:38 +00:00
Alan Modra 5cb49709c9 * config/default.exp: Update copyright date.
* ld-elf/shared.exp: Pass --no-as-needed to various tests linking
	shared libs.
	* ld-elfvers/vers.exp: Likewise.
2012-03-15 01:57:57 +00:00
David Daney fb35d3d8fa 2011-12-15 David Daney <david.daney@cavium.com>
Nick Clifton <nickc@redhat.com>

	* ld-elfvers/vers.exp (picflag): Set to -fpic for mips*-*-* when
	using GCC-4.3 or later.
	(pic): Set to "yes" for mips*-*-linux*.
	* ld-elfvsb/elfvsb.exp: Don't test non-PIC shared libraried on
	mips*-*-linux*.
	(picflag): Set to -fpic for mips*-*-* when using GCC-4.3 or later.
	* ld-elfweak/elfweak.exp (picflag): Set to -fpic for mips*-*-*
	when using GCC-4.3 or later.
	* ld-shared/shared.exp (picflag): Same.
	* lib/ld-lib.exp (at_least_gcc_version): New proc.
2011-12-16 06:18:55 +00:00
Alan Modra 6f1683b9c0 * ld-elfvers/vers2.ver: Don't assume any particular index for
version reference.
	* ld-elfvers/vers3.ver: Likewise.
	* ld-elfvers/vers19.ver: Likewise.
	* ld-elfvers/vers22.ver: Likewise.
	* ld-elfvers/vers27d4.ver: Likewise.
	* ld-elfvers/vers28c.ver: Likewise.
2011-06-16 00:42:06 +00:00
Mike Frysinger e6961d10d8 ld: vers19 test: add -rpath-link
Using -Wl,-rpath,. isn't sufficient for cross-linkers to locate the
necessary libraries.  So throw in -Wl,-rpath-link,. to make it work.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-03-15 23:34:30 +00:00
Alan Modra 3710d6361b * ld-elfvers/vers25a.dsym: Really include _? in match. 2010-12-11 12:58:36 +00:00
Mike Frysinger b9e33f301e ld: elfvers tests: support symbol prefixed targets
The symbol versioning tests mix C-visible symbols and linker-visible
symbols in order to verify .symver behavior.  This works for most
people, but fail for targets that have a symbol prefix.  So add a
helper file with macros that expand gcc's __USER_LABEL_PREFIX__ as
necessary and convert all .symver users over to it.

Now that the tests are usable on prefixed targets, update the tests
to take into account an optional leading underscore.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-12-10 06:08:11 +00:00
H.J. Lu 8233c39317 Replace -export-dynamic with -Wl,-export-dynamic.
2010-12-04  H.J. Lu  <hongjiu.lu@intel.com>

	* ld-elfvers/vers.exp: Replace -export-dynamic with
	-Wl,-export-dynamic.
2010-12-04 18:07:42 +00:00
Alan Modra 99753d9d70 * ld-elf/binutils.exp: Correct x86 gnu target match.
* ld-i386/i386.exp: Likewise.
	* ld-ifunc/binutils.exp: Likewise.
	* ld-ifunc/ifunc.exp: Likewise.
	* ld-discard/discard.exp: Remove unnecessary line continuations.
	* ld-elfvers/vers.exp: Likewise.  Simplify linuxaout and linuxoldld
	test.
	* ld-elfweak/elfweak.exp: Likewise.
2010-11-18 06:57:57 +00:00
Thomas Schwinge 5940a93c84 Improve binutils testsuite coverage for GNU/Hurd.
binutils/testsuite/

	* lib/utils-lib.exp (is_elf_format): Consider for *-*-gnu*, too.
	* binutils-all/elfedit-2.d (target): Likewise.
	* binutils-all/elfedit-3.d (target): Likewise.
	* binutils-all/i386/i386.exp: Likewise.
	* binutils-all/objcopy.exp: Likewise.
	* binutils-all/strip-3.d (target): Likewise.

gas/testsuite/

	* lib/gas-defs.exp (is_elf_format): Consider for *-*-gnu*, too.
	* gas/elf/elf.exp: Likewise.
	* gas/symver/symver.exp: Likewise.

ld/

	* configure.host: Add stanza for *-*-gnu*.

ld/testsuite/

	* lib/ld-lib.exp (is_elf_format): Consider for *-*-gnu*, too.
	* ld-discard/discard.exp: Likewise.
	* ld-elf/binutils.exp: Likewise.
	* ld-elf/commonpage1.d (target): Likewise.
	* ld-elf/compress1c.d (target): Likewise.
	* ld-elf/discard1.d (target): Likewise.
	* ld-elf/discard2.d (target): Likewise.
	* ld-elf/discard3.d (target): Likewise.
	* ld-elf/dynsym1.d (target): Likewise.
	* ld-elf/eh6.d (target): Likewise.
	* ld-elf/elf.exp: Likewise.
	(array_tests): Move -static tests to...
	(array_tests_static): ... here, and handle it accordingly.
	* ld-elf/hash.d (target): Likewise.
	* ld-elf/header.d (target): Likewise.
	* ld-elf/loadaddr1.d (target): Likewise.
	* ld-elf/loadaddr2.d (target): Likewise.
	* ld-elf/loadaddr3a.d (target): Likewise.
	* ld-elf/loadaddr3b.d (target): Likewise.
	* ld-elf/local1.d (target): Likewise.
	* ld-elf/maxpage1.d (target): Likewise.
	* ld-elf/maxpage2.d (target): Likewise.
	* ld-elf/maxpage3a.d (target): Likewise.
	* ld-elf/multibss1.d (target): Likewise.
	* ld-elf/noload-2.d (target): Likewise.
	* ld-elf/seg.d (target): Likewise.
	* ld-elf/textaddr1.d (target): Likewise.
	* ld-elf/textaddr2.d (target): Likewise.
	* ld-elf/textaddr3.d (target): Likewise.
	* ld-elf/textaddr4.d (target): Likewise.
	* ld-elf/textaddr5.d (target): Likewise.
	* ld-elf/textaddr6.d (target): Likewise.
	* ld-elf/textaddr7.d (target): Likewise.
	* ld-elf/tls_common.exp: Likewise.
	* ld-elf/unknown2.d (target): Likewise.
	* ld-elfvers/vers.exp: Likewise.
	* ld-elfvsb/elfvsb.exp: Likewise.
	* ld-elfweak/elfweak.exp: Likewise.
	(setup_xfail_gnu_hurd): New function.  Use it where appropriate.
	* ld-gc/abi-note.d (target): Likewise.
	* ld-gc/gc.exp: Likewise.
	* ld-gc/pr11218.d (target): Likewise.
	* ld-gc/start.d (target): Likewise.
	* ld-i386/i386.exp: Likewise.
	* ld-ifunc/binutils.exp: Likewise.
	* ld-ifunc/ifunc.exp: Likewise.
	* ld-linkonce/linkonce.exp: Likewise.
	* ld-linkonce/zeroehl32.d (target): Likewise.
	* ld-pie/pie.exp: Likewise.
	* ld-scripts/phdrs2.exp: Likewise.
	* ld-scripts/rgn-at5.d (target): Likewise.
	* ld-shared/shared.exp: Likewise.
	* ld-undefined/entry-3.d (target): Likewise.
	* ld-undefined/entry-4.d (target): Likewise.
	* ld-undefined/weak-undef.exp: Likewise.
2010-11-08 06:43:40 +00:00
Alan Modra 677ba44709 * ld-elfvers/vers32c.dsym, * ld-elfvers/vers32c.ver: Delete.
* ld-elfvers/vers32d.ver: Delete.
	* ld-elfvers/vers.exp: Don't run them.
2010-11-05 03:54:21 +00:00
Alan Modra 24b01a7495 * ld-elfvers/vers.exp: Enable test for powerpc64.
* ld-elfweak/elfweak.exp: Likewise
	* ld-shared/shared.exp: Likewise.  Xfail non-pic dso tests for ppc64.
	* ld-elfvers/vers1.dsym, * ld-elfvers/vers1.sym,
	* ld-elfvers/vers2.dsym, * ld-elfvers/vers3.dsym,
	* ld-elfvers/vers4.sym, * ld-elfvers/vers4a.dsym,
	* ld-elfvers/vers4a.sym, * ld-elfvers/vers6.dsym,
	* ld-elfvers/vers6.sym, * ld-elfvers/vers7a.dsym,
	* ld-elfvers/vers7a.sym, * ld-elfvers/vers9.dsym,
	* ld-elfvers/vers9.sym, * ld-elfvers/vers15.dsym,
	* ld-elfvers/vers15.sym, * ld-elfvers/vers16.dsym,
	* ld-elfvers/vers16a.dsym, * ld-elfvers/vers17.dsym,
	* ld-elfvers/vers18.dsym, * ld-elfvers/vers18.sym,
	* ld-elfvers/vers19.dsym, * ld-elfvers/vers20.dsym,
	* ld-elfvers/vers21.dsym, * ld-elfvers/vers21.sym,
	* ld-elfvers/vers22.dsym, * ld-elfvers/vers22a.dsym,
	* ld-elfvers/vers22a.sym, * ld-elfvers/vers22b.dsym,
	* ld-elfvers/vers23.dsym, * ld-elfvers/vers23a.dsym,
	* ld-elfvers/vers23a.sym, * ld-elfvers/vers23b.dsym,
	* ld-elfvers/vers25a.dsym, * ld-elfvers/vers26a.dsym,
	* ld-elfvers/vers27a.dsym, * ld-elfvers/vers27d.dsym,
	* ld-elfvers/vers27d.sym, * ld-elfvers/vers27d4.dsym,
	* ld-elfvers/vers28b.dsym, * ld-elfvers/vers28c.dsym,
	* ld-elfvers/vers29.dsym, * ld-elfvers/vers30.dsym,
	* ld-elfvers/vers31.dsym, * ld-elfvers/vers32a.dsym,
	* ld-elfvers/vers32b.dsym, * ld-elfvers/vers32c.dsym,
	* ld-elfweak/dso.dsym, * ld-elfweak/dsodata.dsym,
	* ld-elfweak/dsow.dsym, * ld-elfweak/dsowdata.dsym,
	* ld-elfweak/strong.sym, * ld-elfweak/strongcomm.sym,
	* ld-elfweak/strongdata.sym, * ld-elfweak/weak.dsym,
	* ld-elfweak/weakdata.dsym: Relax whitespace matching, tighten
	non-whitespace matching.  Match powerpc64 functions in .opd section.
	* ld-shared/elf-offset.ld: Place powerpc64 .toc sections.
2010-10-28 09:08:35 +00:00
David S. Miller 41b5148fa3 * ld-elfvers/vers.exp: Pass -Av9a to assembler on sparc-*-* 2010-04-06 11:53:16 +00:00
Alan Modra f9272224cd Tolerate some whitespace differences in readelf output. 2009-09-23 03:12:28 +00:00
Alan Modra aa820537ea update copyright dates 2009-09-02 07:25:43 +00:00
Chris Demetriou 267e27229e [ld/ChangeLog]
2009-04-29  Chris Demetriou  <cgd@google.com>

        * lexsup.c (option_values): Add OPTION_NO_EXPORT_DYNAMIC.
        (ld_options): Likewise.
        (parse_args): Likewise.
        * ld.texinfo: Document --no-export-dynamic.
        * NEWS: Mention --no-export-dynamic.

[ld/testsuite/ChangeLog]
2009-04-29  Chris Demetriou  <cgd@google.com>

        * ld-elfvers/vers.exp (vers4b): New test to verify that
        --no-export-dynamic undoes --export-dynamic.
2009-04-29 17:24:27 +00:00
Nick Clifton a0a21afef5 * ld-elfvers/vers.exp (test_ar): Sort the expected output so that
it has matches the ordering of the obtained output.
2008-01-28 16:41:05 +00:00
H.J. Lu 7084059433 2007-07-10 H.J. Lu <hongjiu.lu@intel.com>
* ld-elfvers/vers.exp: Add tests for --defsym.

	* ld-elfvers/vers32.map: Likewise.
	* ld-elfvers/vers32a.c: Likewise.
	* ld-elfvers/vers32a.dsym: Likewise.
	* ld-elfvers/vers32a.ver: Likewise.
	* ld-elfvers/vers32b.c: Likewise.
	* ld-elfvers/vers32b.dsym: Likewise.
	* ld-elfvers/vers32b.ver: Likewise.
	* ld-elfvers/vers32c.dsym: Likewise.
	* ld-elfvers/vers32c.ver: Likewise.
	* ld-elfvers/vers32d.ver: Likewise.
2007-07-10 14:51:55 +00:00
Nick Clifton f96b4a7b0f Update sources to GPLv3 2007-07-06 14:09:45 +00:00
Alan Modra 65864bd2a6 * ld-elfvers/vers.exp (objdump_versionstuff): Allow versions in
any order.
	* ld-elfvers/vers1.ver: Update.
	* ld-elfvers/vers2.ver: Update.
	* ld-elfvers/vers4a.ver: Update.
	* ld-elfvers/vers7a.ver: Update.
	* ld-elfvers/vers8.ver: Update.
	* ld-elfvers/vers9.ver: Update.
	* ld-elfvers/vers15.ver: Update.
	* ld-elfvers/vers16a.ver: Update.
	* ld-elfvers/vers17.ver: Update.
	* ld-elfvers/vers18.ver: Update.
	* ld-elfvers/vers20.ver: Update.
	* ld-elfvers/vers20a.ver: Update.
	* ld-elfvers/vers21.ver: Update.
	* ld-elfvers/vers22a.ver: Update.
	* ld-elfvers/vers22b.ver: Update.
	* ld-elfvers/vers23a.ver: Update.
	* ld-elfvers/vers23b.ver: Update.
	* ld-elfvers/vers23c.ver: Update.
	* ld-elfvers/vers25a.ver: Update.
	* ld-elfvers/vers26a.ver: Update.
	* ld-elfvers/vers27a.ver: Update.
	* ld-elfvers/vers27d.ver: Update.
	* ld-elfvers/vers28b.ver: Update.
	* ld-elfvers/vers29.ver: Update.
	* ld-elfvers/vers30.ver: Update.
	* ld-elfvers/vers31.ver: Update.
2006-06-06 04:30:21 +00:00
H.J. Lu da54898db3 2006-04-26 H.J. Lu <hongjiu.lu@intel.com>
* ld-elfvers/vers.exp: Xfail vers7a, vers7, vers23a, vers23b,
	vers23c, vers23d, vers23, vers25a, vers25b1, vers25b2, vers27a,
	vers27b, vers27c1, vers27c2, vers27d4 and vers27d5 if PIC is
	required.
2006-04-30 00:23:00 +00:00
Mark Mitchell 86043bbbd5 * ld.texino: Describe double-quoted string syntax for version
nodes.
	* ldlang.h (lang_new_vers_pattern): Add literal_p parameter.
	* ldgram.y (vers_defns): Allow NAME as well as VERS_IDENTIFIER.
	Adjust calls to lang_new_vers_pattern to pass literal_p argument.
	* ldlang.c (lang_vers_match): Fix indentation.  Do not glob-match
	version nodes without a pattern.
	(lang_new_vers_pattern): Add literal_p parameter.
	(lang_do_version_exports_section): Pass it.

	* ld-elfvers/vers.exp: Add vers31.
	* ld-elfvers/vers31.c: New file.
	* ld-elfvers/vers31.dsym: Likewise.
	* ld-elfvers/vers31.map: Likewise.
	* ld-elfvers/vers31.ver: Likewise.
2005-10-13 17:29:57 +00:00
Jakub Jelinek 96f8ade546 * ldgram.y (vers_defns): Don't lose pattern list before
extern NAME {}.  Handle global, local and extern symbol names.
ld/testsuite/
	* ld-elfvers/vers.exp: Add a new test, vers30.
	* ld-elfvers/vers30.c: New file.
	* ld-elfvers/vers30.map: New file.
	* ld-elfvers/vers30.ver: New file.
	* ld-elfvers/vers30.dsym: New file.
2005-08-17 10:08:30 +00:00
Nick Clifton 75be928bd2 Update FSF addresses 2005-05-12 07:32:09 +00:00
Alan Modra aef6203bd6 update copyright dates 2005-03-03 11:52:12 +00:00
Jan Beulich f1dab70d1a gas/
2005-02-13  Jan Beulich  <jbeulich@novell.com>

	* config/tc-ia64.c (md_parse_option): Handle -xnone and -xdebugn.
	(md_show_usage): Add -xnone, -xdebugn, and -xdebugx. Relocate default
	indicator.
	(ia64_init): Set md.detect_dv.
	(ia64_start_line): New static variable warned. Warn only once when
	encountering explicit stops in automatic mode.
	* doc/c-ia64.texi: Describe -xnone, -xdebugn, and -xdebugx.
	* NEWS: Mention new default mode.

gas/testsuite/
2005-02-13  Jan Beulich  <jbeulich@novell.com>

	* gas/ia64/label.l: Adjust line numbers.
	* gas/ia64/label.s: Add .explicit.
	* gas/ia64/nop_x.s: Likewise.
	* gas/ia64/opc-a.d: Add assembler option -xnone.
	* gas/ia64/opc-b.d: Likewise.
	* gas/ia64/opc-f.d: Likewise.
	* gas/ia64/opc-i.d: Likewise.
	* gas/ia64/opc-m.d: Likewise.
	* gas/ia64/opc-x.d: Likewise.
	* gas/ia64/pseudo.d: Likewise.
	* gas/ia64/regs.d: Likewise.
	* gas/ia64/tls.d: Likewise.
	* gas/ia64/unwind-err.l: Adjust line numbers.
	* gas/ia64/unwind-err.s: Remove explicit stops.

ld/testsuite/
2005-02-13  Jan Beulich  <jbeulich@novell.com>

	* ld-elfvers/vers.exp (as_options): New. Set to -x for ia64.
	(build_binary): Pass as_options to ld_assemble.
	(test_ldfail): Likewise.
	(build_exec): Likewise.
	Pass as_options to run_ld_link_tests.
	* ld-ia64/tlsbin.s: Add .explicit.
	* ld-ia64/tlsbinpic.s: Likewise.
	* ld-ia64/tlspic1.s: Likewise.
2005-02-14 08:02:51 +00:00
Paul Brook 0c6616e1ae Missed from previous commit.
ld/testsuite/
	* ld-elfvers/vers29.c: New file.
	* ld-elfvers/vers29.dsym: New file.
	* ld-elfvers/vers29.ver: New file.
2004-10-26 21:00:23 +00:00
Paul Brook 3e3b46e5c8 bfd/
* elflink.c (elf_finalize_dynstr): Skip shared aux structure.
	(bfd_elf_size_dynamic_sections): Create default version definition.
	(elf_link_output_extsym): Adjust for default symbol version.
include/
	* bfdlink.h (struct bfd_link_info): Add create_default_symver.
ld/
	* ld.texinfo: Document --default-symver.
	* ldmain.c (main): Set link_info.create_default_symver.
	* lexsup.c (enum option_values): Add OPTION_DEFAULT_SYMVER.
	(ld_options): Add default-symver.
	(parse_args): Handle OPTION_DEFAULT_SYMVER.
ld/testsuite/
	* ld-elfvers/vers.exp (build_binary): Add ldargs parameter.
	(build_vers_lib_pic_flags): New function.
	Add vers29 test.
	* ld-elfvers/vers29.c: New file.
	* ld-elfvers/vers29.dsym: New file.
	* ld-elfvers/vers29.ver: New file.
2004-10-26 13:46:05 +00:00
H.J. Lu 35d437df82 2004-06-24 H.J. Lu <hongjiu.lu@intel.com>
* ld-elfvers/vers.exp: Use PIC for shared libraries by default.
2004-06-24 15:07:43 +00:00
H.J. Lu d400d2a669 2004-03-19 H.J. Lu <hongjiu.lu@intel.com>
* ld-elfvers/vers.exp: Add new tests for versioned weak
	definition.

	* ld-elfvers/vers28a.c: New file.
	* ld-elfvers/vers28a.dsym: Likewise.
	* ld-elfvers/vers28a.ver: Likewise.
	* ld-elfvers/vers28b.c: Likewise.
	* ld-elfvers/vers28b.dsym: Likewise.
	* ld-elfvers/vers28b.map: Likewise.
	* ld-elfvers/vers28b.ver: Likewise.
	* ld-elfvers/vers28c.c: Likewise.
	* ld-elfvers/vers28c.dsym: Likewise.
	* ld-elfvers/vers28c.ver: Likewise.
2004-03-19 17:02:31 +00:00
H.J. Lu 9e75165df3 2003-10-23 H.J. Lu <hongjiu.lu@intel.com>
* ld-elfvers/vers.exp (test_ldfail): Add "-Wl," to pass the
	linker option from gcc.
2003-10-23 17:52:00 +00:00
H.J. Lu b765d4e375 2003-05-15 H.J. Lu <hongjiu.lu@intel.com>
* config/default.exp (gcc_ld_flag): New. Make the newly built
	linker available to gcc.
	* lib/ld-lib.exp (default_ld_simple_link): Pass $gcc_ld_flag
	to gcc.

	* ld-elfvers/vers.exp: Use "ld_simple_link $CC" to build shared
	libraries.
	* ld-elfvsb/elfvsb.exp: Likewise.
	* ld-elfweak/elfweak.exp: Likewise.
	* ld-shared/shared.exp: Likewise.

	* ld-elfvers/vers.exp: Use "-Wl,-rpath,." to build shared
	libraries.
	* ld-elfvsb/elfvsb.exp: Likewise.

	* ld-elfvsb/elfvsb.exp: Remove xfail for powerpc-*-linux*.

	* ld-elfweak/elfweak.exp: Use PIC for shared libraries.
2003-05-16 05:04:34 +00:00
Nick Clifton 59758b1cc8 Run on sh[34]*-*-linux*. 2003-05-13 11:39:58 +00:00
H.J. Lu 54c9a60f31 2003-05-08 H.J. Lu <hongjiu.lu@intel.com>
* ld-elfvers/vers.exp: Add vers27d4 and vers27d5 to test
	versioned reference for hidden symbol.

	* ld-elfvers/vers27d4.dsym: New file.
	* ld-elfvers/vers27d4.ver: Likewise.
2003-05-08 19:51:48 +00:00
H.J. Lu 95b4a16ea5 2003-05-07 H.J. Lu <hongjiu.lu@intel.com>
* ld-elfvers/vers27d3.c (__start): New.
	(start): New.
2003-05-08 07:01:11 +00:00
H.J. Lu 0ae911fecd 2003-05-07 H.J. Lu <hongjiu.lu@intel.com>
* ld-elfvers/vers.exp (build_binary): Support build exeutable.
	(build_binary): Renamed from ...
	(build_vers_lib): This.
	(build_vers_lib_no_pic): Updated.
	(build_vers_lib_pic): Likewise.
	Add vers27d1, vers27d2 and vers27d3 to test versioned
	definition for hidden symbol referenced by a DSO.

	* ld-elfvers/vers27d.dsym: New file.
	* ld-elfvers/vers27d.sym: Likewise.
	* ld-elfvers/vers27d.ver: Likewise.
	* ld-elfvers/vers27d1.c: Likewise.
	* ld-elfvers/vers27d2.c: Likewise.
	* ld-elfvers/vers27d3.c: Likewise.
2003-05-08 05:10:47 +00:00
H.J. Lu 08d5f1b40e 2003-05-06 H.J. Lu <hjl@gnu.org>
* ld-elfvers/vers.exp (objdump_versionstuff): Support comment
	in expected version file.

	* ld-elfvers/vers25b.c: Add a line of comment.
	* ld-elfvers/vers25b.dsym: Likwise.
	* ld-elfvers/vers25b.ver: Likwise.
	* ld-elfvers/vers26b.dsym: Likwise.
	* ld-elfvers/vers26b.ver: Likwise.
	* ld-elfvers/vers27b.dsym: Likwise.
	* ld-elfvers/vers27b.ver: Likwise.
	* ld-elfvers/vers27c.c: Likwise.
	* ld-elfvers/vers27c.dsym: Likwise.
	* ld-elfvers/vers27c.ver: Likwise.
2003-05-06 15:55:09 +00:00
H.J. Lu c424e0e973 bfd/
2003-05-04  H.J. Lu <hjl@gnu.org>

	* elflink.h (elf_merge_symbol): Correctly handle weak definiton.

ld/testsuite/

2003-05-04  H.J. Lu <hjl@gnu.org>

	* ld-elfvers/vers18.dsym: Updated for weak definiton change.
	* ld-elfvers/vers18.ver: Likewise.
	* ld-elfvers/vers19.ver: Likewise.

	* ld-elfweak/elfweak.exp: Remove xfail.
2003-05-05 03:33:09 +00:00
H.J. Lu 95aa61ce02 2003-05-03 H.J. Lu <hjl@gnu.org>
* ld-elfvers/vers.exp: Add vers27a, vers27b, vers27c1 and
	vers27c2 to test versioned definition vs. hidden definition in
	different files.

	* ld-elfvers/vers27a.c: New file.
	* ld-elfvers/vers27a.dsym: Likewise.
	* ld-elfvers/vers27a.map: Likewise.
	* ld-elfvers/vers27a.ver: Likewise.
	* ld-elfvers/vers27b.c: Likewise.

	* ld-elfvers/vers27b.dsym: New empty file.
	* ld-elfvers/vers27b.ver: Likwise.
	* ld-elfvers/vers27c.c: Likwise.
	* ld-elfvers/vers27c.dsym: Likwise.
	* ld-elfvers/vers27c.ver: Likwise.
2003-05-03 16:51:05 +00:00
Andreas Jaeger fcd06cfe45 * ld-elfvers/vers.exp (build_exec): Disable vers26b3 on x86-64-linux. 2003-05-02 08:16:25 +00:00
H.J. Lu f006af20ee bfd/
2003-04-28  H.J. Lu <hjl@gnu.org>

	* elflink.h (elf_merge_symbol): Call elf_backend_copy_indirect_symbol
	to copy any information related to dynamic linking when we flip
	the indirection.

ld/testsuite/

2003-04-28  H.J. Lu <hjl@gnu.org>

	* ld-elfvers/vers.exp (picflag): Set PIC flag for compiler.
	(build_vers_lib): Support PIC.
	(build_vers_lib_no_pic): New. Change all calls to build_vers_lib
	to build_vers_lib_no_pic.
	(build_vers_lib_pic): New.
	Add tests vers26a, vers26b1, vers26b2 and vers26b3 for versioned
	definition vs. normal definition in different files.

	* ld-elfvers/vers26a.c: New file.
	* ld-elfvers/vers26a.dsym: Likewise.
	* ld-elfvers/vers26a.map: Likewise.
	* ld-elfvers/vers26a.ver: Likewise.
	* ld-elfvers/vers26b.c: Likewise.

	* ld-elfvers/vers26b.dsym: New empty file.
	* ld-elfvers/vers26b.ver: Likewise.
2003-04-28 16:58:01 +00:00
H.J. Lu 834216a99a Check in the new files. 2003-04-23 16:40:04 +00:00
H.J. Lu 365f913182 2003-04-23 H.J. Lu <hjl@gnu.org>
* ld-elfvers/vers.exp (objdump_dynsymstuff): Support empty
	files.
	(objdump_versionstuff): Likewise.
	Add tests vers25a, vers25b1 and vers25b2 for versioned
	definition vs. normal definition in different files.

	* ld-elfvers/vers25a.c: New file.
	* ld-elfvers/vers25a.dsym: Likewise.
	* ld-elfvers/vers25a.map: Likewise.
	* ld-elfvers/vers25a.ver: Likewise.

	* ld-elfvers/vers25b.c: New empty file.
	* ld-elfvers/vers25b.dsym: Likewise.
	* ld-elfvers/vers25b.ver: Likewise.
2003-04-23 16:34:39 +00:00
Jakub Jelinek 9147e853bf bfd/
* elflink.h (elf_link_add_object_symbols): Handle .symver x, x@FOO.
ld/testsuite/
	* ld-shared/shared.exp: Run on s390*-*-linux* and x86_64-*-linux* too.
	xfail tests linking non-pic code into shared libs on x86_64-*-linux*.
	* ld-elfvsb/elfvsb.exp: Likewise.
	* ld-elfvers/vers.exp: Likewise.  Add vers24a, vers24b and vers24c
	tests.
	* ld-elfvers/vers3.ver: Allow VERS_2.0 to come before GLIBC_*
	version.
	* ld-elfvers/vers19.ver: Likewise.
	* ld-elfvers/vers24a.c: New test.
	* ld-elfvers/vers24b.c: New test.
	* ld-elfvers/vers24c.c: New test.
	* ld-elfvers/vers24.map: New test.
	* ld-elfvers/vers24.rd: New test.
	* lib/ld-lib.exp (run_ld_link_tests): Add optional 7th argument
	cflags.  If source files have .c extension, compile them first.
2003-02-13 22:14:11 +00:00