This is an archive of the discontinued LLVM Phabricator instance.

[ELF] - Do not allow --dynamic-list and --version-script together.
AbandonedPublic

Authored by grimar on Aug 22 2017, 5:04 AM.

Details

Summary

In PR34057 was mentioned that currently we have difference
in behavior with ld.bfd when these options are used together.
LLD implements --dynamic-list as simplified version script.
It is generally unclear why would someone want to use them together.
And also currently it complains (warns) about having a duplicate symbol f
in version script if f present both in dynamic list and version script, what
is not nice either.

It was suggested in comments to restrict such a combination,
and it seems reasonable solution to me.

Diff Detail

Event Timeline

grimar created this revision.Aug 22 2017, 5:04 AM
grimar edited the summary of this revision. (Show Details)Aug 22 2017, 5:06 AM
smeenai requested changes to this revision.Aug 22 2017, 9:12 AM
smeenai added a subscriber: smeenai.

--dynamic-list and --version-script don't make sense together when building an executable, but the combination can be useful for a shared library. See D36499 for how the two should work together for a shared library.

This revision now requires changes to proceed.Aug 22 2017, 9:12 AM
grimar abandoned this revision.Aug 22 2017, 9:32 AM

--dynamic-list and --version-script don't make sense together when building an executable, but the combination can be useful for a shared library. See D36499 for how the two should work together for a shared library.

Ah, I missed that one, thanks for pointing. Abandoning this for now.