]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* config/obj-ecoff.c (ecoff_frob_file_before_fix): Fix invocations of bfd_section_lis...
authorNick Clifton <nickc@redhat.com>
Tue, 3 May 2005 12:02:47 +0000 (12:02 +0000)
committerNick Clifton <nickc@redhat.com>
Tue, 3 May 2005 12:02:47 +0000 (12:02 +0000)
* config/tc-mmix.c (mmix_frob_file): Likewise.
* config/tc-xtensa.c (xtensa_remove_section): Likewise.
(xtensa_insert_section): Likewise.

* macro.c (macro_hash): Remove static.
* macro.h (macro_hash): Provide an external declaration.

gas/ChangeLog
gas/config/obj-ecoff.c
gas/config/tc-mmix.c
gas/config/tc-xtensa.c
gas/macro.c
gas/macro.h

index 369c5e2e9d568ffb8735c4142bbfbeebc9741871..34d5c111add7a9260a56f8df94f27cda8724626c 100644 (file)
@@ -1,3 +1,14 @@
+2005-05-03  Nick Clifton  <nickc@redhat.com>
+
+       * config/obj-ecoff.c (ecoff_frob_file_before_fix): Fix invocations
+       of bfd_section_list... macros.
+       * config/tc-mmix.c (mmix_frob_file): Likewise.
+       * config/tc-xtensa.c (xtensa_remove_section): Likewise.
+       (xtensa_insert_section): Likewise.
+
+       * macro.c (macro_hash): Remove static.
+       * macro.h (macro_hash): Provide an external declaration.
+
 2005-05-02  H.J. Lu  <hongjiu.lu@intel.com>
 
        * write.c (write_object_file): Use bfd_section_double_list_remove
index 71aade070835f4e7195c51ec18eeec6109b6dea0..6bfb79ea42f2d6e508fc0708dd5e3f93affd15b2 100644 (file)
@@ -78,7 +78,7 @@ ecoff_frob_file_before_fix (void)
 
   addr = 0;
   for (i = 0; i < n_names; i++)
-    secs[i] = 0;
+    secs[i] = NULL;
 
   for (sec = &stdoutput->sections; *sec !=  NULL;)
     {
@@ -86,7 +86,7 @@ ecoff_frob_file_before_fix (void)
        if (!strcmp ((*sec)->name, names[i]))
          {
            secs[i] = *sec;
-           bfd_section_list_remove (stdoutput, sec);
+           bfd_section_list_remove (stdoutput, *sec);
            break;
          }
       if (i == n_names)
@@ -104,7 +104,7 @@ ecoff_frob_file_before_fix (void)
       }
   for (i = n_names - 1; i >= 0; i--)
     if (secs[i])
-      bfd_section_list_insert (stdoutput, &stdoutput->sections, secs[i]);
+      bfd_section_list_insert_after (stdoutput, stdoutput->sections, secs[i]);
 
   /* Fill in the register masks.  */
   {
index 66fda95bcd533b332f8ed4aae4138dd5a161e045..356a68ab90b3218c3e7cc51dbe8894966986382a 100644 (file)
@@ -3747,18 +3747,18 @@ mmix_frob_file (void)
 
   if (real_reg_section != NULL)
     {
-      asection **secpp;
+      asection *secp;
 
       /* FIXME: Pass error state gracefully.  */
       if (bfd_get_section_flags (stdoutput, real_reg_section) & SEC_HAS_CONTENTS)
        as_fatal (_("register section has contents\n"));
 
       /* Really remove the section.  */
-      for (secpp = &stdoutput->sections;
-          *secpp != real_reg_section;
-          secpp = &(*secpp)->next)
+      for (secp = stdoutput->sections;
+          secp != real_reg_section;
+          secp = secp->next)
        ;
-      bfd_section_list_remove (stdoutput, secpp);
+      bfd_section_list_remove (stdoutput, secp);
       --stdoutput->section_count;
     }
 
index 663c531c039ef77cbb3720bd31eacdaab9f7b280..9340e4d50e8c528d18f4b18a554173105033cfd0 100644 (file)
@@ -9690,12 +9690,12 @@ xtensa_remove_section (segT sec)
   /* Handle brain-dead bfd_section_list_remove macro, which
      expect the address of the prior section's "next" field, not
      just the address of the section to remove.  */
+  segT ps_next_ptr = stdoutput->sections;
 
-  segT *ps_next_ptr = &stdoutput->sections;
-  while (*ps_next_ptr != sec && *ps_next_ptr != NULL) 
-    ps_next_ptr = &(*ps_next_ptr)->next;
+  while (ps_next_ptr != sec && ps_next_ptr != NULL) 
+    ps_next_ptr = ps_next_ptr->next;
   
-  assert (*ps_next_ptr != NULL);
+  assert (ps_next_ptr != NULL);
 
   bfd_section_list_remove (stdoutput, ps_next_ptr);
 }
@@ -9704,13 +9704,14 @@ xtensa_remove_section (segT sec)
 static void
 xtensa_insert_section (segT after_sec, segT sec)
 {
-  segT *after_sec_next;
+  segT after_sec_next;
+
   if (after_sec == NULL)
-    after_sec_next = &stdoutput->sections;
+    after_sec_next = stdoutput->sections;
   else
-    after_sec_next = &after_sec->next;
+    after_sec_next = after_sec->next;
 
-  bfd_section_list_insert (stdoutput, after_sec_next, sec);
+  bfd_section_list_insert_after (stdoutput, after_sec_next, sec);
 }
 
 
index 6f370bbe9d3cf4d817304bbd2df0a7f191ceb9ef..f7d53bc673f36c0c5c4adc4aca547879a62d54a7 100644 (file)
@@ -94,7 +94,7 @@ static void free_macro(macro_entry *);
 
 /* The macro hash table.  */
 
-static struct hash_control *macro_hash;
+struct hash_control *macro_hash;
 
 /* Whether any macros have been defined.  */
 
index 958a84bd5d482d02e3045bf294937ee668c3cf15..4e56125c530887b9791d292935b3ba2dd6a7b2e6 100644 (file)
@@ -73,6 +73,10 @@ extern int macro_defined;
 
 extern int macro_nest;
 
+/* The macro hash table.  */
+
+extern struct hash_control *macro_hash;
+
 extern int buffer_and_nest (const char *, const char *, sb *, int (*) (sb *));
 extern void macro_init
   (int, int, int, int (*) (const char *, int, sb *, int *));