什么是.S文件? [英] What are .S files?

查看:1895
本文介绍了什么是.S文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在各种项目中都看到过.S文件,例如Linux内核,FreeBSD内核或其他一些项目中.这些文件是做什么的,为什么我们不能拥有.c文件?

I've seen .S files in various projects such as in the Linux Kernel, FreeBSD kernel, or in some other projects. What do these files do and why can't we have .c files instead ?

推荐答案

.S文件是用汇编语言编写的源代码文件.汇编是一种非常底层的编程形式.这些文件包含按顺序发送给处理器的汇编指令,并且通常基于选定的体系结构进行编译.在Linux内核中通常会看到此类文件的示例,以用于特定的体系结构,例如x86,sparc,ARM等.

.S files are source code files written in assembly. Assembly is an extremely low-level form of programming. The files contain assembly instructions to the processor in sequential order and are typically compiled based on a selected architecture. Examples of such files are often seen in the linux kernel for specific architectures, e.g. x86, sparc, ARM, etc.

有关汇编语言的更多信息:

For more information about assembly language:

  • X86 Assembly/GAS syntax
  • x86 Instruction list
  • TLDP Linux Assembly Howto
  • Example in the Linux kernel: arch/x86/net/bpf_jit.S

这篇关于什么是.S文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆