arm逆向工程abi



/*

 *  linux/arch/arm/kernel/armksyms.c

 *

 *  Copyright (C) 2000 Russell King

 *

 * This program is free software; you can redistribute it and/or modify

 * it under the terms of the GNU General Public License version 2 as

 * published by the Free Software Foundation.

 */

#include <linux/module.h>

#include <linux/sched.h>

#include <linux/string.h>

#include <linux/cryptohash.h>

#include <linux/delay.h>

#include <linux/in6.h>

#include <linux/syscalls.h>

#include <linux/uaccess.h>

#include <linux/io.h>



#include <asm/checksum.h>

#include <asm/system.h>

#include <asm/ftrace.h>



/*

 * libgcc functions - functions that are used internally by the

 * compiler...  (prototypes are not correct though, but that

 * doesn't really matter since they're not versioned).

 */

/*供gcc编译器内部使用的一些运行时函数原型声明*/



/*算术运算函数*/

extern void __ashldi3(void);//算术左移b位: int __ashlsi3 (int a, int b)

extern void __ashrdi3(void);//算术左移b位: long __ashldi3 (long a, int b)

extern void __divsi3(void);// 返回a和b的有符号除法的商: int __divsi3 (int a, int b)

extern void __lshrdi3(void);// 返回将a逻辑右移b位后的结果: long __lshrdi3 (long a, int b)

extern void __modsi3(void);// 返回a和b的有符号除法的余数: int __modsi3 (int a, int b)

extern void __muldi3(void);// 返回a和b的乘积: long __muldi3 (long a, long b)

/*该函数实现了低层次的比较,在这之上可以构建更高级别的比较运算符(像小于, *大于,或者等于)。返回值位于0到2的范围,使得高级别的比较运算符可以通过   *测试有符号比较或者无符号比较的返回值来实现。

*/

extern void __ucmpdi2(void);// 执行一个a和b的有符号比较: int __ucmpdi2 (long a, long b)

extern void __udivsi3(void);// 返回a和b的无符号除法的商: unsigned int __udivsi3 (unsigned int a, unsigned int b)

extern void __umodsi3(void);// 返回a和b的无符号除法的余数: unsigned int __umodsi3 (unsigned int a, unsigned int b)

extern void __do_div64(void);



extern void __aeabi_idiv(void); //除法

extern void __aeabi_idivmod(void);//求余

extern void __aeabi_lasr(void);//算术右移

extern void __aeabi_llsl(void);//逻辑左移

extern void __aeabi_llsr(void);//逻辑右移

extern void __aeabi_lmul(void);//乘法操作

extern void __aeabi_uidiv(void);//无符号除法

extern void __aeabi_uidivmod(void);//两无符号数求余

extern void __aeabi_ulcmp(void);//底层比较函数



extern void fpundefinstr(void);//fp未定义指令的返回地址

/* ENTRY(fp_enter)
  .word fpe_not_present
  .text

*/

extern void fp_enter(void);

/*

 * This has a special calling convention; it doesn't

 * modify any of the usual registers, except for LR.

 */

#define EXPORT_CRC_ALIAS(sym) __CRC_SYMBOL(sym, "")



#define EXPORT_SYMBOL_ALIAS(sym,orig)         /

 EXPORT_CRC_ALIAS(sym)                   /

 static const struct kernel_symbol __ksymtab_##sym      /

  __used __attribute__((section("__ksymtab"))) =     /

    { (unsigned long)&orig, #sym };



/*

 * floating point math emulator support.

 * These symbols will never change their calling convention...

 */

EXPORT_SYMBOL_ALIAS(kern_fp_enter,fp_enter);

EXPORT_SYMBOL_ALIAS(fp_printk,printk);

EXPORT_SYMBOL_ALIAS(fp_send_sig,send_sig);

/*导出ARM平台上的内核底层函数*/

EXPORT_SYMBOL(__backtrace);



      /* platform dependent support */

EXPORT_SYMBOL(__udelay);

EXPORT_SYMBOL(__const_udelay);



      /* networking */

EXPORT_SYMBOL(csum_partial);

EXPORT_SYMBOL(csum_partial_copy_from_user);

EXPORT_SYMBOL(csum_partial_copy_nocheck);

EXPORT_SYMBOL(__csum_ipv6_magic);



      /* io */

#ifndef __raw_readsb

EXPORT_SYMBOL(__raw_readsb);

#endif

#ifndef __raw_readsw

EXPORT_SYMBOL(__raw_readsw);

#endif

#ifndef __raw_readsl

EXPORT_SYMBOL(__raw_readsl);

#endif

#ifndef __raw_writesb

EXPORT_SYMBOL(__raw_writesb);

#endif

#ifndef __raw_writesw

EXPORT_SYMBOL(__raw_writesw);

#endif

#ifndef __raw_writesl

EXPORT_SYMBOL(__raw_writesl);

#endif



      /* string / mem functions */

EXPORT_SYMBOL(strchr);

EXPORT_SYMBOL(strrchr);

EXPORT_SYMBOL(memset);

EXPORT_SYMBOL(memcpy);

EXPORT_SYMBOL(memmove);

EXPORT_SYMBOL(memchr);

EXPORT_SYMBOL(__memzero);



      /* user mem (segment) */

EXPORT_SYMBOL(__strnlen_user);

EXPORT_SYMBOL(__strncpy_from_user);



#ifdef CONFIG_MMU

EXPORT_SYMBOL(copy_page);



EXPORT_SYMBOL(__copy_from_user);

EXPORT_SYMBOL(__copy_to_user);

EXPORT_SYMBOL(__clear_user);



EXPORT_SYMBOL(__get_user_1);

EXPORT_SYMBOL(__get_user_2);

EXPORT_SYMBOL(__get_user_4);



EXPORT_SYMBOL(__put_user_1);

EXPORT_SYMBOL(__put_user_2);

EXPORT_SYMBOL(__put_user_4);

EXPORT_SYMBOL(__put_user_8);

#endif



      /* crypto hash */

EXPORT_SYMBOL(sha_transform);



      /* gcc lib functions */

EXPORT_SYMBOL(__ashldi3);

EXPORT_SYMBOL(__ashrdi3);

EXPORT_SYMBOL(__divsi3);

EXPORT_SYMBOL(__lshrdi3);

EXPORT_SYMBOL(__modsi3);

EXPORT_SYMBOL(__muldi3);

EXPORT_SYMBOL(__ucmpdi2);

EXPORT_SYMBOL(__udivsi3);

EXPORT_SYMBOL(__umodsi3);

EXPORT_SYMBOL(__do_div64);



#ifdef CONFIG_AEABI

EXPORT_SYMBOL(__aeabi_idiv);

EXPORT_SYMBOL(__aeabi_idivmod);

EXPORT_SYMBOL(__aeabi_lasr);

EXPORT_SYMBOL(__aeabi_llsl);

EXPORT_SYMBOL(__aeabi_llsr);

EXPORT_SYMBOL(__aeabi_lmul);

EXPORT_SYMBOL(__aeabi_uidiv);

EXPORT_SYMBOL(__aeabi_uidivmod);

EXPORT_SYMBOL(__aeabi_ulcmp);

#endif



      /* bitops */

EXPORT_SYMBOL(_set_bit_le);

EXPORT_SYMBOL(_test_and_set_bit_le);

EXPORT_SYMBOL(_clear_bit_le);

EXPORT_SYMBOL(_test_and_clear_bit_le);

EXPORT_SYMBOL(_change_bit_le);

EXPORT_SYMBOL(_test_and_change_bit_le);

EXPORT_SYMBOL(_find_first_zero_bit_le);

EXPORT_SYMBOL(_find_next_zero_bit_le);

EXPORT_SYMBOL(_find_first_bit_le);

EXPORT_SYMBOL(_find_next_bit_le);



#ifdef __ARMEB__

EXPORT_SYMBOL(_set_bit_be);

EXPORT_SYMBOL(_test_and_set_bit_be);

EXPORT_SYMBOL(_clear_bit_be);

EXPORT_SYMBOL(_test_and_clear_bit_be);

EXPORT_SYMBOL(_change_bit_be);

EXPORT_SYMBOL(_test_and_change_bit_be);

EXPORT_SYMBOL(_find_first_zero_bit_be);

EXPORT_SYMBOL(_find_next_zero_bit_be);

EXPORT_SYMBOL(_find_first_bit_be);

EXPORT_SYMBOL(_find_next_bit_be);

#endif



#ifdef CONFIG_FUNCTION_TRACER

EXPORT_SYMBOL(mcount);

#endif

http://blog.csdn.net/fuyajun01/article/details/5918957

侵权请通知删除,谢谢。
(仅作记录用)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值