gEDA-dev: [PCB] feautre request: -rdynamic

Igor2 igor2 at inno.bme.hu
Sat Sep 30 16:00:41 EDT 2006


On Sat, 30 Sep 2006, DJ Delorie wrote:

>
>> Thank you very much :)
>
>Now I'm working on auto-loading HIDs.  What do you use for a startup
>function to register your hids?

I hook fopen() from a loader lib injected using LD_PRELOAD. Originally I
hooked strrchr(), but it turned out that some systems have strrchr() as
macros.

If you plan to add native support in PCB so one doesn't need to use such
hacks, I think the simplest way would be to acquire the HID names from a
file and/or command line arguments and just load them using dlopen() and
call an init function. The init function then can call back
hid_register_hid() and co.




More information about the geda-dev mailing list