search for: positionindependentexecut

Displaying 3 results from an estimated 3 matches for "positionindependentexecut".

2015 Nov 06
3
How does -fPIE get passed from clang to llc when run on a .ll file?
On Fri, Nov 6, 2015 at 11:10 AM, Tim Northover <t.p.northover at gmail.com> wrote: > On 6 November 2015 at 11:00, Phil Tomson <phil.a.tomson at gmail.com> wrote: > > With 3.6 I get an unused argument warning with -enable-pie: > > > > $ clang -v -emit-llvm -enable-pie -O0 -S global_dat.c -o > > global_dat_x86_pie.ll > > Yes, it's an llc option not a
2015 Nov 06
2
How does -fPIE get passed from clang to llc when run on a .ll file?
If I create an llvm IR file (.ll) using clang like this: clang -v -emit-llvm -fPIC -O0 -S global_dat.c -o global_dat_x86_pic.ll And then take a look at the resulting .ll file, I see near the bottom: !0 = !{i32 1, !"PIC Level", i32 2} Now if I do the same, but specify -fPIE: clang -v -emit-llvm -fPIE -O0 -S global_dat.c -o global_dat_x86_pie.ll And then look at the resulting
2015 Nov 06
2
How does -fPIE get passed from clang to llc when run on a .ll file?
...al_dat_x86_pie.ll) to llc how > would > > llc know that the PIE Level is 2? Is this an oversight, bug, or expetcted > > behaviour with a different workaround? > > It looks like it's the "-enable-pie" command line option, which gets > hooked up to TargetOptions::PositionIndependentExecutable if you're > doing it programmatically. I'm not sure of the history behind why > they're different though, I'm afraid. > > With 3.6 I get an unused argument warning with -enable-pie: $ clang -v -emit-llvm -enable-pie -O0 -S global_dat.c -o global_dat_x86_pie.ll clan...