uCdot
search uCdot:
 
Embedded Linux and uClinux Developer Forum
 
uCdot
- FAQ
- Dev Boards
- Submit Story
- Submit FAQ
- Submit Dev Board
- Topics
- Authors
- About

- Preferences
- Older Stuff
- Past Polls
- Discussions
- Journals
- Messages

Embedded Linux
Mailing Lists
uClinux-dev (search)
Coldfire (search)
MTD
Microblaze (search)
ELUG
BDM-devel
Blackfin

Embedded Linux
Sites
uClinux.org
uClinux-Dist
uClibc
uClinux Directory
LinuxDevices
ARMulator
uClinux-elf-tools
Colilo
Kernel Archives
H8-uClinux
TLDP
Microblaze uClinux
BDM Tools
SkyEye (emulator)
LOM
SETR live CD
Blackfin uClinux

Embedded Linux
Companies
SecureComputing
SDCS
CodePoet
Arcturus
Cadenux
ARMtwister
uClinux.net
Xiptech
senTec
embedded^cl
Cwlinux
emlix
TimeSys
eSpark Infotech
SSV Embedded Systems
Embedded Minds
PeerSec Networks
Vortech Consulting
swissEmbedded
Synertronixx
Mbedthis Software
.vantronix
Aday
GraceLabs
Pengutronix
metux ITS
Codito Technologies
Firmix Software
PetaLogix
NuDesign
Merritt Technologies
WindRiver
OpenGear
Rubico
Analog Devices
Artila Electronics
Vyatta
Embest Info&Tech
Katalix Systems
WorkWare Systems
Kdev
Intellimetrix
Virtual Cogs
SYSGO
coresystems
ExactCODE
KOAN
EzHomeTech
Linux4biz
Linkodas
Trego
EMBEST
Boardcon
HITEG
FemtoLinux
Prosoft World
Witech

 
What causes 'BINFMT_FLAT: bad magic/rev (0xZZ, need 0xYY)' errors
FAQ A lot of people encounter this error the first time they try to run a program on a uClinux system. Usually this is caused by trying to run an ELF or COFF executable rather than a "flat" executable. uClinux does not support anything but the "flat" executable format. ELF/COFF programs are converted to "flat" format using elf2flt/coff2flt respectively.
To fix this problem with the ELF toolchain add -Wl,-elf2flt to the final link line of your build and it will create a flat executable. For the COFF toolchain there is some excellent feedback by jeff included in the followup comments to this story.

uClinux-2.5.35-uc0 released | uClinux-2.5.36-uc0 released  >

 

 
uCdot Login
Nickname:

Password:

[ Create a new account ]

Related Links
  • uClinux
  • jeff
  • comments
  • More on FAQ
  • Also by davidm
  • This discussion has been archived. No new comments can be posted.
    What causes 'BINFMT_FLAT: bad magic/rev (0xZZ, need 0xYY)' errors | Login/Create an Account | Top | 2 comments | Search Discussion
    Threshold:
    The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
    bFLT file format (Score:2, Informative)
    by steve on Tuesday September 17, @07:19AM (#49)
    User #86 Info | http://www.labyrinth.net.au/~steve
    A nice explanation of the bFLT file format can be found here: http://www.beyondlogic.org/uClinux/bflt.htm
    [ Parent ]
    COFF toolchains don't require special linking (Score:2, Insightful)
    by jeff on Tuesday September 17, @10:10AM (#50)
    User #19 Info
    The old 68k COFF toolchains didn't need anything
    special on the link line (or any extra processing)
    to make bFLT executables. Everything was done
    on in the ld wrapper script.

    The trick is sort of a side effect of having a
    seperate toolchain for position independant
    code and one for flat code. Since fixed position
    code (like bootloaders or kernels) are linked with
    m68k-coff-ld and bFLT executables are linked with
    m68k-pic-coff-ld, it's fine to have it's default
    behaviour be to generate bFLT. On the other hand,
    the newer ELF toolchains use (for instance)
    m68k-elf-ld for fixed, PIC and relocated, a
    flag is used to specifiy behaviour.
    [ Parent ]

    The Embedded Linux and uClinux Developer Forum is hosted by: SnapGear A celebrity is a person who is known for his well-knownness.

    [ home | contribute story | older articles | past polls | faq | authors | preferences ]