Adding .S file to Linux kernel code

I am trying to add a new assembly file (.S) to the Linux kernel. This might be a dumb question, but I can't find how and where to add such files to make files. I looked at the code samples of the current .S files, but I can not find where they are collected and associated with the vmlinux binary.

Any hints will be tested.

Thank!

+3
source share
3 answers

Just add the appropriate result .oto some rule. There are implicit rules for translating .S.o.

+3
source

look

arch/i386/boot

and he included the makefile.

, - . , " ".

"asm" .c?

, , , ​​ . , - - asm .c.

+1

- ? , arch/x86/kernel/entry_32.S.

, , .S. , , C asm.

The real question you should ask is: "I'm trying to do this ... I'm thinking of adding a .S file, what do you guys think?"

-1
source

Source: https://habr.com/ru/post/1775856/


All Articles