[erlang-questions] BIF or NIF for extending Erlang on OS which can't dynamic link

Jachym Holecek freza@REDACTED
Fri May 4 10:14:20 CEST 2012


# Peer Stritzinger 2012-05-03:
> I'm currently porting Erlang to RTEMS a small embedded OS that can't
> dynamic link.
> 
> If I want to extend Erlang with functionality written in C (e.g. for
> accessing hardware or RTEMS features) I always have to statically link
> this code to the Erlang + RTEMS image -- the OS is just a executive
> which is linked as a lib to Erlang which together boots directly on
> the hardware.
> 
> If I want to use NIFs or linked drivers there is always some dynamic
> linking going on which fails for me since there is no dlopen etc.
> functionality in the basic RTEMS system.

I thought one can have linked-in drivers linked statically during BEAM
compilation? Searching for 'driver_tab' in erts/emulator/Makefile.in
should be a good start.

HTH,
	-- Jachym



More information about the erlang-questions mailing list