This is an archive of the discontinued LLVM Phabricator instance.

[llvm-readobj][COFF] Print load config GuardFlags as enum flags
ClosedPublic

Authored by alvinhochun on Aug 28 2022, 11:36 PM.

Details

Summary

Print flags as documented in MS docs.
https://docs.microsoft.com/en-us/windows/win32/debug/pe-format#load-configuration-layout
https://docs.microsoft.com/en-us/windows/win32/secbp/pe-metadata

EH_CONTINUATION_TABLE_PRESENT is not mentioned in the docs but is
instead taken from Windows SDK headers.

Diff Detail

Event Timeline

alvinhochun created this revision.Aug 28 2022, 11:36 PM
Herald added a project: Restricted Project. · View Herald Transcript
Herald added a subscriber: rupprecht. · View Herald Transcript
alvinhochun requested review of this revision.Aug 28 2022, 11:36 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 28 2022, 11:36 PM
alvinhochun edited the summary of this revision. (Show Details)

Add reference link

alvinhochun edited the summary of this revision. (Show Details)

Fix tests

rnk accepted this revision.Aug 29 2022, 10:06 AM

Thanks!

llvm/tools/llvm-readobj/COFFDumper.cpp
853

Please replace the existing coff_guard_flags enum with the new enum that you just added. It only has 7 hits across the codebase, but some are in LLD. That can also be a follow up CL, if you prefer, but I don't want to carry both duplicate enums long term.

This revision is now accepted and ready to land.Aug 29 2022, 10:06 AM
alvinhochun added inline comments.Aug 30 2022, 3:06 AM
llvm/tools/llvm-readobj/COFFDumper.cpp
853

Sure, I've made D132924.

rnk added a comment.Aug 30 2022, 10:48 AM

Looks good, thanks

llvm/tools/llvm-readobj/COFFDumper.cpp
853

Thanks!