[ntp:questions] Re: cross compiling ntp-4.2.0: ./ntpdc-layout: cannot execute binary file

Maciej W. Rozycki macro at ds2.pg.gda.pl
Sat Jan 24 03:04:28 UTC 2004


On Sat, 24 Jan 2004, Harlan Stenn wrote:

> It would be best to generate the structure layout using the --host stuff,
> and then build the result using the --build stuff so we can make sure
> the layout is correct.  I don't know how to do that (and I don't have the
> time to look at it now).

 Well, as you want to test for such things as unwanted padding it's really
impossible to do that this way.  If you want to check of the layout of a
struct as emitted by the host compiler on the build system, the only way,
AFAIK, is to exploit compile-time range checks, just like autoconf does
for AC_CHECK_SIZEOF.  You cannot run the created binary and if you build
it with a native compiler for the build system instead, then the layout
may differ.

  Maciej

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: macro at ds2.pg.gda.pl, PGP key available        +



More information about the questions mailing list