Date: Mon, 5 Jan 2009 00:42:38 +0100 From: Luigi Rizzo <rizzo@iet.unipi.it> To: current@freebsd.org Subject: upcoming elfdump refactoring Message-ID: <20090104234238.GA44381@onelab2.iet.unipi.it>
next in thread | raw e-mail | index | archive | help
I need to extract value and size of some symbols from an ELF file,
and make them available to a C program, something like
nm -S /boot/kernel/kernel | grep -E "(kernload|kernbase|uscanner_devs)"
Rather than using the above tools plus popen() and some parsing code,
I have refactored src/usr.bin/elfdump/elfdump.c ,
making the main routine externally callable, returning the
desired info in a struct rather than print them out.
I don't know if/how other programs might need to call elfdump(),
but given that the changes I made have no functional or performance
drawback, I would like to commit them to the tree.
Objections ?
(note, the diff will be large because in the process I also removed
global variables and staticize/constify things)
cheers
luigi
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090104234238.GA44381>
