[CFR] mge driver / elf reloc

Poul-Henning Kamp phk at phk.freebsd.dk
Mon Jul 21 20:11:48 UTC 2014


In message <20140722041517.M3229 at besplex.bde.org>, Bruce Evans writes:

>This seems to make most of byteorder(9) a mistake.  Just about everything
>can be done better using memcpy() and standard functions in byteorder(3),

Covered by Bruce' "just about" is that code analysers like Coverity
and FlexeLint cannot see through his proposed version of the macros
on little-endian architectures because of the inline assembler used
to access the exchange instructions which the C-compiler do not expose.

Analysers have no such problems with the pure-C versions there today.

The real fault is with the ISO-C people who still lives in a world
where endianess doesn't exist.

If they had done their job sensibly, variables, including members
of structs, could be declared as having a specific storage-layout.

My theory is that they confident the PDP-10 and CRAY-1 are just
about to make a comeback...

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.


More information about the freebsd-arm mailing list