Skip to content
  • Mathieu Desnoyers's avatar
    Linux Kernel Markers: create modpost file · b2e3e658
    Mathieu Desnoyers authored
    
    
    This adds some new magic in the MODPOST phase for CONFIG_MARKERS.  Analogous
    to the Module.symvers file, the build will now write a Module.markers file
    when CONFIG_MARKERS=y is set.  This file lists the name, defining module, and
    format string of each marker, separated by \t characters.  This simple text
    file can be used by offline build procedures for instrumentation code,
    analogous to how System.map and Module.symvers can be useful to have for
    kernels other than the one you are running right now.
    
    The strings are made easy to extract by having the __trace_mark macro define
    the name and format together in a single array called __mstrtab_* in the
    __markers_strings section.  This is straightforward and reliable as long as
    the marker structs are always defined by this macro.  It is an unreasonable
    amount of hairy work to extract the string pointers from the __markers section
    structs, which entails handling a relocation type for every machine under the
    sun.
    
    Mathieu :
    - Ran through checkpatch.pl
    
    Signed-off-by: default avatarRoland McGrath <roland@redhat.com>
    Signed-off-by: default avatarMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
    Cc: David Smith <dsmith@redhat.com>
    Cc: Sam Ravnborg <sam@ravnborg.org>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    b2e3e658