Relax assertion in BFIN linker to allow for discard GOT relocs.
[deliverable/binutils-gdb.git] / bfd / elf32-bfin.c
index 7cc8b6d851ec20706f0fcf49c4cf77870bbec018..b2fcf38b470e75ae0597cdd11f7b7c9cf7992de3 100644 (file)
@@ -4457,7 +4457,13 @@ elf32_bfinfdpic_finish_dynamic_sections (bfd *output_bfd,
   if (bfinfdpic_got_section (info))
     {
       BFD_ASSERT (bfinfdpic_gotrel_section (info)->size
-                 == (bfinfdpic_gotrel_section (info)->reloc_count
+                 /* PR 17334: It appears that the GOT section can end up
+                    being bigger than the number of relocs.  Presumably
+                    because some relocs have been deleted.  A test case has
+                    yet to be generated for verify this, but in the meantime
+                    the test below has been changed from == to >= so that
+                    applications can continue to be built.  */
+                 >= (bfinfdpic_gotrel_section (info)->reloc_count
                      * sizeof (Elf32_External_Rel)));
 
       if (bfinfdpic_gotfixup_section (info))
This page took 0.054598 seconds and 4 git commands to generate.