[llvm] r303590 - Support for taking the max of module flags when linking, use for PIE/PIC

Davide Italiano via llvm-commits llvm-commits at lists.llvm.org
Mon May 22 17:10:52 PDT 2017


On Mon, May 22, 2017 at 5:10 PM, Davide Italiano <davide at freebsd.org> wrote:
> On Mon, May 22, 2017 at 5:08 PM, Teresa Johnson via llvm-commits
> <llvm-commits at lists.llvm.org> wrote:
>> Author: tejohnson
>> Date: Mon May 22 19:08:00 2017
>> New Revision: 303590
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=303590&view=rev
>> Log:
>> Support for taking the max of module flags when linking, use for PIE/PIC
>>
>> Summary:
>> Add Max ModFlagBehavior, which can be used to take the max of two
>> module flag values when merging modules. Use it for the PIE and PIC
>> levels.
>>
>> This avoids an error when we try to import from a module built -fpic
>> into a module built -fPIC, for example. For both PIE and PIC levels,
>> this will be legal, since the code generation gets more conservative
>> as the level is increased. Therefore we can take the max instead of
>> somehow trying to block importing between modules compiled with
>> different levels.
>>
>
> Related, and FYI.
>

https://reviews.llvm.org/D21100#455440


-- 
Davide

"There are no solved problems; there are only problems that are more
or less solved" -- Henri Poincare


More information about the llvm-commits mailing list