Created attachment 193451 [details] Patch to elfdump to recognise .note.tag sections. This command prints nothing even though /bin/sh has a note section: /usr/bin/elfdump -n /bin/sh The problem is that https://svnweb.freebsd.org/base/head/usr.bin/elfdump/elfdump.c?view=markup#l662 is looking for a note section named .note.ABI-tag but the name has been .note.tag since r232832. Fixed by the attached patch.
A commit references this bug: Author: emaste Date: Wed May 30 01:16:50 UTC 2018 New revision: 334363 URL: https://svnweb.freebsd.org/changeset/base/334363 Log: elfdump: chase ABI tag note name change from r232832 r232832 changed the ABI tag note name from .note.ABI-tag to .note.tag. Follow suit in elfdump. Elfdump's note parsing is very basic and should be significantly reworked, but for now just restore the broken functionality. PR: 228290 Submitted by: martin at lispworks.com MFC after: 1 week Changes: head/usr.bin/elfdump/elfdump.c
Created attachment 194204 [details] More desriptive elfdump patch I independently came up with this patch around the same time the original was created. This keeps support for the .note.ABI-tag section alongside the .note.tag section. It also displays the note type, not just its value. That way noinit tags, arch tags, and abi tags can be kept separate.
A commit references this bug: Author: emaste Date: Tue Jun 19 17:11:54 UTC 2018 New revision: 335375 URL: https://svnweb.freebsd.org/changeset/base/335375 Log: MFC r334363: elfdump: chase ABI tag note name change from r232832 r232832 changed the ABI tag note name from .note.ABI-tag to .note.tag. Follow suit in elfdump. Elfdump's note parsing is very basic and should be significantly reworked, but for now just restore the broken functionality. PR: 228290 Submitted by: martin at lispworks.com Changes: _U stable/11/ stable/11/usr.bin/elfdump/elfdump.c
A commit references this bug: Author: emaste Date: Thu Jan 31 16:19:04 UTC 2019 New revision: 343610 URL: https://svnweb.freebsd.org/changeset/base/343610 Log: elfdump: include note type names Based on a patch submitted by Dan McGregor. PR: 228290 MFC after: 1 week Sponsored by: The FreeBSD Foundation Changes: head/usr.bin/elfdump/elfdump.c
A commit references this bug: Author: emaste Date: Thu Jan 31 16:21:10 UTC 2019 New revision: 343611 URL: https://svnweb.freebsd.org/changeset/base/343611 Log: elfdump: fix build after r343610 One patch hunk did not survive the trip from git to svn. PR: 228290 MFC with: r343610 Changes: head/usr.bin/elfdump/elfdump.c
A commit references this bug: Author: emaste Date: Thu Jan 31 16:49:06 UTC 2019 New revision: 343613 URL: https://svnweb.freebsd.org/changeset/base/343613 Log: elfdump: use designated array initialization for note types This ensures the note type name is in the correct slot. PR: 228290 Submitted by: kib MFC with: 343610 Sponsored by: The FreeBSD Foundation Changes: head/usr.bin/elfdump/elfdump.c
A commit references this bug: Author: emaste Date: Sun Mar 8 21:10:16 UTC 2020 New revision: 358782 URL: https://svnweb.freebsd.org/changeset/base/358782 Log: MFC r343610: elfdump: include note type names Based on a patch submitted by Dan McGregor. - MFC r343611: elfdump: fix build after r343610 - MFC r343613: elfdump: use designated array initialization for note types This ensures the note type name is in the correct slot. Submitted by: kib - PR: 228290 Sponsored by: The FreeBSD Foundation Changes: _U stable/12/ stable/12/usr.bin/elfdump/elfdump.c
Committed Jan 31 16:49:06 UTC 2019 as r343613.