Find the answer to your Linux question:
Results 1 to 3 of 3
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    cross compilation error -- /usr/local/bin/ld: unrecognized option '--as-needed'

    i am tried to compile bootloader(blob)source code for arm processor in i386 machine.I followed the steps given in the readme file. but it shows an error message like -- "/usr/local/bin/ld: unrecognized option '--as-needed".I compiled in rhel4 machine and the readme file tells the steps in fedora it make any problem??

    Also i have another serious problem in my machine that it is not possible to RUN the normal c programs.I got an error messages-- bash: ./hello: cannot execute binary file.--

    how can i overcome this???

    with regards

  2. #2
    Linux Engineer rcgreen's Avatar
    Join Date
    May 2006
    the hills
    bash: ./hello: cannot execute binary file.--
    My experience is that you get this error when the file
    is not a proper elf executable. You are compiling
    normal C code in the normal way? Are you giving the
    compiler some weird options?

    If you cannot compile and run a trivial "hello" program,
    you may need to reinstall the compiler.

  3. #3
    /usr/local/bin/ld: unrecognized option '--as-needed"
    You will need a cross-compiler ... the line above get me suspicion that
    you use host's linker.

    bash: ./hello: cannot execute binary file.--
    Do you have the executable flag set on that file?


  4. $spacer_open

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts