Age | Commit message (Collapse) | Author | Files | Lines |
|
Glibc first added .gnu.hash support to glibc-2.5 (released 29 Sep 2006),
and gold was first released after that. Let's default the gnu hash style
to the new "gnu" rather than the classic sysv.
gold/:
2012-02-03 Mike Frysinger <vapier@gentoo.org>
* options.h (General_options): Change default to gnu for hash_style.
|
|
textrels are bad for forcing copy-on-write (this affects everyone), and for
security/runtime code generation, this affects security ppl. But in either
case, it doesn't matter who needs textrels, it's the very fact that they're
needed at all.
|
|
|
|
When creating object files during testing, base the name of the object
file on the name of the source file, rather than using dump0.o,
dump1.o, etc. There's a few places where we have multiple source
files with the same name but in different directories, in these cases,
even after this change, we still add a numerical suffix to make the
object file names unique. So if we have 'foo/src.s' and 'bar/src.s',
we will create object files 'src.o' and 'src1.o'.
Update the few tests that hard code the object file name into the
expected test results.
ld/ChangeLog:
* testsuite/lib/ld-lib.exp (run_dump_test): Use object file names
based on the original source file name.
* testsuite/ld-discard/extern.d: Update object file names.
* testsuite/ld-discard/start.d: Likewise.
* testsuite/ld-discard/static.d: Likewise.
* testsuite/ld-elf/orphan-8.map: Likewise.
|
|
Add the xc16x-elf target to the list of targets that do not support
the -shared option. Being missing from this list was causing the
linker to add '-z norelro' to the link line of many tests, which in
turn caused these tests to fail.
ld/ChangeLog:
* testsuite/lib/ld-lib.exp (check_shared_lib_support): Add
xc16x-*-elf to the list of targets that don't support -shared.
|
|
* testsuite/lib/ld-lib.exp (is_generic_elf): New, extracted from..
* testsuite/ld-elf/elf.exp: ..here.
|
|
* testsuite/lib/ld-lib.exp (run_cc_link_tests): Don't fail tests
twice.
|
|
PR ld/20436
* testsuite/lib/ld-lib.exp (at_least_gcc_version): Don't ignore
remote_exec status.
(check_gcc_plugin_enabled): Likewise.
|
|
PR ld/20436
* testsuite/lib/ld-lib.exp (check_gcc_plugin_enabled): When not
testing remotely, check to see if target compiler is installed
before trying to run it.
|
|
Don't run LTO tests if compiler is configured with --disable-plugin.
PR ld/20436
* testsuite/lib/ld-lib.exp (check_gcc_plugin_enabled): New
proc.
(check_lto_available): Return 0 if check_gcc_plugin_enabled
returns 0.
(check_lto_fat_available): Likewise.
(check_lto_shared_available): Likewise.
|
|
If the last parameter of a tcl function is "args" then it can take
zero or more arguments. Make use of this language feature in
run_ld_link_exec_tests.
* testsuite/lib/ld-lib.exp (run_ld_link_exec_tests): Replace
"targets_to_xfail" parameter with "args".
* testsuite/ld-elf/compress.exp: Remove empty list of xfails on
all calls to run_ld_link_exec_tests.
* testsuite/ld-elf/dwarf.exp: Likewise.
* testsuite/ld-elf/indirect.exp: Likewise.
* testsuite/ld-elf/wrap.exp: Likewise.
* testsuite/ld-i386/i386.exp: Likewise.
* testsuite/ld-i386/no-plt.exp: Likewise.
* testsuite/ld-i386/tls.exp: Likewise.
* testsuite/ld-ifunc/ifunc.exp: Likewise.
* testsuite/ld-pie/pie.exp: Likewise.
* testsuite/ld-plugin/lto.exp: Likewise.
* testsuite/ld-size/size.exp: Likewise.
* testsuite/ld-x86-64/mpx.exp: Likewise.
* testsuite/ld-x86-64/no-plt.exp: Likewise.
* testsuite/ld-x86-64/tls.exp: Likewise.
* testsuite/ld-x86-64/x86-64.exp: Likewise.
* testsuite/ld-elf/elf.exp: Likewise. Reorder args when providing
xfails and simplify lists.
* testsuite/ld-elf/shared.exp: Likewise.
|
|
bfd/
* elf.c (_bfd_elf_filter_global_symbols): Skip local symbols.
(swap_out_syms): Return an error when not finding ELF output
section rather than asserting.
* elflink.c (elf_output_implib): Call bfd_set_error on no symbols.
ld/
* testsuite/lib/ld-lib.exp (run_ld_link_tests): Add optional
parameter to pass list of xfails.
* testsuite/ld-elf/elf.exp: Add xfails for implib tests. Tidy
implib test formatting. Don't set .data start address.
* testsuite/ld-elf/implib.s: Remove first .bss directive and
replace second one with equivalent .section directive.
* testsuite/ld-elf/empty-implib.out: Add expected final error.
* testsuite/ld-elf/implib.rd: Update.
|
|
Add a configure option --enable-relro to decide whether -z relro should
be enabled in ELF linker by default. Default to yes for all Linux
targets, except FRV, HPPA, IA64 and MIPS, since many relro tests fail
on these targets.
PR ld/20283
* NEWS: Mention --enable-relro.
* configure.ac: Add --enable-relro.
(DEFAULT_LD_Z_RELRO): New. Set by --enable-relro.
* configure.tgt (ac_default_ld_z_relro): Default it to 1 for
some Linux targets.
* config.in: Regenerated.
* configure: Likewise.
* emultempl/elf32.em (gld${EMULATION_NAME}_before_parse): Set
link_info.relro to DEFAULT_LD_Z_RELRO.
* testsuite/config/default.exp (ld_elf_shared_opt): New.
* testsuite/lib/ld-lib.exp (run_dump_test): Pass
$ld_elf_shared_opt to ld for ELF targets with shared object
support.
(run_ld_link_tests): Likewise.
|
|
ld/
2016-05-19 Cupertino Miranda <cmiranda@synopsys.com>
* testsuite/ld-elf/compressed1d.d: Removed from notarget.
* testsuite/ld-elf/group8a.d: Likewise.
* testsuite/ld-elf/group8b.d: Likewise.
* testsuite/ld-elf/group9a.d: Likewise.
* testsuite/ld-elf/group9b.d: Likewise.
* testsuite/ld-elf/pr12851.d: Likewise.
* testsuite/ld-elf/pr12975.d: Likewise.
* testsuite/ld-elf/pr13177.d: Likewise.
* testsuite/ld-elf/pr13195.d: Likewise.
* testsuite/ld-elf/pr17615.d: Likewise.
* testsuite/ld-elf/eh-frame-hdr.d: Removed from xfail.
* testsuite/ld-elf/group3b.d: Likewise.
* testsuite/ld-srec/srec.exp: Likewise.
* testsuite/lib/ld-lib.exp (check_gc_sections_available): Mark ARC
as supporting gc.
(check_shared_lib_support): Mark ARC as supporting.
|
|
ld/
* testsuite/lib/ld-lib.exp (check_shared_lib_support): Reorder
`ft32-*-*' behind `frv-*-*'.
|
|
* scripttempl/ft32.sc: Use fixed constants for memory region
lengths. Include DWARF debug sections.
(.data .bss): Do not assign locations during relocatable links.
* testsuite/ld-elf/compressed1d.d: Skip for FT32.
* testsuite/ld-elf/sec-to-seg.exp: Likewise.
* testsuite/ld-elf/sec64k.exp: Likewise.
* testsuite/ld-elf/init-fini-array.d: XFail for FT32.
* testsuite/ld-elf/merge.d: Likewise.
* testsuite/ld-elf/orphan-region.d: Likewise.
* testsuite/ld-elf/orphan.s: Likewise.
* testsuite/ld-elf/orphan3.d: Likewise.
* testsuite/ld-elf/pr349.d: Likewise.
* testsuite/ld-elf/warn2.d: Likewise.
* testsuite/lib/ld-lib.exp (check_shared_lib_support): Note
that the FT32 does not support shared libraries.
|
|
at_least_gcc_version should check global CC.
* testsuite/lib/ld-lib.exp (at_least_gcc_version): Check
global CC.
|
|
There is no need to download source if we aren't on remote host.
Otherwise, each ld test run on local host leaves behind a couple
test files.
* config/default.exp (NOPIE_CFLAGS): Download source only on
remote host.
(NOPIE_LDFLAGS): Likewise.
* testsuite/lib/ld-lib.exp (check_lto_available): Likewise.
(check_lto_fat_available): Likewise.
(check_lto_shared_available): Likewise.
(check_ifunc_available): Likewise.
(check_ifunc_attribute_available): Likewise.
|
|
Check for LTO availability will hide LTO bugs in ld. Since GCC 4.9 adds
-ffat-lto-objects, we always run LTO tests on Linux with GCC 4.9 or newer.
* testsuite/lib/ld-lib.exp (check_lto_available): Return 1 on
Linux with GCC 4.9 or newer.
(check_lto_fat_available): Likewise.
(check_lto_shared_available): Likewise.
|
|
In some cases a variable could be left uninitialised and then an attempt
made to read this variable, resulting in a tcl error. This commit
initialises the variable in all cases.
ld/ChangeLog:
* testsuite/lib/ld-lib.exp (run_dump_test): Initialise
check_ld(terminal).
|
|
This aims to bring the linker for big-endian arc targets into line with
the linker for (the default) little endian arc targets.
The bulk of the changes are to extend the target pattern in the test
files from 'arc-*...' to 'arc*-*...' and so match both big and little
endian arc targets.
In the ld/emulparams/ directory the existing scripts checked for a
variable ARC_ENDIAN to switch between big and little endian targets,
however, this variable is never set up.
So, a new script snippet is introduced which sets up ARC_ENDIAN based on
the value of target, this snippet is then included from all of the
existing arc scripts.
The existing big-endian variants of all the scripts, which existed, but
were never used, are deleted in this commit.
ld/ChangeLog:
* emulparams/arc-endianness.sh: New file.
* emulparams/arcebelf.sh: Deleted.
* emulparams/arcebelf_prof.sh: Deleted.
* emulparams/arceblinux.sh: Deleted.
* emulparams/arceblinux_prof.sh: Deleted.
* emulparams/arcelf.sh: Include arc-endinness.sh.
* emulparams/arcelf_prof.sh: Include arc-endinness.sh.
* emulparams/arclinux.sh: Include arc-endinness.sh.
* emulparams/arclinux_prof.sh: Include arc-endinness.sh.
* emulparams/arcv2elf.sh: Include arc-endinness.sh.
* emulparams/arcv2elfx.sh: Include arc-endinness.sh.
* testsuite/ld-elf/compressed1d.d: Update pattern for big and
little endian arc targets.
* testsuite/ld-elf/eh-frame-hdr.d: Likewise.
* testsuite/ld-elf/group1.d: Likewise.
* testsuite/ld-elf/group3b.d: Likewise.
* testsuite/ld-elf/group8a.d: Likewise.
* testsuite/ld-elf/group8b.d: Likewise.
* testsuite/ld-elf/group9a.d: Likewise.
* testsuite/ld-elf/group9b.d: Likewise.
* testsuite/ld-elf/linkonce2.d: Likewise.
* testsuite/ld-elf/pr12851.d: Likewise.
* testsuite/ld-elf/pr12975.d: Likewise.
* testsuite/ld-elf/pr13177.d: Likewise.
* testsuite/ld-elf/pr13195.d: Likewise.
* testsuite/ld-elf/pr17615.d: Likewise.
* testsuite/ld-elf/pr19162.d: Likewise.
* testsuite/ld-elf/sec64k.exp: Likewise.
* testsuite/lib/ld-lib.exp: Likewise.
|
|
The options warning_output and error_output to the run_dump_test
function were incorrectly checking the return value from the regexp_diff
function, and so, as a result failing tests were showing as a pass.
Fixed in this commit.
ld/ChangeLog:
* testsuite/lib/ld-lib.exp (run_dump_test): Fix check of return
value from regexp_diff.
* testsuite/ld-elf/orphan-5.l: Fix expected output.
* testsuite/ld-elf/orphan-6.l: Likewise.
|
|
Oddly, config.sub converts a duple ending in -elf for these target to
-unknown-none, which means they aren't seen as elf targets by
binutils. So, counter that. This exposes a number of testsuite
issues (ones you would have seen if configuring with a full triple,
say m68hc11-unknown-elf).
binutils/
* testsuite/lib/binutils-common.exp (is_elf_format): Return true
for m68hc11/12 and xgate triples.
gas/
* testsuite/gas/cfi/cfi.exp: Exclude m68hc11/12 from m68k test.
ld/
* testsuite/lib/ld-lib.exp (check_shared_lib_support): Exclude xgate.
* testsuite/ld-elf/endsym.d: xfail m68hc11/12 and xgate.
* testsuite/ld-elf/pr14156a.d: Likewise.
* testsuite/ld-elf/pr14926.d: Don't run for m68hc11/12 and xgate.
* testsuite/ld-elf/sec64k.exp: Likewise.
|
|
|
|
Skip IFUNC relocations in debug sections ignored by ld.so.
bfd/
PR ld/18808
* elf32-i386.c (elf_i386_relocate_section): Skip IFUNC
relocations in debug sections.
* elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
ld/testsuite/
PR ld/18808
* ld-ifunc/ifunc.exp: Add a test for PR ld/18808.
* ld-ifunc/pr18808.out: New file.
* ld-ifunc/pr18808a.c: Likewise.
* ld-ifunc/pr18808b.c: Likewise.
|
|
When using run_dump_test with the map option to compare the linker map
file produced, no additional dump program should be required. A dump
program can still be given if needed, but leaving it off will no longer
produce an error.
ld/testsuite/ChangeLog:
* ld/ld-lib.exp (run_dump_test): When using the map option, no
program is required.
|
|
The run_dump_test mechanism supports options error and warning, which
allow regexp to be specified within the test file, these regexp are
matched against the stderr output from the linker.
Similar dump test style functions for gas and gdb also support file
based matching versions of these options; the patterns are placed into a
file which the test driver then references. It is sometimes clearer,
when the pattern to be matched spans multiple lines if the patterns can
be placed into a separate file.
This patch adds new options error_output and warning_output for the
linker run_dump_test function. These new options take a filename
parameter, this file is then used (with regexp_diff) to compare against
the linker output.
ld/testsuite/ChangeLog:
* ld/ld-lib.exp (run_dump_test): Add error_output and
warning_output options.
|
|
run_host_cmd_yesno should set errcnt and warncnt to 0. Otherwise, they
may leak to the next run.
* lib/ld-lib.exp (run_host_cmd_yesno): Set errcnt and warncnt
to 0.
|
|
PR ld/11539
bfd * coffcode.h (coff_bfd_gc_sections): Define default
to bfd_coff_gc_sections function.
* cofflink.c (init_reloc_cookie): Copy and adjust coff
related code about gc-sections from elflink.c to here.
(fini_reloc_cookie): Likewise.
(init_reloc_cookie_rels): Likewise.
(fini_reloc_cookie_rels): Likewise.
(init_reloc_cookie_for_section): Likewise.
(fini_reloc_cookie_for_section): Likewise.
(_bfd_coff_gc_mark_hook): Likewise.
(_bfd_coff_gc_mark_rsec): Likewise.
(_bfd_coff_gc_mark_reloc): Likewise.
(_bfd_coff_gc_mark): Likewise.
(_bfd_coff_gc_mark_extra_sections): Likewise.
(coff_gc_sweep_symbol_info): Likewise.
(coff_gc_sweep_symbol): Likewise.
(gc_sweep_hook_fn): Likewise.
(coff_gc_sweep): Likewise.
(bfd_coff_gc_sections): Likewise.
(_bfd_coff_gc_keep): Likewise.
* libcoff.h (coff_reloc_cookie): New struct.
(bfd_coff_gc_sections): New prototype.
(coff_gc_mark_hook_fn): New type.
ld * scripttempl/pep.sc: Mark .idata*, .CRT*, .tls*,
.rsrc*, .init, .ctor*, .dtor*, .fini, .jcr,
.eh_frame, .pdata. .xdata, and .gcc_except_table sections
as KEEP.
* scripttempl/pe.sc: Likewise.
|
|
Since zlib is always supported, there is no need for is_zlib_supported.
binutils/testsuite/
* binutils-all/compress.exp: Remove is_zlib_supported check.
* binutils-all/objdump.exp: Likewise.
* binutils-all/readelf.exp (readelf_compressed_wa_test): Likewise.
* lib/utils-lib.exp (run_dump_test): Likewise.
* lib/binutils-common.exp (is_zlib_supported): Removed.
gas/testsuite/
* lib/gas-defs.exp (run_dump_test): Remove is_zlib_supported check.
ld/testsuite/
* ld-elf/compress.exp: Remove is_zlib_supported check.
Fail if --compress-debug-sections doesn't work.
* lib/ld-lib.exp (run_dump_test): Remove is_zlib_supported check.
|
|
* lib/ld-lib.exp (ar_simple_create): Move -rc before $aropts.
|
|
Add a new option 'map' to the ld run_dump_test mechanism. When the
'map' option is given run_dump_test will ensure that there is a
-Map=MAPFILE present in the linker command line, adding one if needed.
The MAPFILE is then compared with the file passed to the new 'map'
option using the regexp_diff function. This should make it slightly
easier to write tests that check the linker mapfile output.
The only test I found that already compares mapfile content is updated
to use the new mechanism.
ld/testsuite/ChangeLog:
* ld-scripts/overlay-size.d: Add 'map' option.
* ld-scripts/overlay-size.exp: Remove manual check of mapfile.
* lib/ld-lib.exp (run_dump_test): Add support for new 'map'
option, checking linker mapfile output.
|
|
Mention that readelf can be used as a test program in the comment of
run_dump_test.
ld/testsuite/ChangeLog:
* lib/ld-lib.exp (run_dump_test): Extend comment to mention
readelf.
|
|
|
|
ld/
* configure.tgt: Add Visium support.
* Makefile.am (ALL_EMULATION_SOURCES): Add eelf32visium.c.
(eelf32visium.c): New rule.
* Makefile.in: Regenerate.
* emulparams/elf32visium.sh: New file.
* scripttempl/visium.sc: Likewise.
ld/testsuite/
* lib/ld-lib.exp (check_shared_lib_support): Return 0 for Visium.
* ld-visium/: New directory.
|
|
* lib/ld-lib.exp (check_ifunc_available): New.
* ld-ifunc/ifunc.exp: Run IFUNC run-time tests only if IFUNC
is supported.
|
|
ld/testsuite/
* lib/ld-lib.exp (run_ld_link_exec_tests): Append board_cflags if gcc driver
used as link tool.
(run_cc_link_exec_tests): Likewise.
|
|
* ld-scripts/sysroot-prefix.exp: Log $ld_sysroot. Handle sysroot
== "/" as a separate sysroot-configuration with separable
test-types.
(sysroot_prefix_tests): Include all existing sysroot tests in
sysroot == "/" tests except exclude those where a --sysroot option
is not specified.
* lib/ld-lib.exp (check_sysroot_available): Rewrite to use
--print-sysroot instead of relying on error code from using
--sysroot=... Also, set $ld_sysroot.
The reason we exclude not just the failing "full-path =-prefixed
without" but also the passing "plain =-prefixed without but -Lpath"
for sysroot == "/" is that for the latter to succeed, we have to make
assumptions about the system not having a /sysroot directory or
assumptions about its contents etc.
When passing --enable-targets=all --enable-64-bit-bfd (the
latter not required for a "64-bit-host" of course) the ld --help
output got too much to handle for poor tcl (or maybe dejagnu is
to blame) and remote_exec exited with an error, so the
configuration being tested was mishandled as being a
sysroot-less configuration. Using --version instead of --help
would work too, but the new --print-sysroot option calls for
nominal coverage, so why not use that instead.
|
|
|
|
* lib/ld-lib.exp (ld_simple_link_defsyms): Provide both __main
and ___main for windows targets.
|
|
To not match spu --plugin option.
* lib/ld-lib.exp (check_plugin_api_available): Match "-plugin PLUGIN".
|
|
* lib/ld-lib.exp (check_lto_fat_available): New.
(check_lto_available): Remove -ffat-lto-objects test.
* ld-plugin/lto.exp: Use [list ] rather than { } to set up list
variables, allowing substition of vars. Set lto_fat and plug_opt
and add to various tests.
|
|
* lib/ld-lib.exp (check_lto_shared_available): Reinstate compiler
check here too.
|
|
toolchain that just contains the binutils - ie without a compiler.
* lib/ld-lib.exp (check_lto_available): Check that a compiler is
available before testing for LTO support.
|
|
Various ld-elf/shared.exp and ld-plugin/lto.exp tests simply appended
the testsuite -B options intended to force gcc use the linker under test.
This fails if $CC itself has -B options, as when setting CC to run gcc
out of a build directory. Net result is that tests were run using
the gcc build dir collect-ld.
* config/default.exp: Don't make tmpdir/gas. Put as symlink into
tmpdir/ld.
(gcc_gas_flag, gcc_ld_flag): Delete.
(gcc_B_opt, ld_L_opt): New globals.
ld-elf/shared.exp: Remove all refs to gcc_gas_flag and gcc_ld_flag.
ld-plugin/lto.exp: Likewise.
lib/ld-lib.exp (run_host_cmd): Add gcc_B_opt and ld_L_opt here.
(ld_simple_link): Remove -B handling now that this is done in
run_host_cmd. Simplify.
(default_ld_compile): Simplify.
(check_lto_available): Use run_host_cmd_yesno.
(check_lto_shared_available): Likewise.
|
|
libdummy.a is used to make run_cc_link_tests compile objects and
archive them. libdummy.a isn't used. What we're really doing is
preventing a final link. So do that directly.
* lib/ld-lib.exp (run_ld_link_tests): Stop after assembling objects
if binfile is empty.
(run_ld_link_exec_tests, run_cc_link_tests): Likewise. Tidy
status checks.
* ld-plugin/lto.exp: Don't use libdummy.a trick to compile objects.
Instead use an empty output file.
|
|
ld/testsuite/
* lib/ld-lib.exp: Add objcopy_objects command to run_dump_test.
This allows each input object to be optionally run through
objcopy before linking.
|
|
with support for the new or1k configuration.
|
|
|
|
(default_ld_simple_link): Likewise.
|