10362 Catch kernel module undefined symbols at build time

Review Request #1439 — Created Feb. 9, 2019 and submitted

rm
illumos-gate
master
10362
e84137c...
general

Provides a means to catch undefined symbols at build time of kernel modules that opt in (-zdefs).



  • 0
  • 0
  • 2
  • 0
  • 2
Description From Last Updated
seeemef@mac.com
  1. 
      
  2. usr/src/uts/common/mapfiles/README (Diff revision 1)
     
     

    Typo "affect"?

  3. 
      
igork
  1. Ship It!
  2. 
      
richlowe
  1. Did you look at this approach:
    v. the make symcheck approach on sparc
    v. what I think we use libgenunix.so for?

    1. I did a little bit. While we could try and use libgenunix.so as a source for things, that kind of implies doing it for eveyr possible depenency tree. Arguably maintaining the mapfile as a source of what's public may be worse. But there didn't seem to be an easy way to do this initially, at least. I also like that the default install target verifies that this is the case and ld complaining while building the module is pretty clear.

  2. 
      
richlowe
  1. Is there more benefit to providing a limited set of symbols (though still more than the DDI), v. auto-generating the mapfiles based on global functions?

    (one benefit might be not having to deal with the build system in uts/ too much, I'm not sure exactly where you'd slot this in without going crazy)

    1. Part of the reason I did it this way was to allow us to over time, be more concrete about what we considered available from different portions of the system and make it easier to see what folks used. That way one can distinguish between say, igb using MAC as a device driver and what dls uses that's private from MAC. That may not be worthwhile.

      The build system is a large part of the design here. This basically allows us to do builds in parallel, without adding dependencies between kernel modules that match the actual dependencies (which given modstubs, isn't pretty).

  2. 
      
richlowe
  1. I'm happy with that reasoning (fix the typo though)

  2. 
      
rm
seeemef@mac.com
  1. Ship It!
  2. 
      
gwr
  1. Ship It!
  2. 
      
domag02
  1. 
      
  2. usr/src/uts/Makefile.mapfile (Diff revision 2)
     
     

    Typo: 's/rulesto/rules to/'

  3. 
      
rm
domag02
  1. Ship It!
  2. 
      
rm
Review request changed

Status: Closed (submitted)

Loading...