diff options
author | Alan Modra <amodra@gmail.com> | 2020-05-19 12:55:27 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2020-05-19 12:55:27 +0930 |
commit | 69f57659c37106c4407a801d89eed4b3e2243074 (patch) | |
tree | f7a4b3114d8d37ede3adf657554c27d3949f1d20 | |
parent | c177f3771c821d649bc1b1d6dc67caa0a0a22f78 (diff) | |
download | binutils-gdb-69f57659c37106c4407a801d89eed4b3e2243074.tar.gz |
Use bfd_get_filename throughout gas
* write.c (write_contents): Use bfd_get_filename rather than
accessing bfd->filename directly. Use bfd_section_name rather
than accessing section->name directly.
-rw-r--r-- | gas/ChangeLog | 6 | ||||
-rw-r--r-- | gas/write.c | 16 |
2 files changed, 16 insertions, 6 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index c73d02a5da5..05f5f2385cc 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,5 +1,11 @@ 2020-05-19 Alan Modra <amodra@gmail.com> + * write.c (write_contents): Use bfd_get_filename rather than + accessing bfd->filename directly. Use bfd_section_name rather + than accessing section->name directly. + +2020-05-19 Alan Modra <amodra@gmail.com> + * symbols.c (local_symbol_make): Init all of lsy_flags. 2020-05-18 Alan Modra <amodra@gmail.com> diff --git a/gas/write.c b/gas/write.c index 0a6f07aa077..5825117548c 100644 --- a/gas/write.c +++ b/gas/write.c @@ -1625,7 +1625,7 @@ write_contents (bfd *abfd ATTRIBUTE_UNUSED, "to section %s of %s: '%s'", (long) f->fr_fix), (long) f->fr_fix, - sec->name, stdoutput->filename, + bfd_section_name (sec), bfd_get_filename (stdoutput), bfd_errmsg (bfd_get_error ())); offset += f->fr_fix; } @@ -1649,9 +1649,11 @@ write_contents (bfd *abfd ATTRIBUTE_UNUSED, "in section %s of %s: '%s'", "can't fill %ld bytes " "in section %s of %s: '%s'", - (long) count), (long) count, - sec->name, stdoutput->filename, - bfd_errmsg (bfd_get_error ())); + (long) count), + (long) count, + bfd_section_name (sec), + bfd_get_filename (stdoutput), + bfd_errmsg (bfd_get_error ())); offset += count; free (buf); } @@ -1678,7 +1680,8 @@ write_contents (bfd *abfd ATTRIBUTE_UNUSED, "in section %s of %s: '%s'", (long) fill_size), (long) fill_size, - sec->name, stdoutput->filename, + bfd_section_name (sec), + bfd_get_filename (stdoutput), bfd_errmsg (bfd_get_error ())); offset += fill_size; } @@ -1714,7 +1717,8 @@ write_contents (bfd *abfd ATTRIBUTE_UNUSED, "in section %s of %s: '%s'", (long) (n_per_buf * fill_size)), (long) (n_per_buf * fill_size), - sec->name, stdoutput->filename, + bfd_section_name (sec), + bfd_get_filename (stdoutput), bfd_errmsg (bfd_get_error ())); offset += n_per_buf * fill_size; } |