waf: Post-process object file

Sebastian Huber sebastian.huber at embedded-brains.de
Tue Nov 10 09:35:07 UTC 2015


Hello,

for the libbsd we have the problem that we expose a lot of symbols from 
the FreeBSD kernel space to the applications. There are several known 
conflicts, e.g. FreeBSD log() vs. standard math library log(). The 
current approach to solve this issue is to generate a file with lots of

#define xx _bsd_xx
...

defines to rename at C pre-processor level. This is however quite 
brittle and doesn't work in general. An alternative would be to 
post-process the kernel-space object files with something like this

objcopy --redefine-syms redefines.txt x.o

with a redefines.txt

xx=_bsd_xx
...

My question is now: how can I add this post-processing step to the waf 
based libbsd build system?

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.



More information about the devel mailing list