摘录


Here we can see that while symbols are not unique, the way the linker resolves them is defined (it appears that it always resolves the first symbol it encounters). Note that this is a bit of a pathological case as you normally wouldn't do this. In the cases where you would go this direction there are better ways of handling symbol naming so they would be unique when exported (symbol versioning, etc)

点评

使用一个叫做version tag的技术,也就是在链接的时候使用-Wl,--version-script=xxx.map,这样其它模块引用它时符号名会带上一个小尾巴@@LIBXXX_X.X.X,以此区分同名的符号。

原文

点击这里查看原文

其它

本帖内容由21QA云收藏工具自动生成,欢迎使用。

系统消息 若觉得内容不错,请点击左上角的"赞"图标,以优化网站的内容呈现。 另外,请及时验证注册邮箱,否则收不到21QA发出的红包。 官方Q群:250203055

asked 14 Sep '16, 15:54

%E8%B7%AF%E4%BA%BA%E7%94%B2's gravatar image

路人甲
131565601708

version-script的语法倒是不难,google一下就知道了。

(14 Sep '16, 16:12) 路人甲 %E8%B7%AF%E4%BA%BA%E7%94%B2's gravatar image
Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link: [text](http://url.com/ "title")
  • image: ![alt](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×861
×28

question asked: 14 Sep '16, 15:54

question was seen: 418 times

last updated: 14 Sep '16, 16:12

powered by O*S*Q*A

粤ICP备14040061号-1