忘记密码   免费注册 查看新帖 | 论坛精华区

ChinaUnix.net

  平台 论坛 博客 认证专区 大话IT HPC论坛 徽章 文库 沙龙 自测 下载 频道自动化运维 虚拟化 储存备份 C/C++ PHP MySQL 嵌入式 Linux系统
12下一页
最近访问板块 发新帖
查看: 1511 | 回复: 10

[内核模块] 内核模块arm-linux-gcc编译出错 [复制链接]

论坛徽章:
0
发表于 2017-06-20 15:42 |显示全部楼层
各位大牛,小弟在做一个透明加密的课题,做到交叉编译这块卡主了,报错如下 3.jpg 编译器用的是arm-none-linux-gnueabi-gcc-4.4.1,百度说是有几行代码是x86的汇编,需要改成arm的汇编。。研究了很久  不知道如何解
unsigned int clear_and_ret_cr0(void)
{
        unsigned int cr0 = 0;
        unsigned int ret = 0;
        asm volatile ("movl %%cr0, %%eax"
                :"=a"(cr0));
        ret = cr0;
        cr0 &= 0xfffeffff;
        asm volatile ("movl %%eax, %%cr0"
                :
        :"a"(cr0));
        return ret;
}
void setback_cr0(unsigned int val)
{
        asm volatile("movl %%eax, %%cr0"
                :
        :"a"(val));
}

这段就是报错的一段 asm volatile这段内嵌汇编 尝试了多种 无法通过

论坛徽章:
0
发表于 2017-06-20 15:46 |显示全部楼层
图片里面的内容  

/home/zhong/cwork/kernelwork/safe/encryption.c:79 erro: impossible contraint in asm
/home/zhong/cwork/kernelwork/safe/encryption.c:83 erro: impossible contraint in asm

论坛徽章:
0
发表于 2017-06-20 15:49 |显示全部楼层
我后来把这段代码  拿到实验室的机器上 是rehat的系统 内核源码2.6.24 交叉编译工具是arm-linux-gcc 3.4.1 报了一大堆的错  百度也百度不到
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/jiffies.h:16: error: parse error before "jiffies_64"
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/jiffies.h:20: error: parse error before "get_jiffies_64"
In file included from /usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../a rm-linux/sys-include/linux/sched.h:18,
                 from /usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../a rm-linux/sys-include/linux/module.h:10,
                 from encryption.c:21:
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/a sm/semaphore.h:18: error: parse error before "wait_queue_head_t"
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/a sm/semaphore.h: In function `sema_init':
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/a sm/semaphore.h:46: error: dereferencing pointer to incomplete type
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/a sm/semaphore.h:47: error: dereferencing pointer to incomplete type
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/a sm/semaphore.h:48: error: dereferencing pointer to incomplete type
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/a sm/semaphore.h: In function `sema_count':
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/a sm/semaphore.h:66: error: dereferencing pointer to incomplete type
In file included from /usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../a rm-linux/sys-include/linux/signal.h:4,
                 from /usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../a rm-linux/sys-include/linux/sched.h:25,
                 from /usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../a rm-linux/sys-include/linux/module.h:10,
                 from encryption.c:21:
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/list.h:682:2: warning: #warning "don't include kernel headers in userspace"
In file included from /usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../a rm-linux/sys-include/asm/siginfo.h:4,
                 from /usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../a rm-linux/sys-include/linux/signal.h:7,
                 from /usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../a rm-linux/sys-include/linux/sched.h:25,
                 from /usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../a rm-linux/sys-include/linux/module.h:10,
                 from encryption.c:21:
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/a sm-generic/siginfo.h: At top level:
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/a sm-generic/siginfo.h:58: error: size of array `_pad' is too large
In file included from /usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../a rm-linux/sys-include/linux/sched.h:29,
                 from /usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../a rm-linux/sys-include/linux/module.h:10,
                 from encryption.c:21:
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/completion.h:15: error: parse error before "wait_queue_head_t"
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/completion.h: In function `init_completion':
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/completion.h:26: error: dereferencing pointer to incomplete type
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/completion.h:27: error: dereferencing pointer to incomplete type
In file included from /usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../a rm-linux/sys-include/linux/sched.h:30,
                 from /usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../a rm-linux/sys-include/linux/module.h:10,
                 from encryption.c:21:
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/pid.h: At top level:
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/pid.h:18: error: field `task_list' has incomplete type
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/pid.h:19: error: field `hash_chain' has incomplete type
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/pid.h:24: error: field `pid_chain' has incomplete type
In file included from /usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../a rm-linux/sys-include/linux/sched.h:31,
                 from /usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../a rm-linux/sys-include/linux/module.h:10,
                 from encryption.c:21:
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/percpu.h: In function `__alloc_percpu':
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/percpu.h:45: error: `GFP_KERNEL' undeclared (first use in this function)
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/percpu.h:45: error: (Each undeclared identifier is reported only once
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/percpu.h:45: error: for each function it appears in.)
In file included from /usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../a rm-linux/sys-include/linux/sched.h:102,
                 from /usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../a rm-linux/sys-include/linux/module.h:10,
                 from encryption.c:21:
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/timer.h: At top level:
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/timer.h:12: error: field `entry' has incomplete type
In file included from /usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../a rm-linux/sys-include/asm/local.h:1,
                 from /usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../a rm-linux/sys-include/linux/module.h:21,
                 from encryption.c:21:
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/a sm-generic/local.h: In function `local_inc':
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/a sm-generic/local.h:65: error: invalid type argument of `->'
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/a sm-generic/local.h:65: error: invalid type argument of `->'
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/a sm-generic/local.h: In function `local_dec':
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/a sm-generic/local.h:72: error: invalid type argument of `->'
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/a sm-generic/local.h:72: error: invalid type argument of `->'
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/a sm-generic/local.h: In function `local_add':
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/a sm-generic/local.h:79: error: invalid type argument of `->'
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/a sm-generic/local.h:79: error: invalid type argument of `->'
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/a sm-generic/local.h: In function `local_sub':
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/a sm-generic/local.h:86: error: invalid type argument of `->'
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/a sm-generic/local.h:86: error: invalid type argument of `->'
In file included from encryption.c:28:
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/file.h: At top level:
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/file.h:33: error: `BITS_PER_LONG' undeclared here (not in a function)
In file included from /usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../a rm-linux/sys-include/linux/highmem.h:8,
                 from /usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../a rm-linux/sys-include/linux/skbuff.h:27,
                 from /usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../a rm-linux/sys-include/linux/security.h:34,
                 from encryption.c:32:
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/a sm/cacheflush.h:198: error: `__glue' declared as function returning a function
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/a sm/cacheflush.h:199: error: `__glue' declared as function returning a function
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/a sm/cacheflush.h:200: error: `__glue' declared as function returning a function
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/a sm/cacheflush.h:201: error: `__glue' declared as function returning a function
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/a sm/cacheflush.h:202: error: `__glue' declared as function returning a function
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/a sm/cacheflush.h:214: error: `__glue' declared as function returning a function
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/a sm/cacheflush.h:215: error: `__glue' declared as function returning a function
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/a sm/cacheflush.h:216: error: `__glue' declared as function returning a function
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/a sm/cacheflush.h: In function `flush_cache_mm':
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/a sm/cacheflush.h:249: error: `current' undeclared (first use in this function)
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/a sm/cacheflush.h:250: error: `xscale' undeclared (first use in this function)
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/a sm/cacheflush.h:250: error: `_flush_user_cache_all' undeclared (first use in thi s function)
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/a sm/cacheflush.h:250: error: called object is not a function
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/a sm/cacheflush.h: In function `flush_cache_range':
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/a sm/cacheflush.h:256: error: `current' undeclared (first use in this function)
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/a sm/cacheflush.h:256: error: dereferencing pointer to incomplete type
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/a sm/cacheflush.h:257: error: `xscale' undeclared (first use in this function)
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/a sm/cacheflush.h:257: error: `_flush_user_cache_range' undeclared (first use in t his function)
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/a sm/cacheflush.h:258: error: dereferencing pointer to incomplete type
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/a sm/cacheflush.h:258: error: called object is not a function
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/a sm/cacheflush.h: In function `flush_cache_page':
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/a sm/cacheflush.h:264: error: `current' undeclared (first use in this function)
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/a sm/cacheflush.h:264: error: dereferencing pointer to incomplete type
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/a sm/cacheflush.h:266: error: `xscale' undeclared (first use in this function)
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/a sm/cacheflush.h:266: error: `_flush_user_cache_range' undeclared (first use in t his function)
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/a sm/cacheflush.h:266: error: dereferencing pointer to incomplete type
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/a sm/cacheflush.h:266: error: called object is not a function
In file included from encryption.c:32:
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/security.h: At top level:
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/security.h:43: error: parse error before "kernel_cap_t"
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/security.h:44: error: parse error before "kernel_cap_t"
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/security.h:45: error: parse error before "kernel_cap_t"
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/security.h: In function `cap_netlink_send':
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/security.h:58: error: request for member `eff_cap' in something not a struc ture or union
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/security.h:58: error: `current' undeclared (first use in this function)
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/security.h: In function `cap_netlink_recv':
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/security.h:64: error: request for member `eff_cap' in something not a struc ture or union
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/security.h: At top level:
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/security.h:1912: error: parse error before "kernel_cap_t"
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/security.h: In function `security_capget':
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/security.h:1916: error: `target' undeclared (first use in this function)
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/security.h:1916: error: `effective' undeclared (first use in this function)
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/security.h:1916: error: `inheritable' undeclared (first use in this functio n)
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/security.h:1916: error: `permitted' undeclared (first use in this function)
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/security.h: At top level:
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/security.h:1920: error: parse error before "kernel_cap_t"
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/security.h: In function `security_capset_check':
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/security.h:1924: error: `target' undeclared (first use in this function)
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/security.h:1924: error: `effective' undeclared (first use in this function)
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/security.h:1924: error: `inheritable' undeclared (first use in this functio n)
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/security.h:1924: error: `permitted' undeclared (first use in this function)
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/security.h: At top level:
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/security.h:1928: error: parse error before "kernel_cap_t"
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/security.h: In function `security_capset_set':
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/security.h:1932: error: `target' undeclared (first use in this function)
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/security.h:1932: error: `effective' undeclared (first use in this function)
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/security.h:1932: error: `inheritable' undeclared (first use in this functio n)
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/security.h:1932: error: `permitted' undeclared (first use in this function)
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/security.h: At top level:
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/security.h:1940: error: parse error before '*' token
In file included from encryption.c:33:
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/syscalls.h:110: error: parse error before '*' token
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/syscalls.h:111: error: parse error before "old_sigset_t"
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/syscalls.h:167: error: parse error before '*' token
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/syscalls.h:330: error: parse error before "old_uid_t"
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/syscalls.h:332: error: parse error before "old_uid_t"
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/syscalls.h:333: error: parse error before "old_uid_t"
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/syscalls.h:334: error: parse error before "rgid"
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/syscalls.h:335: error: parse error before "gid"
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/syscalls.h:336: error: parse error before "ruid"
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/syscalls.h:337: error: parse error before "uid"
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/syscalls.h:338: error: parse error before "ruid"
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/syscalls.h:339: error: parse error before '*' token
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/syscalls.h:341: error: parse error before "rgid"
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/syscalls.h:342: error: parse error before '*' token
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/syscalls.h:344: error: parse error before "uid"
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/syscalls.h:345: error: parse error before "gid"
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/syscalls.h:346: error: parse error before "old_gid_t"
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/syscalls.h:347: error: parse error before "old_gid_t"
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/syscalls.h:383: error: parse error before "cookie64"
In file included from /usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../a rm-linux/sys-include/linux/pagemap.h:11,
                 from encryption.c:34:
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/a sm/uaccess.h:52: error: parse error before "fs"
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/a sm/uaccess.h: In function `set_fs':
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/a sm/uaccess.h:54: error: invalid type argument of `->'
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/a sm/uaccess.h:54: error: `fs' undeclared (first use in this function)
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/a sm/uaccess.h:55: error: dereferencing pointer to incomplete type
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/a sm/uaccess.h:55: error: dereferencing pointer to incomplete type
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/a sm/uaccess.h:55: error: dereferencing pointer to incomplete type
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/a sm/uaccess.h: In function `verify_area':
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/a sm/uaccess.h:81: error: invalid type argument of `->'
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/a sm/uaccess.h: In function `copy_from_user':
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/a sm/uaccess.h:370: error: invalid type argument of `->'
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/a sm/uaccess.h: In function `copy_to_user':
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/a sm/uaccess.h:384: error: invalid type argument of `->'
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/a sm/uaccess.h: In function `clear_user':
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/a sm/uaccess.h:396: error: invalid type argument of `->'
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/a sm/uaccess.h: In function `strncpy_from_user':
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/a sm/uaccess.h:409: error: invalid type argument of `->'
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/a sm/uaccess.h: In function `strnlen_user':
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/a sm/uaccess.h:425: error: invalid type argument of `->'
In file included from /usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../a rm-linux/sys-include/linux/pagemap.h:12,
                 from encryption.c:34:
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/gfp.h: In function `alloc_pages_node':
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/gfp.h:82: error: `MAX_ORDER' undeclared (first use in this function)
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/gfp.h:86: error: invalid type argument of `->'
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/gfp.h:86: error: `GFP_ZONEMASK' undeclared (first use in this function)
In file included from encryption.c:34:
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/pagemap.h: In function `mapping_gfp_mask':
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/pagemap.h:23: error: dereferencing pointer to incomplete type
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/pagemap.h: In function `mapping_set_gfp_mask':
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/pagemap.h:32: error: dereferencing pointer to incomplete type
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/pagemap.h:32: error: dereferencing pointer to incomplete type
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/pagemap.h: In function `linear_page_index':
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/pagemap.h:145: error: dereferencing pointer to incomplete type
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/pagemap.h:146: error: dereferencing pointer to incomplete type
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/pagemap.h: In function `wait_on_page_locked':
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/pagemap.h:175: error: `PG_locked' undeclared (first use in this function)
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/pagemap.h: In function `wait_on_page_writeback':
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/l inux/pagemap.h:184: error: `PG_writeback' undeclared (first use in this function )
encryption.c: At top level:
encryption.c:46: error: `S_IRUGO' undeclared here (not in a function)
encryption.c:46: error: initializer element is not constant
encryption.c:46: error: (near initialization for `__param_key.perm')
encryption.c:47: error: initializer element is not constant
encryption.c:47: error: (near initialization for `__param_filename.perm')
encryption.c: In function `getscTable':
encryption.c:141: warning: return makes integer from pointer without a cast
encryption.c: In function `hacked_read':
encryption.c:156: error: dereferencing pointer to incomplete type
encryption.c:162: warning: assignment makes pointer from integer without a cast
encryption.c: In function `hacked_write':
encryption.c:182: error: dereferencing pointer to incomplete type
encryption.c:188: warning: assignment makes pointer from integer without a cast
encryption.c: In function `hack_init':
encryption.c:208: warning: assignment makes pointer from integer without a cast
encryption.c:222: warning: assignment makes pointer from integer without a cast
make: *** [all] 错误 1

论坛徽章:
0
发表于 2017-06-20 15:53 |显示全部楼层
一开始的交叉编译我是在ubuntu 内核是3.0的系统上的

麻烦各位大牛  支支招  无论是教我怎么把x86汇编改成arm汇编(一楼的报错)还是告诉我后面这种报错  怎么解的办法。。感激不尽

论坛徽章:
0
发表于 2017-06-20 15:55 |显示全部楼层
源代码做的是透明加密的  如果谁有自己从gcc到arm—linux-gcc一套已经编译通过的源程序  麻烦给一下  并告知内核版本,编译器版本 等等  感激不尽

论坛徽章:
0
发表于 2017-06-20 16:07 |显示全部楼层
大神好像都在上班。。

论坛徽章:
0
发表于 2017-06-20 20:02 |显示全部楼层
有没有人 帮一把。。。

论坛徽章:
0
发表于 2017-06-21 14:15 |显示全部楼层
泪目。。。。

论坛徽章:
0
发表于 2017-07-19 09:53 |显示全部楼层
改代码吧,x86的汇编编译肯定编不过
来自苹果客户端来自客户端

论坛徽章:
0
发表于 2017-07-19 09:58 |显示全部楼层
如果编app,就不要指定include kernel的头文件路径,里面有个错误提示
来自苹果客户端来自客户端
您需要登录后才可以回帖 登录 | 注册

本版积分规则

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号 北京市公安局海淀分局网监中心备案编号:11010802020122
广播电视节目制作经营许可证(京) 字第1234号 中国互联网协会会员  联系我们:
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP