+2020-08-28  Nick Clifton  <nickc@redhat.com>
+
+       PR19011
+       * cofflink.c (_bfd_coff_generic_relocate_section): Provide a value
+       for undefined symbols which will not generate extra warning
+       messages about truncated relocs.
+
 2020-08-28  Nelson Chu  <nelson.chu@sifive.com>
 
        * elfnn-riscv.c (riscv_elf_check_relocs): Treat R_RISCV_CALL
 
            }
 
          else if (! bfd_link_relocatable (info))
-           (*info->callbacks->undefined_symbol)
-             (info, h->root.root.string, input_bfd, input_section,
-              rel->r_vaddr - input_section->vma, TRUE);
+           {
+             (*info->callbacks->undefined_symbol)
+               (info, h->root.root.string, input_bfd, input_section,
+                rel->r_vaddr - input_section->vma, TRUE);
+             /* Stop the linker from issueing errors about truncated relocs
+                referencing this undefined symbol by giving it an address
+                that should be in range.  */
+             val = input_section->output_section->vma;
+           }
        }
 
       /* If the input section defining the symbol has been discarded
 
+2020-08-28  Nick Clifton  <nickc@redhat.com>
+
+       PR 19011
+       * testsuite/lib/ld-lib.exp (ld_link_defsyms): For PE based targets
+       define the __main and ___main symbols in terms of the main symbol.
+
 2020-08-28  Alan Modra  <amodra@gmail.com>
 
        PR 19011
 
 
     # Windows targets need __main, some prefixed with underscore.
     if {[istarget *-*-cygwin* ] || [istarget *-*-mingw*]} {
-        append flags " --defsym __main=0 --defsym ___main=0"
+        append flags " --defsym __main=main --defsym ___main=main"
     }
 
     # PowerPC EABI code calls __eabi.