gwcheck

Check .gnu.warning.* sections in ELF object files
Log | Files | Refs | README | LICENSE

commit 365223619a6981d38b4f45c954efa3d9348e0a42
parent 1ce8fa119dbcc9d997b9f25c343e22ddb7576417
Author: Frederic Cambus <fred@statdns.com>
Date:   Thu,  4 Nov 2021 16:04:28 +0100

Strip trailing NUL characters when displaying data.

Those are encountered in FreeBSD and DragonFlyBSD C libraries.

Diffstat:
Mgwcheck | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gwcheck b/gwcheck @@ -24,7 +24,7 @@ def main(): if section["sh_type"] == "SHT_PROGBITS": if section.name.startswith(".gnu.warning"): print(section.name + ":") - print("\t" + section.data().decode("utf-8")) + print("\t" + section.data().decode("utf-8").rstrip("\0")) if __name__ == "__main__":