Amaury SECHET via llvm-dev
2017-Jan-09 12:39 UTC
[llvm-dev] Reloc::Default should trigger PIC on plateformq where PIE is the defaul
Pretty all is in the title. Is there a reason why this isn't done ? With debian and ubuntu switching to PIE by default, this is become more and more of a hassle to get this working properly, and I'd rather see that fixed in LLVM rather than in each driver that do something with it. Has someone already looked into this ? If so, what are the conclusions ? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170109/8edcb430/attachment.html>
Rafael Avila de Espindola via llvm-dev
2017-Jan-09 16:15 UTC
[llvm-dev] Reloc::Default should trigger PIC on plateformq where PIE is the defaul
Amaury SECHET via llvm-dev <llvm-dev at lists.llvm.org> writes:> Pretty all is in the title. Is there a reason why this isn't done ? With > debian and ubuntu switching to PIE by default, this is become more and more > of a hassle to get this working properly, and I'd rather see that fixed in > LLVM rather than in each driver that do something with it. > > Has someone already looked into this ? If so, what are the conclusions ?I did some time ago. My memory is fuzzy, but I think my idea was to remove "Default" completely and have the caller fully specify what the desired reloc model was. A target construction can then take an Optional<Model> and map None to whatever default it wants. Cheers, Rafael
Davide Italiano via llvm-dev
2017-Jan-09 16:28 UTC
[llvm-dev] Reloc::Default should trigger PIC on plateformq where PIE is the defaul
On Mon, Jan 9, 2017 at 8:15 AM, Rafael Avila de Espindola via llvm-dev <llvm-dev at lists.llvm.org> wrote:> Amaury SECHET via llvm-dev <llvm-dev at lists.llvm.org> writes: > >> Pretty all is in the title. Is there a reason why this isn't done ? With >> debian and ubuntu switching to PIE by default, this is become more and more >> of a hassle to get this working properly, and I'd rather see that fixed in >> LLVM rather than in each driver that do something with it. >> >> Has someone already looked into this ? If so, what are the conclusions ? > > I did some time ago. My memory is fuzzy, but I think my idea was to > remove "Default" completely and have the caller fully specify what the > desired reloc model was. > > A target construction can then take an Optional<Model> and map None to > whatever default it wants. >Rough plan (previously discussed): https://reviews.llvm.org/D21100#455440 This is needed to LTO the FreeBSD base system, among others. -- Davide "There are no solved problems; there are only problems that are more or less solved" -- Henri Poincare