This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Add -fsection-anchors (4.2 project)


Thanks for the feedback.

Hans-Peter Nilsson <hp@bitrange.com> writes:
> How can this change affect GOT sizes, *generally*?
> Variables a, b, c do not need separate GOT entries when static.

In general, whether static variables need separate GOT entries
(or indeed any GOT entries) depends on the ABI and whether you're
generating PIC.

> If you actually apply this transformation for non-static
> non-hidden variables too, then I think it isn't safe for
> -fpic/-fPIC: non-hidden variables and functions must be
> individually overridable.  A quick grep in your patch shows that
> it doesn't test flag_pic.  Dunno if that's covered by other
> means.

Yeah, it's covered by the more general targetm.binds_local_p check
in the default implementation of targetm.use_anchors_for_symbol_p.

Richard


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]