How Linkers Resolve Multiply-Defined Global Symbols
来源:互联网 发布:淘宝省市区街道联动js 编辑:程序博客网 时间:2024/05/01 11:28
7.6.1 How Linkers Resolve Multiply-Defined Global Symbols
At compile time, the compiler exports each global symbol to the assembler as eitherstrongorweak,andtheassembler encodes this information implicitly in the symbol table of the relocatable object file. Functions
and initialized global variables get strong symbols. Uninitialized global variables get weak symbols. For
the example program in Figure 7.1, buf, bufp0,main,andswapare strong symbols;bufp1isaweak
symbol.
Given this notion of strong and weak symbols, Unix linkers use the following rules for dealing with multiplydefined symbols:
- Rule 1: Multiple strong symbols are not allowed.
- Rule 2: Given a strong symbol and multiple weak symbols, choose the strong symbol.
- Rule 3: Given multiple weak symbols, choose any of the weak symbols
0 0
- How Linkers Resolve Multiply-Defined Global Symbols
- Chapter 7 Linker -- How Linkers Resolve Multiply-Defined Global Symbols
- one or more multiply defined symbols found
- How Linkers Use Static Libraries to Resolve References
- fatal error LNK1169: one or more multiply defined symbols found
- 【VC6.0】one or more multiply defined symbols found
- fatal error LNK1169: one or more multiply defined symbols found
- LNK2005:symbol already defined和LNK1169:one or more multiply defined symbols found 解决办法
- LNK2005:symbol already defined和LNK1169:one or more multiply defined symbols found 解决办法
- LNK2005:symbol already defined和LNK1169:one or more multiply defined symbols found 解决办法
- [随感]fatal error LNK1169: one or more multiply defined symbols found终极解决
- fatal error LNK1169: one or more multiply defined symbols found终极解决
- fatal error LNK1169: one or more multiply defined symbols found终极解决【转】
- 2011 4-6 fatal error LNK1169: one or more multiply defined symbols found
- fatal error LNK1169: one or more multiply defined symbols found 解决方法
- fatal error LNK1169: one or more multiply defined symbols found 解决方法
- MFC出现错误:one or more multiply defined symbols found void * __cdecl operator new(unsigned __int64)"
- fatal error LNK1169: one or more multiply defined symbols found终极解决
- 沉鱼
- C#多线程学习(二) 如何操纵一个线程
- 使用Netbeans创建java Web项目
- Xcode 5.0.2 如何显示、隐藏运行调试工具栏
- ORACLE在LINUX 64位安装---只言片语
- How Linkers Resolve Multiply-Defined Global Symbols
- C#多线程学习(三) 生产者和消费者
- FreeSWITCH中lua实例1:实现呼叫中心中电话接通前播放坐席号码的效果
- wins下svn安装配置
- hdu 1754 I Hate It(线段树单点更新及区间最值)
- 见不得可怜人
- J-Link的驱动程序,J-Link出问题后的维修方法
- ios5 json
- windows系统上安装与使用Android NDK r5