waf: Post-process object file

Sebastian Huber sebastian.huber at embedded-brains.de
Wed Nov 11 07:42:47 UTC 2015



On 11/11/15 08:33, Chris Johns wrote:
> On 10/11/2015 8:35 pm, Sebastian Huber wrote:
>> >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?
>> >
> Is this per object file or after the library has been made?

The library contains kernel and user space objects, so this is per 
object (kernel space objects).

-- 
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