diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 1ab1c2c8b92..7a79ee9f337 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,8 @@ +2017-02-24 Maciej W. Rozycki + + * readelf.c (get_ver_flags): Tidy the formatting of the string + returned + 2017-02-24 Maciej W. Rozycki * readelf.c (process_version_sections) : Make diff --git a/binutils/readelf.c b/binutils/readelf.c index 6edb364ef66..0603381687e 100644 --- a/binutils/readelf.c +++ b/binutils/readelf.c @@ -9947,26 +9947,31 @@ get_ver_flags (unsigned int flags) return _("none"); if (flags & VER_FLG_BASE) - strcat (buff, "BASE "); + strcat (buff, "BASE"); if (flags & VER_FLG_WEAK) { if (flags & VER_FLG_BASE) - strcat (buff, "| "); + strcat (buff, " | "); - strcat (buff, "WEAK "); + strcat (buff, "WEAK"); } if (flags & VER_FLG_INFO) { if (flags & (VER_FLG_BASE|VER_FLG_WEAK)) - strcat (buff, "| "); + strcat (buff, " | "); - strcat (buff, "INFO "); + strcat (buff, "INFO"); } if (flags & ~(VER_FLG_BASE | VER_FLG_WEAK | VER_FLG_INFO)) - strcat (buff, _("| ")); + { + if (flags & (VER_FLG_BASE | VER_FLG_WEAK | VER_FLG_INFO)) + strcat (buff, " | "); + + strcat (buff, _("")); + } return buff; }