[Bug c++/35499] New: Symbol resolution optimization should be separately controlled from -fPIC

ddenisen at altera dot com gcc-bugzilla@gcc.gnu.org
Fri Mar 7 19:04:00 GMT 2008


I'm working on a large non-UI C++ program on Linux. It consists of hundreds of
SOs and takes a long time to run (hours). I'm seeing about 10% speedup if I do
*not* use -fPIC for some SOs (the executable never uses -fPIC of -fPIE) and,
since run-time is very important to me, I want to not use -fPIC for these SOs.

I noticed that besides not generating position-independent code, the way global
symbols are resolved also changes (a symbol that used to be resolved to a SO
where it is defined with -fPIC is resolved to the executable when I omit -fPIC
for that SO). That caused a breakage which is not hard to fix once I know which
symbol is affected. The problem is that the program has thousands of other
symbols and I don't know, without exhaustive testing, if any other symbol will
get broken.

It would be really nice if symbol resolution and position-independence were
controlled by separate flags.


-- 
           Summary: Symbol resolution optimization should be separately
                    controlled from -fPIC
           Product: gcc
           Version: 4.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: ddenisen at altera dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35499



More information about the Gcc-bugs mailing list