In article <20170531132310.gf3...@homeworld.netbsd.org>, Emmanuel Dreyfus <m...@netbsd.org> wrote: >Hello > >Binaries from src/external/bsd/dhcp cannot be easily folded into a >crunchgen(1) binary, because libdhcp.a uses callbacks with the same >function names for dhclient, dhcrealy, dhcpd, and omshell. > >The offending symbols are classify, check_collection, dhcp, dhcpv6, bootp, >find_class, parse_allow_deny, and dhcp_set_control_state, > >Below is a patch that change each program to define and register an >array of callbacks at main() start, that lets libdhcp.a to callback >using registered pointers, and the programs can now go through crunchgen(1). > >I know DHCP is 3rd party software. I would appreciate opinions on the >approach before submitting upsream.
Yes, looks like this is a good way to do it. christos