diff options
author | Nick Clifton <nickc@redhat.com> | 2020-08-28 09:43:13 +0100 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2020-08-28 09:43:13 +0100 |
commit | 6194b866b7a89969d8c66f8a97d40acc028373b1 (patch) | |
tree | 57802d68d3caaceb5e90eae41de27b5e53c04625 /bfd/cofflink.c | |
parent | 16f9c644c7fcec6f4aa6f4e8a1458b57d2b28982 (diff) | |
download | gdb-6194b866b7a89969d8c66f8a97d40acc028373b1.zip gdb-6194b866b7a89969d8c66f8a97d40acc028373b1.tar.gz gdb-6194b866b7a89969d8c66f8a97d40acc028373b1.tar.bz2 |
Fixes for testsuite failures introduced by the changes made for PR 19011.
PR19011
bfd * cofflink.c (_bfd_coff_generic_relocate_section): Provide a value
for undefined symbols which will not generate extra warning
messages about truncated relocs.
ld * testsuite/lib/ld-lib.exp (ld_link_defsyms): For PE based targets
define the __main and ___main symbols in terms of the main symbol.
Diffstat (limited to 'bfd/cofflink.c')
-rw-r--r-- | bfd/cofflink.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/bfd/cofflink.c b/bfd/cofflink.c index 63bdcde..8833cd0 100644 --- a/bfd/cofflink.c +++ b/bfd/cofflink.c @@ -3053,9 +3053,15 @@ _bfd_coff_generic_relocate_section (bfd *output_bfd, } 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 |