Code Monkey home page Code Monkey logo

replaceollvmelfsymcom's Introduction

本工具用于解决ollvm编译出来的Linux驱动文件,加载进内核会报错“please compile with -fno-common”的问题
使用的前提是:需要在驱动的源码文件里面加入许多个全局的int变量定义。如:int xaa1, yaa1, xaa2, yaa2;
接下来,启动本工具: ./main [目标驱动文件路径] [全局的int变量名1] [全局的int变量名2] [全局的int变量名3]....
例如:

	//驱动文件源码内:

	int xaa1, yaa1;
	int test1(int a) __attribute__((__annotate__(("bcf fla sub bcf_loop=1000 bcf_prob=100 split_num=1000"))))
	{
		int b = a + 2;
		return b;
	}

	int xaa2, yaa2;
	int test2(int a) __attribute__((__annotate__(("bcf fla sub bcf_loop=1000 bcf_prob=100 split_num=1000"))))
	{
		int b = a + 3;
		return b;
	}

	//编译出ko驱动文件后,执行:
	./main rwProcMem37.ko xaa1 yaa1 xaa2 yaa2

replaceollvmelfsymcom's People

Contributors

abcz316 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.