diff options
-rw-r--r-- | ld/ChangeLog | 7 | ||||
-rw-r--r-- | ld/ldexp.c | 1 | ||||
-rw-r--r-- | ld/ldmain.c | 10 |
3 files changed, 14 insertions, 4 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index 80247c5..fa367d3 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,5 +1,12 @@ 2021-05-07 Alan Modra <amodra@gmail.com> + * ldexp.c (update_definedness): Don't return false for absolute + symbols. + * ldmain.c (multiple_definition): Print "warning: " in message + when not a hard error. + +2021-05-07 Alan Modra <amodra@gmail.com> + * testsuite/ld-elf/pr27825-1.d: Correct xfail. * testsuite/ld-elf/pr27825-2.d: Likewise. @@ -325,6 +325,7 @@ update_definedness (const char *name, struct bfd_link_hash_entry *h) defentry->by_object = 1; if (h->type == bfd_link_hash_defined && h->u.def.section->output_section != NULL + && !bfd_is_abs_section (h->u.def.section) && !h->linker_def) ret = false; } diff --git a/ld/ldmain.c b/ld/ldmain.c index be33b69..42660eb 100644 --- a/ld/ldmain.c +++ b/ld/ldmain.c @@ -1073,10 +1073,12 @@ multiple_definition (struct bfd_link_info *info, nval = oval; obfd = NULL; } - if (!info->warn_multiple_definition) - einfo ("%X"); - einfo (_("%P: %C: multiple definition of `%pT'"), - nbfd, nsec, nval, name); + if (info->warn_multiple_definition) + einfo (_("%P: %C: warning: multiple definition of `%pT'"), + nbfd, nsec, nval, name); + else + einfo (_("%X%P: %C: multiple definition of `%pT'"), + nbfd, nsec, nval, name); if (obfd != NULL) einfo (_("; %D: first defined here"), obfd, osec, oval); einfo ("\n"); |