------- Comment #7 from dave at hiauly1 dot hia dot nrc dot ca 2008-11-19 14:51 ------- Subject: Re: gcc.dg/tree-ssa/ssa-store-ccp-3.c scan-tree-dump-times optimized "conststaticvariable" 1
> ------- Comment #6 from jakub at gcc dot gnu dot org 2008-11-18 23:17 ------- > IMHO if a target generates position independent code by default, but not > flag_shlib by default, then it should define __pie__ and/or __PIE__ macro, but > not __pic__ and/or __PIC__, as the latter implies both flag_pic and > flag_shlib, > while the former only pic code, which can't be overridden. > Clearing "4.4 Regression", as per #c4 and #c5. Defining __pie__ and/or __PIE__ would appear somewhat misleading as HP-UX ld and dld.sl don't support position-independent executables. All executables are linked to start at a fixed address. On linux, PIE excutables are supported. In the 32-bit runtime, the linker converts memory accesses using the PIC register to accesses using the global pointer when an PIC object is linked into a final executable. The global pointer and the PIC register are the same in the 64-bit runtime, so this isn't needed. However, in both cases, a "PIC" object can be linked into a final executable. Thus, we need to distinguish "PIC" code compiled for linking into a shared library from "PIC" code compiled for linking into a final executable. We also need PIE suport for linux. Dave -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37326