git: rtld: Add two special directives to libmap.conf
marino at crater.dragonflybsd.org
Sat May 5 00:34:16 PDT 2012
Author: John Marino <draco at marino.st>
Date: Fri May 4 18:54:27 2012 +0200
rtld: Add two special directives to libmap.conf
Parse the contents of file before continuing with the current file.
Parse the contents of every file in dir that ends in .conf before
continuing with the current file.
Any file or directory encountered while processing include or includedir
directives will be parsed exactly once, even if it is encountered multiple
Taken from FreeBSD SVN 234851 (30 APR 2012) with modification:
1) DragonFly realpath works differently than FreeBSD's and doesn't
accept a null value for the resolved_path argument.
2) FreeBSD's debug lines reflect the wrong function, lm_init, instead
of lmc_parse_file. lmc_parse_dir also calls lmc_parse_file, so
the debug message is definitely wrong and was corrected.
3) FreeBSD keeps using path even after determining realpath and putting
the result in the rpath variable. It uses path for debug messages
and opening a file descriptor. DragonFly doesn't use path again and
only uses rpath after it is determined.
4) FreeBSD's lmc_parse_file code had a bug in the linked list used to
track which conf files had already been parsed. Memory for the
filename was allocated so it wouldn't get overwritten after multiple
passes, which is standard for the includedir functionality.
Summary of changes:
libexec/rtld-elf/libmap.c | 161 ++++++++++++++++++++++++++++++++++-------
share/man/man5/libmap.conf.5 | 25 ++++++-
2 files changed, 156 insertions(+), 30 deletions(-)
DragonFly BSD source repository
More information about the Commits