Q: Relationship between (PE <> winnt.h ) and (ELF <> elf32.h) What I know:
winnt.h contains the structure/definition of PE file and its components (Windows), and ELF32.h contains structure of ELF file and definition of each components(Linux).
What i think (understanding/observation):
I understand that the winnt.h not only contains the PE structure/definition but also contains various macros and types (for Windows NT), and it is a child header file of windows.h (so, based on my understanding, winnt.h has another important application to provide win API etc). However, based on my observation, elf32.h only contains definition/structure of ELF file (and nothing more than that.
My Question: what is the application/functionality of winnt.h when it comes to compiling/interpereting/executing a PE file? 
I understand that winnt.h has another application (providing Win API/Macros/etc) and is a prefect guide to understand/dismantle a PE file, but how this file is specificly used by the OS? 


*

*Does the compiler use it to build the PE file from source?

*Does the OS use it to interperet the PE file?


*And the same question for ELF32(or 64).h and ELF file.
Any answer is much appreciated.
