Issue an error message when attmepting to copy an empty input file.
[deliverable/binutils-gdb.git] / bfd / bfd-in2.h
index 626642045b28364dd443cdbb7a456de88849b76b..bed224d34be5a1e57eba6e020b2c2901a25c55de 100644 (file)
@@ -1445,6 +1445,8 @@ extern const struct bfd_symbol * const bfd_ind_symbol;
       *_ps = _s->next;                                 \
       if (_s->next == NULL)                            \
         (ABFD)->section_tail = _ps;                    \
+      else                                             \
+        _s->next = NULL;                               \
     }                                                  \
   while (0)
 #define bfd_section_list_insert(ABFD, PS, S) \
@@ -1458,6 +1460,8 @@ extern const struct bfd_symbol * const bfd_ind_symbol;
         (ABFD)->section_tail = &_s->next;              \
     }                                                  \
   while (0)
+#define bfd_section_removed_from_list(ABFD, S) \
+  ((S)->next == NULL && &(S)->next != (ABFD)->section_tail)
 
 void bfd_section_list_clear (bfd *);
 
This page took 0.025557 seconds and 4 git commands to generate.