x86: correct overflow checking for 16-bit PC-relative relocs
[deliverable/binutils-gdb.git] / ld / ChangeLog
index 35c5e203f5d17f8b488db8484c51421da85efd0d..9bb178e42485aeef2d80e17580f2daac57be6e22 100644 (file)
@@ -1,3 +1,325 @@
+2021-04-26  Jan Beulich  <jbeulich@suse.com>
+
+       * testsuite/ld-i386/pcrel16-2.s, testsuite/ld-i386/pcrel16-2.d,
+       testsuite/ld-x86-64/pcrel16-2.d: New.
+       * testsuite/ld-i386/i386.exp: Run new test.
+       * testsuite/ld-x86-64/x86-64.exp: Likewise.
+
+2021-04-23  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR ld/27771
+       * testsuite/ld-bootstrap/bootstrap.exp: Create a symbolic link
+       to tmpdir/ldscripts only if it doesn't exist.
+
+2021-04-22  Jan Beulich  <jbeulich@suse.com>
+
+       PR ld/26659
+       * testsuite/ld-pe/pr26659-weak-undef-sym.d: Relax for Cygwin.
+
+2021-04-21  Nick Clifton  <nickc@redhat.com>
+
+       * testsuite/ld-aarch64/variant_pcs-now.d: Adjust expected output
+       to allow for named section symbols.
+       * testsuite/ld-aarch64/variant_pcs-r.d: Likewise.
+       * testsuite/ld-aarch64/variant_pcs-shared.d: Likewise.
+       * testsuite/ld-alpha/tlsbin.rd: Likewise.
+       * testsuite/ld-alpha/tlsbinr.rd: Likewise.
+       * testsuite/ld-alpha/tlspic.rd: Likewise.
+       * testsuite/ld-arm/rodata-merge-map.sym: Likewise.
+       * testsuite/ld-arm/script-type.sym: Likewise.
+       * testsuite/ld-cris/libdso-2.d: Likewise.
+       * testsuite/ld-cris/pr16044.d: Likewise.
+       * testsuite/ld-elf/sec64k.exp: Likewise.
+       * testsuite/ld-ia64/tlsbin.rd: Likewise.
+       * testsuite/ld-ia64/tlspic.rd: Likewise.
+       * testsuite/ld-mips-elf/global-local-symtab-sort-n64t.d: Likewise.
+       * testsuite/ld-mips-elf/global-local-symtab-sort-o32t.d: Likewise.
+       * testsuite/ld-mmix/bspec1.d: Likewise.
+       * testsuite/ld-mmix/bspec2.d: Likewise.
+       * testsuite/ld-mmix/local1.d: Likewise.
+       * testsuite/ld-mmix/local3.d: Likewise.
+       * testsuite/ld-mmix/local5.d: Likewise.
+       * testsuite/ld-mmix/local7.d: Likewise.
+       * testsuite/ld-mmix/undef-3.d: Likewise.
+       * testsuite/ld-powerpc/tlsso.r: Likewise.
+       * testsuite/ld-powerpc/tlsso32.r: Likewise.
+       * testsuite/ld-powerpc/tlstocso.r: Likewise.
+       * testsuite/ld-s390/tlsbin.rd: Likewise.
+       * testsuite/ld-s390/tlsbin_64.rd: Likewise.
+       * testsuite/ld-s390/tlspic.rd: Likewise.
+       * testsuite/ld-s390/tlspic_64.rd: Likewise.
+       * testsuite/ld-sparc/gotop32.rd: Likewise.
+       * testsuite/ld-sparc/gotop64.rd: Likewise.
+       * testsuite/ld-sparc/tlssunbin32.rd: Likewise.
+       * testsuite/ld-sparc/tlssunbin64.rd: Likewise.
+       * testsuite/ld-sparc/tlssunnopic32.rd: Likewise.
+       * testsuite/ld-sparc/tlssunnopic64.rd: Likewise.
+       * testsuite/ld-sparc/tlssunpic32.rd: Likewise.
+       * testsuite/ld-sparc/tlssunpic64.rd: Likewise.
+       * testsuite/ld-tic6x/common.d: Likewise.
+       * testsuite/ld-tic6x/shlib-1.rd: Likewise.
+       * testsuite/ld-tic6x/shlib-1b.rd: Likewise.
+       * testsuite/ld-tic6x/shlib-1r.rd: Likewise.
+       * testsuite/ld-tic6x/shlib-1rb.rd: Likewise.
+       * testsuite/ld-tic6x/shlib-app-1.rd: Likewise.
+       * testsuite/ld-tic6x/shlib-app-1b.rd: Likewise.
+       * testsuite/ld-tic6x/shlib-app-1r.rd: Likewise.
+       * testsuite/ld-tic6x/shlib-app-1rb.rd: Likewise.
+       * testsuite/ld-tic6x/shlib-noindex.rd: Likewise.
+       * testsuite/ld-tic6x/static-app-1.rd: Likewise.
+       * testsuite/ld-tic6x/static-app-1b.rd: Likewise.
+       * testsuite/ld-tic6x/static-app-1r.rd: Likewise.
+       * testsuite/ld-tic6x/static-app-1rb.rd: Likewise.
+
+2021-04-20  Clément Chigot  <clement.chigot@atos.net>
+
+       PR binutils/21700
+       * testsuite/ld-powerpc/aix52.exp: Add new test.
+       * testsuite/ld-powerpc/aix-neg-reloc-32.d: New test.
+       * testsuite/ld-powerpc/aix-neg-reloc-64.d: New test.
+       * testsuite/ld-powerpc/aix-neg-reloc.ex: New test.
+       * testsuite/ld-powerpc/aix-neg-reloc.s: New test.
+
+2021-04-13  Nick Clifton  <nickc@redhat.com>
+
+       * ld.texi (Options): Add note about the effect of --as-needed on
+       the --rpath and --rpath-link options on Linux based systems.
+
+2021-04-13  Alan Modra  <amodra@gmail.com>
+
+       PR 27722
+       * libdep_plugin.c (str2vec): Don't pass a potentially signed char
+       to isspace.
+
+2021-04-12  Alan Modra  <amodra@gmail.com>
+
+       * configure.ac (--enable-checking): Add support.
+       * config.in: Regenerate.
+       * configure: Regenerate.
+
+2021-04-12  Alan Modra  <amodra@gmail.com>
+
+       * emultempl/mipself.em (mips_create_output_section_statements):
+       Pass base type of hash table to is_elf_hash_table.
+       * ldelf.c (ldelf_after_open): Likewise.
+
+2021-04-12  Alan Modra  <amodra@gmail.com>
+
+       PR 27719
+       * ldlang.c (lang_mark_undefineds, undef_start_stop): Test that
+       the symbol hash table is the correct type before accessing
+       elf_link_hash_entry symbols.
+       * plugin.c (is_visible_from_outside): Likewise.
+       * emultempl/armelf.em (ld${EMULATION_NAME}_finish): Likewise.
+       * emultempl/solaris2.em (elf_solaris2_before_allocation): Likewise.
+
+2021-04-09  Alan Modra  <amodra@gmail.com>
+
+       * testsuite/ld-powerpc/inlinepcrel-1.d: Update expected output.
+       * testsuite/ld-powerpc/inlinepcrel-2.d: Likewise.
+       * testsuite/ld-powerpc/notoc2.d: Likewise.
+       * testsuite/ld-powerpc/notoc3.d: Likewise.
+       * testsuite/ld-powerpc/pcrelopt.d: Likewise.
+       * testsuite/ld-powerpc/startstop.d: Likewise.
+       * testsuite/ld-powerpc/tlsget.d: Likewise.
+       * testsuite/ld-powerpc/tlsget2.d: Likewise.
+       * testsuite/ld-powerpc/tlsld.d: Likewise.
+       * testsuite/ld-powerpc/weak1.d: Likewise.
+       * testsuite/ld-powerpc/weak1so.d: Likewise.
+
+2021-04-06  Jan Beulich  <jbeulich@suse.com>
+
+       * pe-dll.c (generate_reloc): Bail immediately when .reloc is
+       being discarded. Warn when relocated entry is above .reloc.
+
+2021-04-05  Alan Modra  <amodra@gmail.com>
+
+       * configure.ac: Move initfini-array arg handling earlier.  Don't
+       check for string.h, strings.h, stdlib.h, or locale.h.  Do check
+       for inttypes.h, stdint.h, sys/types.h.  Don't check for
+       setlocale, free, getev or strstr.
+       (AC_ISC_POSIX): Don't invoke.
+       * sysdep.h: Include string.h and stdlib.h unconditionally.  Test
+       HAVE_SYS_TYPE_H and HAVE_SYS_STAT_H.  Remove strstr, free and
+       getenv fallback declarations.
+       * ld.h: Don't test HAVE_LOCALE_H.
+       * ldmain.c: Don't test HAVE_SETLOCALE.
+       * config.in: Regenerate.
+       * configure: Regenerate.
+
+2021-04-01  Tamar Christina  <tamar.christina@arm.com>
+
+       PR ld/26659
+       * testsuite/ld-pe/pe.exp: Add test.
+       * testsuite/ld-pe/pr26659-weak-undef-sym.d: New test.
+       * testsuite/ld-pe/pr26659-weak-undef-sym.s: New test.
+
+2021-04-01  Martin Liska  <mliska@suse.cz>
+
+       * ldbuildid.c (strneq): Remove strneq and use startswith.
+       (validate_build_id_style): Likewise.
+       (compute_build_id_size): Likewise.
+
+2021-03-31  Alan Modra  <amodra@gmail.com>
+
+       * sysdep.h (POISON_BFD_BOOLEAN): Define.
+       * configure.ac (elf_list_options, elf_shlib_list_options=false),
+       (elf_plt_unwind_list_options=false): Replace FALSE with false,
+       and TRUE with true.
+       * emulparams/call_nop.sh, * emulparams/cet.sh,
+       * emulparams/dynamic_undefined_weak.sh,
+       * emulparams/elf32b4300.sh, * emulparams/elf32lm32.sh,
+       * emulparams/elf32lr5900.sh, * emulparams/elf32lr5900n32.sh,
+       * emulparams/elf32visium.sh, * emulparams/elf_x86_64.sh,
+       * emulparams/extern_protected_data.sh, * emulparams/plt_unwind.sh,
+       * emulparams/reloc_overflow.sh, * emulparams/static.sh,
+       * emulparams/x86-64-lam.sh, * emultempl/aarch64elf.em,
+       * emultempl/aix.em, * emultempl/alphaelf.em,
+       * emultempl/armcoff.em, * emultempl/armelf.em,
+       * emultempl/avrelf.em, * emultempl/beos.em, * emultempl/bfin.em,
+       * emultempl/cr16elf.em, * emultempl/crxelf.em,
+       * emultempl/cskyelf.em, * emultempl/elf.em, * emultempl/genelf.em,
+       * emultempl/hppaelf.em, * emultempl/linux.em,
+       * emultempl/m68hc1xelf.em, * emultempl/metagelf.em,
+       * emultempl/mipself.em, * emultempl/mmix-elfnmmo.em,
+       * emultempl/mmixelf.em, * emultempl/mmo.em, * emultempl/msp430.em,
+       * emultempl/nios2elf.em, * emultempl/pdp11.em, * emultempl/pe.em,
+       * emultempl/pep.em, * emultempl/ppc32elf.em,
+       * emultempl/ppc64elf.em, * emultempl/rxelf.em,
+       * emultempl/rxlinux.em, * emultempl/scoreelf.em,
+       * emultempl/solaris2.em, * emultempl/spuelf.em,
+       * emultempl/ticoff.em, * emultempl/v850elf.em, * emultempl/vms.em,
+       * emultempl/xtensaelf.em, * emultempl/z80.em, * ld.h,
+       * ldbuildid.c, * ldbuildid.h, * ldcref.c, * ldctor.c, * ldctor.h,
+       * ldelf.c, * ldelf.h, * ldelfgen.c, * ldelfgen.h, * ldemul.c,
+       * ldemul.h, * ldexp.c, * ldexp.h, * ldfile.c, * ldfile.h,
+       * ldgram.y, * ldlang.c, * ldlang.h, * ldmain.c, * ldmain.h,
+       * ldmisc.c, * ldmisc.h, * ldwrite.c, * lexsup.c, * mri.c,
+       * pe-dll.c, * pe-dll.h, * pep-dll.h, * plugin.c, * plugin.h,
+       * testplug.c, * testplug2.c, * testplug3.c, * testplug4.c: Replace
+       bfd_boolean with bool, FALSE with false, and TRUE with true.
+       * configure: Regenerate.
+
+2021-03-31  Alan Modra  <amodra@gmail.com>
+
+       * elf-hints-local.h: Include stdint.h in place of bfd_stdint.h.
+       * emultempl/nds32elf.em: Likewise.
+       * testsuite/ld-elf/mbind2b.c: Likewise.
+       * testsuite/ld-elf/pr18718.c: Likewise.
+       * testsuite/ld-elf/pr18720a.c: Likewise.
+       * testsuite/ld-elf/pr25749-1.c: Likewise.
+       * testsuite/ld-elf/pr25749-1a.c: Likewise.
+       * testsuite/ld-elf/pr25749-1b.c: Likewise.
+       * testsuite/ld-elf/pr25749-1c.c: Likewise.
+       * testsuite/ld-elf/pr25749-1d.c: Likewise.
+       * testsuite/ld-elf/pr25749-2.c: Likewise.
+       * testsuite/ld-elf/pr25754-1a.c: Likewise.
+       * testsuite/ld-elf/pr25754-2a.c: Likewise.
+       * testsuite/ld-elf/pr25754-3a.c: Likewise.
+       * testsuite/ld-elf/pr25754-4a.c: Likewise.
+       * testsuite/ld-elf/pr25754-5a.c: Likewise.
+       * testsuite/ld-elf/pr25754-6a.c: Likewise.
+
+2021-03-29  Alan Modra  <amodra@gmail.com>
+
+       * emultempl/aix.em (gld${EMULATION_NAME}_before_allocation): Simplify
+       boolean expression.
+       * lexsup.c (parse_args): Likewise.
+       * pe-dll.c (pe_dll_id_target): Likewise.
+
+2021-03-25  Nick Alcock  <nick.alcock@oracle.com>
+
+       * testsuite/ld-ctf/array.d: Only check that the data object
+       section is nonempty: do not check its exact size.
+       * testsuite/ld-ctf/diag-parlabel.d: Likewise.
+       * testsuite/ld-ctf/slice.d: Likewise.
+       * testsuite/ld-ctf/data-func-conflicted.d: Likewise, and for the
+       func info section too.
+       * testsuite/ld-ctf/function.d: Likewise, for the func info section.
+
+2021-03-22  Martin Liska  <mliska@suse.cz>
+
+       * emultempl/aix.em: Replace usage of CONST_STRNEQ with startswith.
+       * emultempl/beos.em: Likewise.
+       * emultempl/elf.em: Likewise.
+       * emultempl/pe.em: Likewise.
+       * emultempl/pep.em: Likewise.
+       * emultempl/xtensaelf.em: Likewise.
+       * ldctor.c (ctor_prio): Likewise.
+       * ldelf.c (ldelf_try_needed): Likewise.
+       (ldelf_parse_ld_so_conf): Likewise.
+       (ldelf_after_open): Likewise.
+       (output_rel_find): Likewise.
+       (ldelf_place_orphan): Likewise.
+       * ldfile.c (ldfile_add_library_path): Likewise.
+       * ldlang.c (lang_add_input_file): Likewise.
+       * ldmain.c (get_sysroot): Likewise.
+       (get_emulation): Likewise.
+       (add_archive_element): Likewise.
+       * ldwrite.c (unsplittable_name): Likewise.
+       (clone_section): Likewise.
+       * lexsup.c (parse_args): Likewise.
+       * pe-dll.c (is_import): Likewise.
+       (pe_implied_import_dll): Likewise.
+
+2021-03-19  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR ld/27590
+       * testsuite/ld-x86-64/pr27590.rd: New file.
+       * testsuite/ld-x86-64/pr27590a.obj.bz2: Likewise.
+       * testsuite/ld-x86-64/pr27590b.obj.bz2: Likewise.
+       * testsuite/ld-x86-64/x86-64.exp: Run ld/27590 test.
+
+2021-03-20  Alan Modra  <amodra@gmail.com>
+
+       PR 27590
+       * ldlang.c (lang_gc_sections): Clear SEC_EXCLUDE when relocatable
+       for all sections except .stabstr.
+
+2021-03-19  Alan Modra  <amodra@gmail.com>
+
+       PR 27590
+       * testsuite/ld-elf/pr27590a.d: Match relocs using label, and
+       R_MIPS_NONE.
+       * testsuite/ld-elf/pr27590b.d: Likewise.
+
+2021-03-18  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR ld/27590
+       * testsuite/ld-elf/pr27590.s: New file.
+       * testsuite/ld-elf/pr27590a.d: Likewise.
+       * testsuite/ld-elf/pr27590b.d: Likewise.
+       * testsuite/ld-i386/i386.exp: Also run ld/27193 test with
+       --reduce-memory-overheads.
+
+2021-03-18  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR ld/27587
+       * testsuite/ld-x86-64/pr27587.err: New file.
+       * testsuite/ld-x86-64/pr27587a.obj.bz2: Likewise.
+       * testsuite/ld-x86-64/pr27587b.obj.bz2: Likewise.
+       * testsuite/ld-x86-64/x86-64.exp: Run PR ld/27587 test.
+
+2021-03-18  Nick Alcock  <nick.alcock@oracle.com>
+
+       * testsuite/ld-ctf/slice.c: Check slices of enums too.
+       * testsuite/ld-ctf/slice.d: Results adjusted.
+
+2021-03-16  Nick Clifton  <nickc@redhat.com>
+
+       * pe-dll.c (pe_find_cdecl_alias_match): Use memmove to overwrite
+       lname string.
+
+2021-03-15  Jan Beulich  <jbeulich@suse.com>
+
+       * pe-dll.c (generate_reloc): Drop padding to reloc_s->size.
+
+2021-03-12  Alan Modra  <amodra@gmail.com>
+
+       * Makefile.am (ALL_EMULATION_SOURCES): Move riscv files to..
+       (ALL_64_EMULATION_SOURCES): ..here.
+       * Makefile.in: Regenerate.
+
 2021-03-12  Clément Chigot  <clement.chigot@atos.net>
 
        * emultempl/aix.em: Ensure .tdata section is removed
This page took 0.028501 seconds and 4 git commands to generate.