The difference between arm-linux-gcc .s and .S !

Publisher:TranquilSoulLatest update time:2024-08-05 Source: cnblogsKeywords:arm-linux-gcc  and Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Unix/Linux is case sensitive:

.s Operation: Assembly

.S operation: cpp + assembly

eg:

/* start.s */

#define rTEXT 0x12345678

LDR R0,=rTEXT

....

# arm-linux-gcc -g -c -nostdlib start.s -o start.o

# nm -u start.o

rTEXT

# arm-linux-objdump -S -t start.o > start.l

# cat start.i | grep ''R0"

LDR R0,【PC,#0】

Classic mistake:

arm-linux-gcc mistakenly treats the .s file as a file processed by cpp (file type is not ignored), so it regards rTEXT as a label. When arm-linux-ld reports undefined reference ....

Just rename .s to .S!!

# mv start.s start.S

# .....

You can


Keywords:arm-linux-gcc  and Reference address:The difference between arm-linux-gcc .s and .S !

Previous article:undefined reference to `__aeabi_uidivmod'、 `__aeabi_uidiv'
Next article:Wiring Analysis of S3C2440 and NOR FLASH (AM29LV160DB)

Recommended ReadingLatest update time:2024-11-16 11:40

S3C2410 Clock & Power Management Unit
The clock & power management block consists of three parts: clock control, USB clk control, and power control. Clock control logic  The Clock control logic in S3C2410X can generate the required clock signals including FCLK for CPU, HCLK for the AHB bus peripherals, and PCLK for the APB bus peripherals.  The
[Microcontroller]
S3C2410 Clock & Power Management Unit
S7-1200 CPU and S7-200 SMART S7 communication
S7-1200 CPU communicates with S7-200 SMART S7 (S7-1200 as server) For S7-200 SMART CPU firmware version V2.0 and above, the integrated PROFINET communication interface supports S7 communication, which can be achieved through the wizard or using GET/PUT instructions. Up to 16 S7 connections can be established, i
[Embedded]
S7-1200 CPU and S7-200 SMART S7 communication
Introduction to porting standard Linux to S3C2410
1 Introduction At present, embedded processors based on ARM core have become the mainstream in the embedded system market. With the widespread application of ARM technology, the establishment of embedded operating systems for ARM architecture has become a hot topic in current research. S3C2410 is a 16/32-bit embedded
[Microcontroller]
s3c2440 ARM9 bare metal driver part 2 - 2440 system clock
1. Hardware: 1. Clock Tree: The system clock of 2440 is set by MPLL and UPLL. MPLL is used to set FCLK, HCLK, PLCK. UPLL is mainly used for USB. FCLK is used for the CPU core, HCLK is used for the AHB bus, and PCLK is used for the APB bus. 2. Register: For 2440, there are the following registers LOCKTIME,
[Microcontroller]
s3c2440 ARM9 bare metal driver part 2 - 2440 system clock
Huawei Nova 5T appears with Android Enterprise Edition interface and may be launched in Thailand
Earlier, there was news that the Honor 20 sold overseas will be listed under the name "Huawei Nova 5T" and is expected to be sold first in Thailand. Currently, Huawei Nova 5T has appeared in the Android Enterprise recommended device list. According to the above picture, Huawei Nova 5T is expected to adopt a punch-ho
[Mobile phone portable]
Huawei Nova 5T appears with Android Enterprise Edition interface and may be launched in Thailand
ARM-LINUX-GCC setting environment variables
Add the storage path of arm-linux-gcc in /etc/profile Specifically, enter #sudo gedit /etc/profile in the command line and press Enter export PATH=$PATH:/the path where your arm-linux-gcc is stored Save and exit export PATH=/usr/local/arm/bin   Note that it is best to use export PATH=$PATH:/usr/local/arm/4.3.2
[Microcontroller]
STM8s103F3p 16-bit timer STM2
/************************************************************************************ /* MAIN.C file  *   * Copyright (c) 2002-2005 STMicroelectronics  */ //16-bit timer 2 interrupt mode //The period is 50ms #include "stm8s103f.h" main() {  //Port initialization  PD_DDR=0x0f;  PD_CR1=0x0f;  PD_CR2=0x00;  PD_ODR=0x
[Microcontroller]
Application of large capacity NAND Flash TC58DVG02A1FT00 in embedded systems
1 NAND and NOR flash The flash on the market can be roughly divided into AND, NAND, NOR and DiNOR in terms of structure. Among them, NOR and DiNOR are characterized by low relative voltage, fast random read, low power consumption and high stability, while NAND and AND are characterized by large capacity, fast write-
[Microcontroller]
Application of large capacity NAND Flash TC58DVG02A1FT00 in embedded systems
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号