]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - bfd/elf64-alpha.c
* elf-bfd.h (elf_discarded_section): Define.
[thirdparty/binutils-gdb.git] / bfd / elf64-alpha.c
index 1bfe15df64d54159942db8297c2c9b1a37011a25..14c20f3022f4e56f33eeba32a8971c4e4b7b55da 100644 (file)
@@ -3628,6 +3628,15 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
          {
            const char *name;
 
+           /* Don't warn if the overflow is due to pc relative reloc
+              against discarded section.  Section optimization code should
+              handle it.  */
+
+           if (r_symndx < symtab_hdr->sh_info
+               && sec != NULL && howto->pc_relative
+               && elf_discarded_section (sec))
+             break;
+
            if (h != NULL)
              name = h->root.root.root.string;
            else