[En-Nut-Discussion] IP Checksum calculation broken. Reenabled old algorithm for the meantime.

Ole Reinhardt ole.reinhardt at embedded-it.de
Fri Jul 6 14:16:39 CEST 2012


Hi Harald,

> > architecture could overwrite it with it's own code supplied in the emac
> > driver file? Or is this a gcc specific extension?
> 
> As far as I know, weak declarations are not language, but linker
> specific. Furthermore, the __attribute__ keyword is GCC specific.

> Anyway, I do not have any problems with toolchain specific declarations
> in general. As long as you can make sure, that the code will still
> compile and link with other C89 tools. In its most simple form:

Good point, but this might raise a linker problem with non-GNU linkers,
if we add an architecture specific NutIpChkSumPartial() which would then
be defined twice. 

A simple way to avoid this would be to define an architecture specific
implementation for GNUC only as well.

Bye,

Ole

-- 

Thermotemp GmbH, Embedded-IT

Embedded Hard-/ Software and Open Source Development, 
Integration and Consulting

http://www.embedded-it.de

Geschäftsstelle Siegen - Steinstraße 67 - D-57072 Siegen - 
tel +49 (0)271 5513597, +49 (0)271-73681 - fax +49 (0)271 736 97

Hauptsitz - Hademarscher Weg 7 - 13503 Berlin
Tel +49 (0)30 4315205 - Fax +49 (0)30 43665002
Geschäftsführer: Jörg Friedrichs, Ole Reinhardt
Handelsregister Berlin Charlottenburg HRB 45978 UstID DE 156329280 




More information about the En-Nut-Discussion mailing list