- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我打算在我的 x86_64 系统中编译 linux 内核 2.4.32。
make dep 没问题,但是 make bzImage 在显示大量如下链接错误后停止:
ld -m elf_x86_64 -e stext -r -o kernel.o sched.o dma.o fork.o exec_domain.o panic.o printk.o module.o exit.o itimer.o info.o time.o softirq.o resource.o sysctl.o acct.o capability.o ptrace.o timer.o user.o signal.o sys.o kmod.o context.o ksyms.o pm.o
dma.o: In function `set_64bit':
dma.c:(.text+0x0): multiple definition of `set_64bit'
sched.o:sched.c:(.text+0x1b): first defined here
dma.o: In function `get_order':
dma.c:(.text+0x4): multiple definition of `get_order'
sched.o:sched.c:(.text+0x0): first defined here
dma.o: In function `read_lock':
dma.c:(.text+0x1a): multiple definition of `read_lock'
sched.o:sched.c:(.text+0x9c): first defined here
dma.o: In function `cpuid':
dma.c:(.text+0xc9): multiple definition of `cpuid'
sched.o:sched.c:(.text+0x24): first defined here
dma.o: In function `cpuid_eax':
dma.c:(.text+0xe1): multiple definition of `cpuid_eax'
sched.o:sched.c:(.text+0x41): first defined here
dma.o: In function `cpuid_ebx':
dma.c:(.text+0xe8): multiple definition of `cpuid_ebx'
sched.o:sched.c:(.text+0x4d): first defined here
dma.o: In function `cpuid_ecx':
dma.c:(.text+0xf1): multiple definition of `cpuid_ecx'
sched.o:sched.c:(.text+0x5b): first defined here
dma.o: In function `cpuid_edx':
dma.c:(.text+0xfa): multiple definition of `cpuid_edx'
sched.o:sched.c:(.text+0x69): first defined here
dma.o: In function `thread_saved_pc':
dma.c:(.text+0x103): multiple definition of `thread_saved_pc'
sched.o:sched.c:(.text+0x77): first defined here
dma.o: In function `rep_nop':
dma.c:(.text+0x10c): multiple definition of `rep_nop'
sched.o:sched.c:(.text+0x85): first defined here
dma.o: In function `sync_core':
dma.c:(.text+0x10f): multiple definition of `sync_core'
sched.o:sched.c:(.text+0x8d): first defined here
在kernel2.4.32/include目录中有很多asm目录,每个目录都属于一个特定的体系结构(例如asm-i386、asm-x86_64、asm-a64 )
并且有一个asm目录链接到asm-x86_64目录(因为我的系统架构)
当我从 asm 和 asm-x86_64 这两个目录之一中删除具有多个定义的函数(如错误列表中的 set_64bit)时,错误将消失。
makefile或config文件有问题吗?为什么这些函数会编译多次??!
请帮助我...
最佳答案
问题是由于@Tsyvarev 已被正确提及而导致头文件中的函数定义打印错误。
必须将这些有问题的函数定义从 extern inline
更改为 static inline
。
关于 I/O 的函数定义,如 inb, inw, inl, outb, outw, outl....
必须在 linux2.4.32/include/asm 中更改/io.h
文件,其中这些函数被定义为带有 extern
关键字的宏!
关于c - linux kernel 2.4.32编译中大量函数的多重定义,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38682170/
我需要从 kernel/system/do_kill.c (Minix) 将一些信息写入我的特殊日志文件(例如,/home/log.txt) . 我已经尝试过: int filedesc; filed
我正在经历 Uboot 和内核启动过程。 FDT(平面设备树)到底有什么用? 我读过的许多链接都指出,uboot 以 FDT 的形式将板和 SOC 配置信息传递给内核 https://wiki.fre
我的操作系统是Fedora 17。最近,出现内核污染警告“kernel bug at kernel/auditsc.c:1772!-abrt”:不应报告此问题(这可能是一个已知问题)。发生内核问题,但
为 Linux 编译内核模块的教程,使用不同的 Makefile 语法。 Example 1 obj-m += rpi-pwm.o Example 2 obj-m := nothing.o 有什么区别
我正在浏览 Linux 网络设备驱动程序代码,想知道是否可以从驱动程序代码中调用设备层代码。 --- a/drivers/net/ethernet/realtek/8139too.c +++ b/dr
出于工具目的,我尝试附加到 kprobe 事件,但我对 kprobe 事件不太熟悉。我读到注册的 kprobes 列表可以在 /sys/kernel/debug/kprobes/list 中找到,但是
我在其他地方使用 LinK+ 来开发 linux 内核模块。我的开发机器安装了 Linux Mint 18 操作系统,内核版本为 4.4.xx。为了进行测试,我想将内核模块部署到内核版本为 3.16.
我正在玩弄 Android Linux 内核。内核是P970 V30B内核。可用here .我想找出特定的 cmdline 参数到底做了什么。 我知道它是命令行参数,其中有一个参数我找不到它到底做了什
是否可以将 PTE 指向不同的物理页面? 假设我目前在某个进程 A 的上下文中处于内核模式,该进程当前将地址 400k 映射到物理页号。 5. 我可以将该地址 (400k) 映射到物理页号吗? 6 ?
我正在开发一个要在路由器上运行的内核模块。路由器型号为 Netgear 的 DGN2200v2。它在 MIPS 上运行 Linux 2.6.30。我的问题是,当我加载我的模块时,似乎我的 module
关闭。这个问题不符合 Stack Overflow guidelines 。它目前不接受答案。 想改进这个问题?更新问题,使其成为 Stack Overflow 的 on-topic。 6年前关闭。
在大型网格中执行的任务调用两个内核有区别吗 1. for(int i=0;i>>(MatrixA,MatrixB) } 2. dim3 dimBlock(16, 16); dim3 dimGrid(1
在 Linux 中,我生成了一个猜测 VM 并加载了另一个 Linux 实例。 VM 是通过 KVM/libvirt/qemu 生成的。 guest VM 被主机内核视为一个进程。让我们说由于某种原因
我想知道如何设置正确 MACH_TYPE或 arch_id对于内核。我搜索并找到了至少 2 个引用,其中内核会卡在“启动内核...”处。这些都给出了相同的答案。正确设置您的机器类型。但后来都没有提到如
kernel data inpage error蓝屏是一个不常见的问题,一般都是更新失败或者第三方软件冲突导致的,解决方法也非常简单,需要先安全模式进入系统,下面来看看详细的教程吧。 kern
当我用 app/console cache:clear 清除缓存时我收到错误: [Symfony\Component\DependencyInjection\Exception\ParameterNo
我正在玩 Raspberry 3,并尝试使用 U-Boot 启动 Linux 内核。 我构建了一个 Linux 内核(来自 github.com/raspberrypi)和 Busbox-Userla
关闭。这个问题是not reproducible or was caused by typos .它目前不接受答案。 这个问题是由于错别字或无法再重现的问题引起的。虽然类似的问题可能是on-topi
长话短说,我一直在做一个项目,当我使用时我注意到: 1.9.3p392 :001 > `gzip` IRB::Abort: abort then interrupt! from (irb):1
我有一个服务,我在其中注入(inject) TokenStorage 并想要获取当前用户。 /** * * @Service("liip_theme.theme_request_listener"
我是一名优秀的程序员,十分优秀!