[ipxe-devel] Is the definition of undi_loader as both procedure and object intended?

Michael Brown mcb30 at ipxe.org
Sun May 29 15:12:39 UTC 2016

On 29/05/16 16:00, Michael Tautschnig wrote:
> I have noticed that undi_loader is defined both as a struct as well as a
> procedure:
> src/arch/i386/drivers/net/undiload.c has
> static struct s_UNDI_LOADER __bss16 ( undi_loader );
> while src/arch/i386/include/pxe.h (also include from the above file) has:
> extern PXENV_EXIT_t undi_loader ( struct s_UNDI_LOADER *undi_loader );
> Presumably the compiler's name mangling (renaming the latter to, e.g.,
> _undi_loader) will ensure this works in practice. But is that the intended set
> up?

It's actually the __bss16() which happens to avoid a namespace 
collision.  It's not compiler-specific.


More information about the ipxe-devel mailing list