[PATCH] D20217: Add direct control of whether or not a symbol is preemtable at runtime

Sriraman Tallam via llvm-commits llvm-commits at lists.llvm.org
Thu May 12 12:33:42 PDT 2016


tmsriram added a comment.

> Do you guys think this is a reasonable direction? If so I will add bitcode serialization support and upgrade and plug it to the other object formats.


Thanks for taking the time to do this. If you could also address the use cases of these new linkages.  I can think of two ways:

- Using new attributes to specify these linkage types

Annotating the source with this is going to be difficult and error prone as the same source file could be potentially used to link a shared object and an executable.

- Using compile-time flags like -fvisibilty=extern-local or -fvisibility=strong-preemptable

Do you envision something like this? In that case, with -fvisiblity=extern-local, if we do find some extern symbols are not local, are you planning to emit an error?

For ELF atleast, preemptability can be inferred by looking at -fPIC/-fPIE/none.  What is unknown is extern local.  If I do not want to do source modifications, how would I get around this?


http://reviews.llvm.org/D20217





More information about the llvm-commits mailing list