[百度空间] --whole-archive & --no-whole-archive
What is it?
backgorund:
an archive file (.a) is similar as .lib compared to Winodws. it simply contains object files. Creating an archive file is not "linking", thus no symbol missing/confilct will be checked.
but an. so/.dll is somehow more like a executable/runnable image of system process, which will not allow undefined symbol or reduplicated symbol.
at linking time, linker will look into each archive file(.a) provide by command line for un-resolved symbols. once it finds the first one, it will stop and look for the next. if there're more symbols with the same signaure defined in other ojbect files whithin the same archive, linker just igonre them.
if the archive contains an object file whose symbols are totally never referenced, the object file will not be linked in.
That's why when you write an "plugin style" file which only calls foundation functions but not get called directly (no symbol referenced by others), it will not be linked in, if its object file is in an archive. and static object surely won't init too.
that's why "--whole-archive" is needed, if you wanna force link all object files within the archive file.
Howto?
--whole-archive will affect the subsequence archive files in command line, if you wanna link whole archive for libA, other archives not whole linked in, then use [-Wl,]--whole-archive -lA [-Wl,]--no-whole-arhive -lB lC ... Use -Wl, if you're passing it via compiler, not directly to LD.
but if an archive contains reduplicated symbol and you're using "--whole-archive", you will get a symbol conflict error because all symbols will be linked in.
[百度空间] --whole-archive & --no-whole-archive的更多相关文章
- Android手机无法访问百度空间的解决办法
本文网址:http://www.cnblogs.com/tunnel213/p/4301165.html 现象: 百度“JavaScript函数高级”后找到一篇文章,百度空间的,无法查看: 配置: 三 ...
- jquery-plugin-biggerLink,highLight-层加亮_andy 阳光生活_百度空间
How to get the xpath by clicking an html element How to get the xpath by clicking an html element Qu ...
- document.domain - JavaScript的同源策略问题:错误信息:Permission denied to access property 'document'_eecc00_百度空间
document.domain - JavaScript的同源策略问题:错误信息:Permission denied to access property 'document'_eecc00_百度空间 ...
- memcached vs MySQL Memory engine table 速度比较_XMPP Jabber即时通讯开发实践_百度空间
memcached vs MySQL Memory engine table 速度比较_XMPP Jabber即时通讯开发实践_百度空间 memcached vs MySQL Memory engin ...
- 提高mysql memory(heap) engine内存性能的开源补丁_XMPP Jabber即时通讯开发实践_百度空间
提高mysql memory(heap) engine内存性能的开源补丁_XMPP Jabber即时通讯开发实践_百度空间 提高mysql memory(heap) engine内存性能的开源补丁
- sort 使用 tab键 作为 分隔符_人生如梦_百度空间
sort 使用 tab键 作为 分隔符_人生如梦_百度空间 sort 使用 tab键 作为 分隔符 For some reason "\t" doesn't work right, ...
- centos5.5字体为方块问题的解决_深入学习编程_百度空间
centos5.5字体为方块问题的解决_深入学习编程_百度空间 centos5.5字体为方块问题的解决 一.yum -y install fonts-chinese二.yum -y install f ...
- 毕业论文评审意见、导师意见范文、模板_Smile~风_百度空间
body{ font-family: "Microsoft YaHei UI","Microsoft YaHei",SimSun,"Segoe UI& ...
- Attribute name invalid for tag form according to TLD异常解决办法_gaigai_百度空间
body{ font-family: "Microsoft YaHei UI","Microsoft YaHei",SimSun,"Segoe UI& ...
随机推荐
- 编写测试类,了解ArrayList的方法
这篇文章主要介绍了C#中动态数组用法,实例分析了C#中ArrayList实现动态数组的技巧,非常具有实用价值,需要的朋友可以参考下 本文实例讲述了C#中动态数组用法.分享给大家供大家参考.具体分析如下 ...
- mysql数据库开发规范
对规范的遵守可用二八原则,不要教条.为满足实际需求 可忽视部分规范. 1.索引规范 *目标 |--利用最小的索引成本找到需要的行记录 *原则 |--做前缀匹配 |--选择区分度高的列做前缀索引列 |- ...
- python之文件
文件打开函数:f = open 表1-1:open函数中模式参数常用值 打开模式 描述 'r' 读模式 'w' 写模式 'a' 追加模式 'b' 二进制模式 '+' 读/写模式 表1-2:文件对象方法 ...
- openSUSE13.1无法打开Yast的安装/移除软件管理软件的解决办法·(未解决,临时方法) 收获:有问题,读日志
看了日志发现错误在于Ruby,新的YaST是基于Ruby的,而我用rvm安了新版本Ruby,日志里这么出错: 2014-08-22 20:20:57 <3> linux-vfpp.site ...
- Hashset,Iterator
HashSet类主要是设计用来做高性能集运算的,例如对两个集合求交集.并集.差集等.集合中包含一组不重复出现且无特性顺序的元素. (一)HashSet的一些特性如下: 1.HashSet中的值不能重复 ...
- Android--将Bitmip转化成字符串
因为自己做的东西想要上传到服务器,所以就选择了将Bitmip转化成了字符串在上传 其它格式的图片我们好像可以用Bitmap.Factory 去将他们转化成BitMap 转化成字符串的代码 //将bit ...
- Windows Phone 8.1SDK新特性预览
前言 Windows Phone 8.1的预览版将在近期推送,WP 8.1的SDK也已经进入到RC阶段,可以从这里安装.本次更新的SDK被直接集成到了VS2013Update2里面,不再是单独的 ...
- python生成带参数二维码
#coding:utf8 import urllib2 import urllib import json import string import random class WebChat(obje ...
- 面向对象原生js幻灯片代淡出效果
面向对象原生js幻灯片代淡出效果 下面是代码 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" & ...
- quartz 数据表字典
首次整理,可能有错误,还有少许的未整理,希望看到的人能给点补充(包括指点错误) 表名 表说明 自定义触发器 QRTZ_BLOB_TRIGGERS 列名(英) 列名(中) 数据类型 列长度 是否为空 列 ...