Fedora compiles vivi's **-linux-as: unrecognizedoption '-_ ASSEMBLY _'

Source: Internet
Author: User
One, the compilation environment: gcc-2.95.3; FedoraCore9; vivi-0.1.4 (with network) Two, error Description: when compiling VIVI, error prompt: "/opt/host/armv4l/bin/armv4l-unknown-linux-as-D _ ASSEMBLY__-I/home/echokuki/s3c2410/Experimentbck/Bootloaderv1/Bootloader/I A, compiling environment: gcc-2.95.3; Fedora Core 9; vivi-0.1.4 (with Web)

2. Error description:
When compiling VIVI, the following error occurs:
"
/Opt/host/armv4l/bin/armv4l-unknown-linux-as-d1_assembly _-I/home/echokuki/s3c2410/Experimentbck/Bootloaderv1/Bootloader/include-I/opt/host/armv4l/include /-mapcs-32-march = armv4-msoft-float-o arch/s3c2410/head. o arch/s3c2410/head. s
/Opt/host/armv4l/bin/armv4l-unknown-linux-as: unrecognized option '-_ ASSEMBLY __'
Make: *** [arch/s3c2410/head. o] Error 1
"
As a result, the target file cannot be generated.


Iii. References:
"

1. Introduction to GNU

Gnu as is a GNU assembler that converts assembly code into binary code and stores it in an object file. The gnu as tool is easy to use. For more information, see Using as -- the GNU Explorer (2.14 ). First, let's take a look at 1.1 Structure of this Manual.

This manual is intended to describe what you need to know to use gnu. we cover the syntax expected in source files, including notation for symbols, constants, and expressions; the directives that as understands; and of course how to invoke.

This manual also describes some of the machine-dependent features of varous flavors of the specified er.

On the other hand, this manual is not intended as an introduction to programming in assembly language-let alone programming in general! In a similar vein, we make no attempt to introduce the machine architecture; we do not describe the instruction set, standard mnemonics, registers or addressing modes that are standard to a particle architecture. you may want to consult the manufacturer's machine architecture manual for this information.


This manual describes how to use gnu as, including the syntax (symbol, constant, expression) used in source code files, as-recognized commands, and how to call.
This Manual also describes some machine-dependent features supported by the as assembler.
In addition, this manual does not describe how to compile assembler programs. In the same way, we will not try to introduce the machine architecture, nor describe the machine instruction set, standard registers or addressing modes for a specific architecture. For more information, see the vendor's machine architecture manual.

From the above description, we can see that this document only describes how to use the compiler as and does not teach you how to compile assembler programs. It turns out that there are still doubts in instruction and directive. Now we can differentiate them. Memory cution is related to the CPU architecture. For example, the ARM architecture includes the instruction set architecture. The instruction set is instruction set. Directive is related to the assembler. That is to say, to better use the assembly language for programming, the assembler adds some instructions to improve readability. This part of the instructions is directive. Different instruction set architectures have different instruction values, for example, the instruction values of ARM and X86 are different, and the direve ve values of different compilers are also different. For example, the direve ve values of gnu as and ADS compilers are different.

2. command line options

You can check it as needed.

Syntax 3

1. Preprocessing


The as internal preprocessor:
· Adjusts and removes extra whitespace. It leaves one space or tab before the keywords on a line, and turns any other whitespace on the line into a single space.
• Removes all comments, replacing them with a single space, or an appropriate number of newlines.
• Converts character constants into the appropriate numeric values.

The internal preprocessing of as mainly involves three aspects. First, adjust and remove additional separators. Retain a space or TAB before the keywords of each line. Any other separators are converted to a space. The second is to remove all comments and replace them with a space or a suitable number for a new line. The third is to convert character constants into corresponding numeric values.

It cannot be used for macro processing or file inclusion processing. If you need to use it, you can submit it to the C Preprocessor for processing. The file inclusion format to be processed by CPP is different. You need to use # include, which is the same AS that of C (. include in ). So how does CPP identify such a file? The answer is via a suffix. Man gcc can obtain,

File. s
Assembler code.

File. S
Extends er code which must be preprocessed.

"
Iv. Conclusion
That is why the extension of [arch/s3c2410/head. S] In vivi is a capital letter S instead of a lowercase letter s. The reference of vivi's configuration mechanism is completed through # include "config. h", and its processing is done through CPP.

5. Solution
Rename arch/s3c2410/head. s to arch/sc32410/head. S. Command: "# mv arch/s3c2410/head. s arch/s3c2410. S ".

If any error occurs, please correct it. Thank you.

Disclaimer: This article only represents the author's personal opinion and has nothing to do with the Linux community. Its originality, as well as the statement text and content in this article have not been confirmed by this site, this article and all or part of the content, the authenticity, integrity, timeliness of this site do not make any warranty or commitment, for your reference only, please verify the relevant content on your own.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.