diff options
Diffstat (limited to 'ld')
-rw-r--r-- | ld/ChangeLog | 5 | ||||
-rw-r--r-- | ld/ldmisc.c | 24 |
2 files changed, 12 insertions, 17 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index d24973e..955d460 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,5 +1,10 @@ 2019-09-11 Alan Modra <amodra@gmail.com> + * ldmisc.c: Don't #include elf-bfd.h or coff-bfd.h. + (vfinfo): Use bfd_group_name. + +2019-09-11 Alan Modra <amodra@gmail.com> + * plugin.c (asymbol_from_plugin_symbol): Move code handling ELF common symbols to block handling ELF visibility. Simplify visibility setting. diff --git a/ld/ldmisc.c b/ld/ldmisc.c index f7ab7b5..319f247 100644 --- a/ld/ldmisc.c +++ b/ld/ldmisc.c @@ -35,8 +35,6 @@ #include "ldlex.h" #include "ldmain.h" #include "ldfile.h" -#include "elf-bfd.h" -#include "coff-bfd.h" /* %% literal % @@ -431,26 +429,18 @@ vfinfo (FILE *fp, const char *fmt, va_list ap, bfd_boolean is_warning) /* section name from a section */ asection *sec; bfd *abfd; - const char *group = NULL; - struct coff_comdat_info *ci; fmt++; sec = (asection *) args[arg_no].p; ++arg_count; - abfd = sec->owner; fprintf (fp, "%s", sec->name); - if (abfd != NULL - && bfd_get_flavour (abfd) == bfd_target_elf_flavour - && elf_next_in_group (sec) != NULL - && (sec->flags & SEC_GROUP) == 0) - group = elf_group_name (sec); - else if (abfd != NULL - && bfd_get_flavour (abfd) == bfd_target_coff_flavour - && (ci = bfd_coff_get_comdat_section (sec->owner, - sec)) != NULL) - group = ci->name; - if (group != NULL) - fprintf (fp, "[%s]", group); + abfd = sec->owner; + if (abfd != NULL) + { + const char *group = bfd_group_name (abfd, sec); + if (group != NULL) + fprintf (fp, "[%s]", group); + } } else if (*fmt == 'B') { |