[uClinux-dev] file(1) bflt entry

Greg Ungerer gerg at snapgear.com
Thu Mar 27 18:29:27 EST 2003


Hi Philippe,

Philippe De Muyter wrote:
>>Jivin Philippe De Muyter lays it down ...
>>
>>>>>68    belong          0x4e714e71      m68k,
> 
> 
> I wonder why with the latest elf-tools, crt0 begins at 68 decimal and is
> preceded by four 0 bytes, while with some ancient version of the elf-tools
> (I do not know precisely which one) crt0 started at 64 decimal, i.e. just
> after the header.  Is that change intentional ? (we consume 4 bytes more
> per executable :) ).

That is an intentional change. It has to do with constructors/
destructors table and c++. To find out why read the comments
in uClinux-2.4.x/fs/binfmt_flat.c around line 756...


>>># I do not know what the other magic values and platforms are (arm e.g.)
> 
> 
> If people using other processors (arm e.g.) could tell me what's found at
> 64 or 68 decimal (if it is constant of course), I could add that to
> recognize that processor too.

I would be a little hesitant to rely on the first few bytes
of code to recognize the processor type though. Although it
doesn't change often, it could still change.

Regards
Greg



------------------------------------------------------------------------
Greg Ungerer  --  Chief Software Wizard        EMAIL:  gerg at snapgear.com
SnapGear Pty Ltd                               PHONE:    +61 7 3435 2888
825 Stanley St,                                  FAX:    +61 7 3891 3630
Woolloongabba, QLD, 4102, Australia              WEB:   www.SnapGear.com




More information about the uClinux-dev mailing list