diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2013-03-18 14:23:23 +0800 |
---|---|---|
committer | Jeremy Kerr <jk@ozlabs.org> | 2013-04-29 14:41:04 +1000 |
commit | 45e92aa32a80fdbbf5ad3ad64e34b1ac872018ef (patch) | |
tree | 2753fb3912c07d23f3e2f622c05043f55c8f24c9 /test/parser | |
parent | 5444648fe1ff9b79f3db5ee6feadd51341f59d71 (diff) | |
download | talos-petitboot-45e92aa32a80fdbbf5ad3ad64e34b1ac872018ef.tar.gz talos-petitboot-45e92aa32a80fdbbf5ad3ad64e34b1ac872018ef.zip |
parsers: dynamically register parsers
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>
Diffstat (limited to 'test/parser')
-rw-r--r-- | test/parser/Makefile.am | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/parser/Makefile.am b/test/parser/Makefile.am index d90c368..7360926 100644 --- a/test/parser/Makefile.am +++ b/test/parser/Makefile.am @@ -23,7 +23,7 @@ AM_CFLAGS = \ common_libs = \ $(top_builddir)/lib/libpbcore.la \ - $(top_builddir)/discover/libparser.la + $(top_builddir)/discover/libparser.o noinst_PROGRAMS = parser-test |