diff options
author | Nick Clifton <nickc@redhat.com> | 2005-05-03 12:02:47 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2005-05-03 12:02:47 +0000 |
commit | c1d05a606c3ae775523d364d3aa185ba1dd7ab46 (patch) | |
tree | d06a84918bbc9341857baba4ba639712fd479834 /gas/config | |
parent | e02b83d7f42fda0f69a040687f3fe8ba39d5e082 (diff) | |
download | gdb-c1d05a606c3ae775523d364d3aa185ba1dd7ab46.zip gdb-c1d05a606c3ae775523d364d3aa185ba1dd7ab46.tar.gz gdb-c1d05a606c3ae775523d364d3aa185ba1dd7ab46.tar.bz2 |
* 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.
Diffstat (limited to 'gas/config')
-rw-r--r-- | gas/config/obj-ecoff.c | 6 | ||||
-rw-r--r-- | gas/config/tc-mmix.c | 10 | ||||
-rw-r--r-- | gas/config/tc-xtensa.c | 17 |
3 files changed, 17 insertions, 16 deletions
diff --git a/gas/config/obj-ecoff.c b/gas/config/obj-ecoff.c index 71aade0..6bfb79e 100644 --- a/gas/config/obj-ecoff.c +++ b/gas/config/obj-ecoff.c @@ -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. */ { diff --git a/gas/config/tc-mmix.c b/gas/config/tc-mmix.c index 66fda95..356a68a 100644 --- a/gas/config/tc-mmix.c +++ b/gas/config/tc-mmix.c @@ -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; } diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c index 663c531..9340e4d 100644 --- a/gas/config/tc-xtensa.c +++ b/gas/config/tc-xtensa.c @@ -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); } |