]> git.ozlabs.org Git - petitboot/commitdiff
parsers: dynamically register parsers
authorJeremy Kerr <jk@ozlabs.org>
Mon, 18 Mar 2013 06:23:23 +0000 (14:23 +0800)
committerJeremy Kerr <jk@ozlabs.org>
Mon, 29 Apr 2013 04:41:04 +0000 (14:41 +1000)
Currently, we require all parsers to be defined in an array in
parsers.c.

This change removes this requirement, by introducting a
register_parser() macro, which adds a constructor to register the parser
with the core parser infrastructure.

Because each parser no longer resolves an undefined symbol, we need to
use a `ld -r` object for libparser, instead of using libtool, which
creates a .a (and hence has no parsers included).

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>

No differences found