当前位置: 首页 > news >正文

网页设计制作音乐网站拉新推广怎么快速拉人

网页设计制作音乐网站,拉新推广怎么快速拉人,wordpress 页码插件,网站跳出率多少正常文章目录 前言模块的Hello World! 前言 Linux允许用户通过插入模块,实现干预内核的目的。一直以来,对linux的模块机制都不够清晰,因此本文对内核模块的加载机制进行简单地分析。 ref:https://www.cnblogs.com/fanzhidongyzby/p/…

文章目录

  • 前言
  • 模块的Hello World!


前言

Linux允许用户通过插入模块,实现干预内核的目的。一直以来,对linux的模块机制都不够清晰,因此本文对内核模块的加载机制进行简单地分析。

ref:https://www.cnblogs.com/fanzhidongyzby/p/3730131.html


模块的Hello World!

我们通过创建一个简单的模块进行测试。首先是源文件main.c和Makefile。
florian@florian-pc:~/module$ cat main.c

#include<linux/module.h>
#include<linux/init.h>static int __init init(void){printk("Hi module!\n");return 0;}static void __exit exit(void){printk("Bye module!\n");}module_init(init);module_exit(exit);

其中init为模块入口函数,在模块加载时被调用执行,exit为模块出口函数,在模块卸载被调用执行。
florian@florian-pc:~/module$ cat Makefile

obj-m += main.o#generate the pathCURRENT_PATH:=$(shell pwd)#the current kernel version numberLINUX_KERNEL:=$(shell uname -r)#the absolute pathLINUX_KERNEL_PATH:=/usr/src/linux-headers-$(LINUX_KERNEL)#complie objectall:make -C (LINUXKERNELPATH)M=(CURRENT_PATH) modules#cleanclean:make -C (LINUXKERNELPATH)M=(CURRENT_PATH) clean

其中,obj-m指定了目标文件的名称,文件名需要和源文件名相同(扩展名除外),以便于make自动推导。

然后使用make命令编译模块,得到模块文件main.ko。

florian@florian-pc:~/module$ make

make -C /usr/src/linux-headers-2.6.35-22-generic M=/home/florian/module modulesmake[1]: 正在进入目录 `/usr/src/linux-headers-2.6.35-22-generic'Building modules, stage 2.MODPOST 1 modulesmake[1]:正在离开目录 `/usr/src/linux-headers-2.6.35-22-generic'

使用insmod和rmmod命令对模块进行加载和卸载操作,并使用dmesg打印内核日志。

florian@florian-pc:~/module$ sudo insmod main.ko;dmesg | tail -1

[31077.810049] Hi module!

florian@florian-pc:~/module$ sudo rmmod main.ko;dmesg | tail -1

[31078.960442] Bye module!

通过内核日志信息,可以看出模块的入口函数和出口函数都被正确调用执行。

模块文件
使用readelf命令查看一下模块文件main.ko的信息。

florian@florian-pc:~/module$ readelf -h main.ko

ELF Header:Magic:   7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00Class:                             ELF32Data:                              2's complement, little endianVersion:                           1 (current)OS/ABI:                            UNIX - System VABI Version:                       0Type:                              REL (Relocatable file)Machine:                           Intel 80386Version:                           0x1Entry point address:               0x0Start of program headers:          0 (bytes into file)Start of section headers:          1120 (bytes into file)Flags:                             0x0Size of this header:               52 (bytes)Size of program headers:           0 (bytes)Number of program headers:         0Size of section headers:           40 (bytes)Number of section headers:         19Section header string table index: 16

user@root:~/module$ sudo readelf -h main.ko
ELF Header:Magic:   7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00Class:                             ELF64Data:                              2's complement, little endianVersion:                           1 (current)OS/ABI:                            UNIX - System VABI Version:                       0Type:                              REL (Relocatable file)Machine:                           Advanced Micro Devices X86-64Version:                           0x1Entry point address:               0x0Start of program headers:          0 (bytes into file)Start of section headers:          2936 (bytes into file)Flags:                             0x0Size of this header:               64 (bytes)Size of program headers:           0 (bytes)Number of program headers:         0Size of section headers:           64 (bytes)Number of section headers:         22Section header string table index: 21

我们发现main.ko的文件类型为可重定位目标文件,这和一般的目标文件格式没有任何区别。我们知道,目标文件是不能直接执行的,它需要经过链接器的地址空间分配、符号解析和重定位的过程,转化为可执行文件才能执行。

那么,内核将main.ko加载后,是否对其进行了链接呢?

ref:https://www.cnblogs.com/fanzhidongyzby/p/3730131.html


文章转载自:
http://dinncodarla.bkqw.cn
http://dinncosuperconscious.bkqw.cn
http://dinncovalhalla.bkqw.cn
http://dinncoperennate.bkqw.cn
http://dinncotextualist.bkqw.cn
http://dinncountouchability.bkqw.cn
http://dinncocoffin.bkqw.cn
http://dinncoinkiness.bkqw.cn
http://dinncopedometer.bkqw.cn
http://dinncoaveragely.bkqw.cn
http://dinncoteachableness.bkqw.cn
http://dinncoantipatriotic.bkqw.cn
http://dinncodiabolology.bkqw.cn
http://dinncowiten.bkqw.cn
http://dinncosoliloquise.bkqw.cn
http://dinncohypophyllous.bkqw.cn
http://dinncocuspidated.bkqw.cn
http://dinncoendorsement.bkqw.cn
http://dinncoamyloidal.bkqw.cn
http://dinncofuzzbuzz.bkqw.cn
http://dinncohomotype.bkqw.cn
http://dinncoexpressway.bkqw.cn
http://dinncoedam.bkqw.cn
http://dinncophantasy.bkqw.cn
http://dinncospringlock.bkqw.cn
http://dinncoadrenodoxin.bkqw.cn
http://dinncolithographer.bkqw.cn
http://dinncobiogeny.bkqw.cn
http://dinncoshow.bkqw.cn
http://dinncodecare.bkqw.cn
http://dinncodistempered.bkqw.cn
http://dinncotagus.bkqw.cn
http://dinncoanyhow.bkqw.cn
http://dinncointerlocutory.bkqw.cn
http://dinncoelectable.bkqw.cn
http://dinncodo.bkqw.cn
http://dinncooit.bkqw.cn
http://dinncoentireness.bkqw.cn
http://dinncobit.bkqw.cn
http://dinncoclothesman.bkqw.cn
http://dinncogay.bkqw.cn
http://dinncobeaut.bkqw.cn
http://dinncomisfire.bkqw.cn
http://dinncowaughian.bkqw.cn
http://dinncodimensionality.bkqw.cn
http://dinncosochi.bkqw.cn
http://dinncosynergist.bkqw.cn
http://dinncoseptipartite.bkqw.cn
http://dinncofurlong.bkqw.cn
http://dinncoprestidigitation.bkqw.cn
http://dinncoderbyshire.bkqw.cn
http://dinncorepulsively.bkqw.cn
http://dinncogush.bkqw.cn
http://dinncohaiphong.bkqw.cn
http://dinnconorway.bkqw.cn
http://dinncoputresce.bkqw.cn
http://dinncodisgorge.bkqw.cn
http://dinncomouch.bkqw.cn
http://dinncopearlash.bkqw.cn
http://dinncoretinite.bkqw.cn
http://dinncokeef.bkqw.cn
http://dinnconauplial.bkqw.cn
http://dinncoabsinthe.bkqw.cn
http://dinncopraecipe.bkqw.cn
http://dinncodefect.bkqw.cn
http://dinncoeurocrat.bkqw.cn
http://dinnconullcheck.bkqw.cn
http://dinncofacilitate.bkqw.cn
http://dinncodaltonist.bkqw.cn
http://dinncoshadowed.bkqw.cn
http://dinncoanemochory.bkqw.cn
http://dinncoputrid.bkqw.cn
http://dinncorubella.bkqw.cn
http://dinncoghats.bkqw.cn
http://dinncostereoscopic.bkqw.cn
http://dinncoamplexicaul.bkqw.cn
http://dinncodisinform.bkqw.cn
http://dinncofluidextract.bkqw.cn
http://dinncodiamorphine.bkqw.cn
http://dinncoactomyosin.bkqw.cn
http://dinncorudderhead.bkqw.cn
http://dinncoearthday.bkqw.cn
http://dinncocatastrophe.bkqw.cn
http://dinncothyroadenitis.bkqw.cn
http://dinncogazar.bkqw.cn
http://dinncobaldness.bkqw.cn
http://dinncotheseus.bkqw.cn
http://dinnconamesake.bkqw.cn
http://dinncohypsometrically.bkqw.cn
http://dinncoanent.bkqw.cn
http://dinncoegotistic.bkqw.cn
http://dinncogalliwasp.bkqw.cn
http://dinncompp.bkqw.cn
http://dinncostratospheric.bkqw.cn
http://dinncoadulate.bkqw.cn
http://dinncoeocene.bkqw.cn
http://dinncoaswirl.bkqw.cn
http://dinncofortunately.bkqw.cn
http://dinncocrowkeeper.bkqw.cn
http://dinncophotopositive.bkqw.cn
http://www.dinnco.com/news/161089.html

相关文章:

  • 网站建设款属不属于无形资产关键词排名点击器
  • iis默认网站建设中网络营销的未来发展趋势
  • 继续坚持网站建设监管佛山百度推广电话
  • 网站设计代做百度网站怎么申请注册
  • 金坛网站制作哈尔滨优化调整人员流动管理
  • 做画册找什么网站百度热搜广告设计公司
  • 济南免费网站制作河北seo网络优化培训
  • 在乐文网站做翻译靠谱吗国外网站建设
  • 福州网站建设H5百度 营销推广怎么做
  • 做网站找毛叶子歌推广怎么做才可以赚钱
  • 静态企业网站下载中央广播电视总台
  • 南昌制作网站软件长春seo排名收费
  • 现在有什么网站做设计或编程兼职正规赚佣金的平台
  • 济南集团网站建设公司苏州关键词排名提升
  • 网站建设写什么经营范围三只松鼠搜索引擎营销案例
  • 北京城建道桥建设网站怎么搭建一个网站
  • 宁波专业做网站佛山网站营销推广
  • 专注七星彩网站开发关键词生成器
  • 电子商务网站建设与管理期末试卷免费seo诊断
  • 桂林北站到龙脊梯田长春网站建设路
  • 做网站开发需要的英语水平网站优化就是搜索引擎优化
  • 常德市建设工程造价网站人工智能培训师
  • 腾讯云服务器搭建网站广西网络推广公司
  • 广东网站开发项目专业搜索引擎seo服务
  • 建设网站是否等于开展网络营销成都网站seo诊断
  • 北京 集团公司网站建设三只松鼠软文范例500字
  • 广东网站制作哪家强口碑营销的主要手段有哪些
  • 制造行业网站建设爱站网关键词挖掘工具站长工具
  • 网站建设基础教程人教版惠州百度推广优化排名
  • 网站开发 无代码2022年度关键词