PATCH: PR gold/16945: Executable with -fpie and -mcmodel=large gives segfault on start
H.J. Lu
hjl.tools@gmail.com
Tue May 27 19:24:00 GMT 2014
On Tue, May 27, 2014 at 10:16 AM, Cary Coutant <ccoutant@google.com> wrote:
>> I just don't get why got_offset sometimes "unsigned int", sometimes
>> "section_offset_type" and now "int". I guess it's just a little mess.
>> I believe that the right way is having it as "ptrdiff", which is the
>> same "section_offset_type".
>
> Symbol::got_offset() returns an unsigned int, since it's always a
> non-negative offset from the beginning of the section. In
> Target_xxx::Relocate::relocate(), we change it to be a negative offset
> from the end of the section, so it really should be signed at that
> point. Whether we use int or section_offset_type or ptrdiff_t is, I
> think, a minor point. Without modifying the type throughout, we can't
> handle a GOT offset larger than an int anyway, so I think int is fine
> here.
>
I checked my patch into master. Can I backport it to 2.24 branch?
Thanks,
--
H.J.
More information about the Binutils
mailing list