1 Star 1 Fork 1

Linux OS/busybox

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
test_ptr_hack.c 620 Bytes
一键复制 编辑 原始数据 按行查看 历史
/* vi: set sw=4 ts=4: */
/*
* Copyright (C) 2008 by Denys Vlasenko <vda.linux@googlemail.com>
*
* Licensed under GPLv2, see file LICENSE in this source tree.
*/
struct test_statics;
#ifndef GCC_COMBINE
/* We cheat here. It is declared as const ptr in libbb.h,
* but here we make it live in R/W memory */
struct test_statics *test_ptr_to_statics;
#else
/* gcc -combine will see through and complain */
/* Using alternative method which is more likely to break
* on weird architectures, compilers, linkers and so on */
struct test_statics *const test_ptr_to_statics __attribute__ ((section (".data")));
#endif
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C
1
https://gitee.com/linux-os/busybox.git
git@gitee.com:linux-os/busybox.git
linux-os
busybox
busybox
master

搜索帮助