https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63435

--- Comment #5 from Jan Hubicka <hubicka at ucw dot cz> ---
There are three problems in 4.9 and earlier
  - the aliases are produced incorrectly because AIX's as alias keyword does
not do what is expected
    (it does kind of syntactic replacement combined with something else)
  - MAKE_ONE_ONLY is not defined making compiler to believe that linker does
    not perfrom garbage collection
  - Linker's garbage collection was disabled, so in particular all duplicated
comdats stays
    in the code.

Lack of MAKE_ONE_ONLY makes GCC to produce a lot more local aliases, because it
makes sense to refer to a function by local relocation instead of lgobal when
we know it is going to stay. Together with the as issue this leads to wrong
code.

You can work around by forcing local alias to return NULL for AIX to disable
some
of local aliases.  There are other two cases where GCC produce such symbols (in
addition of user declaring it by hand in source code via the alias attribute).
It
is the thunk generation (I suppose this one works as it is there for ages)
and the new comdat local code in C++ (that is used only by -Os codegen path at
4.9).

Reply via email to