• Vasily Gorbik's avatar
    objtool: Rework header include paths · 7786032e
    Vasily Gorbik authored
    Currently objtool headers are being included either by their base name
    or included via ../ from a parent directory. In case of a base name usage:
    
     #include "warn.h"
     #include "arch_elf.h"
    
    it does not make it apparent from which directory the file comes from.
    To make it slightly better, and actually to avoid name clashes some arch
    specific files have "arch_" suffix. And files from an arch folder have
    to revert to including via ../ e.g:
     #include "../../elf.h"
    
    With additional architectures support and the code base growth there is
    a need for clearer headers naming scheme for multiple reasons:
    1. to make it instantly obvious where these files come from (objtool
       itself / objtool arch|generic folders / some other external files),
    2. to avoid name clashes of objtool arch specific headers, potential
       obtool arch generic headers and the system header files (there is
       /usr/include/elf.h already),
    3. to avoid ../ includes and improve code readability.
    4. to give a warm...
    7786032e
objtool.c 3.05 KB