内核2.6.22.6编译出现 undefined reference to
昨天重下午开始到晚上2点多都没有解决这个问题,今天一大早 起来又开始弄,总算在这个时候吧这个问题解决了 首先谈一下我的内核是2.6.22.6 编译器的版本是GCC-4.8 按照别人的教程。先 #make oldconfig 在#make 但是在此时出现了如下的问题: (注:提图片是
昨天重下午开始到晚上2点多都没有解决这个问题,今天一大早 起来又开始弄,总算在这个时候吧这个问题解决了
首先谈一下我的内核是2.6.22.6 编译器的版本是GCC-4.8
按照别人的教程。先 #make oldconfig 在#make 但是在此时出现了如下的问题:
(注:提图片是网上截图完成,并不代表所有的linux内核编译)
在着了我是想告诉大家,我的问题是怎么解决的,你看到图片的第二行有个说明是:kernel/built—in.o:in function 'mutex_lock'
在这句话里面,那你可以发现,你的函数mutex_lock很有可能在kernel某个函数文件里面,我们现在试着进去kernel/去找找看有没有
关于mutex_lock的函数文件
你会看到在kernel目下确实有几个关于muxtex的文件,这个时候我们只需要打开一个相关的文件分别查看一下,就知道了
很显然我们会打开mutex.c,用Vim打开,你会看到有关的编译错误出现的函数
看到这里你会不会感到十分惊喜,因为你解决问题只有一步之遥了,看到我在图片上的红圈没,那个是我自己加上去了,
你在编译出错时,当你打开此文件时,是没有这个__used的,在这个文件里面,一共有三处地方要改动,那就你自己去改吧,
当你看到 __mutex_unlock_slowpath();这个函数是,同样也要在这个函数前面加上__used
至于为啥要加上__used 请百度或者Google

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

When programming in C++, we often encounter the problem of undeclared identifiers. This usually occurs when undefined variables, functions, or classes are used, causing the compiler to fail to recognize these identifiers, resulting in compilation errors. This article describes common causes of undeclared identifier problems and how to resolve them. Common Causes Undeclared identifier problems usually arise from the following reasons: Variables, functions, or classes are not declared correctly: You should declare variables, functions, or classes before using them. If the variable is not declared or function

Reasons: 1. There are many versions of Linux, but each version uses different software or kernel versions, and the environment that the binary package depends on may not be able to run normally, so most software directly provides source code for compilation and installation. 2. Easy to customize to meet different needs. 3. Convenient for operation and maintenance and developer maintenance; source code can be packaged as binary, but packaging this software will require costly extra work, including maintenance, so if it is source code, the software manufacturer will maintain it directly.

To install the Linux kernel on Ubuntu22.04, you can follow the following steps: Update the system: First, make sure your Ubuntu system is the latest, execute the following command to update the system package: sudoaptupdatesudoaptupgrade Download the kernel file: Visit the official Linux kernel website () to download Required kernel version. Select a stable version and download the source code file (with .tar.gz or .tar.xz extension), for example: wget Unzip the file: Use the following command to unzip the downloaded kernel source code file: tar-xflinux-5.14.tar. xz install build dependencies: Install the tools and dependencies required to build the kernel. Execute

Java is a very popular programming language that is widely used to develop various types of software. In Java development, compilation and decompilation technology are very important links. Compilation technology is used to convert Java code into executable files, while decompilation technology allows one to convert executable files back into Java code. This article will introduce compilation and decompilation techniques in Java. 1. Compilation technology Compilation is the process of converting high-level language (such as Java) code into machine language. in Java

In recent years, Go language has become the choice of more and more developers. However, compared to other programming languages, the compilation speed of Go language is not fast enough. Many developers will encounter this problem when compiling Go programs: Why does my Go program take longer to compile? This article will explore this issue from several aspects. The compiler architecture of Go language The compiler architecture of Go language adopts a three-stage design, which are front-end, middle layer and back-end. The front-end is responsible for translating the source code into intermediate code in Go language, and the middle layer will

C++ compilation error: The function parameter list is too long, how to solve it? When writing programs in C++, you sometimes encounter such a compilation error: the function parameter list is too long. For C++ beginners, this may be a headache. Next, we’ll cover the causes and solutions to this problem. First, let's take a look at the basic rules of C++ function parameters. In C++, function parameters must be declared between the function name and the opening parenthesis. When you pass a function parameter, you tell the function what to do. These parameters can be any

When writing code in PHP, we may encounter the error message "Notice: Undefinedproperty". This error means that we are accessing an undefined property, usually because the property has not been initialized in the code. So, how to solve this problem? Here are a few possible solutions: Initialize properties This is the simplest way to solve this problem. Explicitly initializing a property in code ensures that it is defined before use. For example: class

Modify the kernel startup sequence of Linux 1. Modify the kernel startup sequence of RHEL6/CentOS6. Check the /etc/grub.conf file to determine the system kernel situation. According to the document, there are two kernel versions in the system, namely 2.6.32-573.18.1.el6.x86_64 and 2.6.32-431.23.3.el6.x86_64. Kernel versions are listed from top to bottom. In the grub.conf file, you can decide which kernel version to use when the system starts by adjusting the default parameters. The default value is 0, which means the system will boot the latest kernel version. A value of 0 corresponds to the first content listed in the grub.conf file.
