Add OpenBSD program headers to elfdump#9
Open
csjayp wants to merge 5 commits into
Open
Conversation
Due to missing relocation support in libdwarf for powerpc64, handling of dwarf info on unlinked objects was bogus. Examining raw dwarf data on objects compiled on ppc64 with a modern compiler, one would find that the dwarf data appeared corrupt, with repeated references to the compiler version where things like types and function names should appear. This happenend because the 0 offset of .debug_str contains the compiler version, and without applying the relocations, *all* indirect strings in .dwarf_info end up pointing to it. However, examining the dwarf data on a compiled executable appeared correct because during final link the relocations get applied and baked in by the linker. On FreeBSD this corruption then propogated to CTF data, as ctfconvert relies on libdwarf to read the dwarf info, for every compiled object (when building a kernel). FreeBSD's older in-tree gcc tends to hide the issue, since it only rarely generates relocations in .debug_info and uses DW_FORM_str instead of DW_FORM_strp for everything. Submitted by: Brandon Bergren, via Justin Hibbits Obtained from: FreeBSD r348347
Decode d_val when the tag is DT_FLAGS or DT_FLAGS_1 based on the information at: https://docs.oracle.com/cd/E23824_01/html/819-0690/chapter6-42444.html Submitted by Bora Ozarslan <borako.ozarslan@gmail.com>, with subsequent refactoring by me. Obtained from: FreeBSD r343592, r343593, r343665, r345646
Output format is compatible with GNU readelf's handling of unknown note types (modulo a GNU char signedness bug); future changes will add type- specific decoding. Add specific decoding for NT_FREEBSD_ABI_TAG, NT_FREEBSD_ARCH_TAG, and NT_FREEBSD_FEATURE_CTL. Obtained from: FreeBSD r343614, r343669
Add support to decode program headers for: - WXNEEDED - BOOTDATA - RANDOMIZE
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add support to decode program headers for: