Is it possible to get the x86 assembly code for the entire Linux kernel?

-2

I want to see the x86-assembly of the Linux kernel and want to edit the kernel at assembly level. Is it possible to do so? If yes please help me to get the x86-assembly of the entire Linux kernel.

Prudhvi Gali

Posted 2019-03-30T22:07:10.173

Reputation: 1

Question was closed 2019-03-31T09:56:14.363

You want to edit uncommented computer generated assembly code. Do you understand how difficult that will be? – Ramhound – 2019-03-30T22:29:38.063

I don’t think it makes much sense what you plan to do („for the whole kernel“), but you can use gcc -S (to compile the C modules into assembly) or objdump --disassemble (to dump object modules content in assembly). – eckes – 2019-03-30T22:30:22.347

Answers

1

You are aware the source code to Linux is FOSS? The Linux kernel is not written in assembly. It is written in the C programming language supported by GCC. The source code is publicly available on GitHub here.

Keltari

Posted 2019-03-30T22:07:10.173

Reputation: 57 019

0

It depends on what you want. While it is technically possible, it is exceedingly impractical, especially for an extensively large program like the Linux kernel. The ASM will most likely be nearly non-human readable, worse than minified JS. If you need to make any modifications to the kernel in assembly, do it using an asm statement or the Linux kernel's asmlinkage utilities.

However, if you truly know what you are doing and are adamant about editing the ASM code, you can use a reverse engineering framework like radare2 or capstone

Aidan Williams

Posted 2019-03-30T22:07:10.173

Reputation: 11