This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Relocation Truncated to Fit: R_X86_64_PC32
- From: R0b0t1 <r030t1 at gmail dot com>
- To: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- Cc: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>, gcc-help <gcc-help at gcc dot gnu dot org>
- Date: Tue, 21 Aug 2018 13:43:13 -0500
- Subject: Re: Relocation Truncated to Fit: R_X86_64_PC32
- References: <CAAD4mYiFabBRH78HYMO+py7RHWnS1q4rTyHZr7eSX3wbXGn0_g@mail.gmail.com> <CAAD4mYhpYdL=QMbiH9Crb18vVxbrJT1Cne3gytWevoEFJFPVtw@mail.gmail.com> <CAH6eHdT4Znc3TiiN=d6eiabweUFu0ENWkMfgrK_uSC6YamyBYA@mail.gmail.com>
On Mon, Jul 30, 2018 at 6:28 PM, Jonathan Wakely <jwakely.gcc@gmail.com> wrote:
> On Mon, 30 Jul 2018 at 22:53, R0b0t1 <r030t1@gmail.com> wrote:
>>
>> On Mon, Jul 30, 2018 at 4:32 PM, R0b0t1 <r030t1@gmail.com> wrote:
>> > Hello list,
>> >
>> > I have been told to solve this error I should pass -fPIC and
>> > -mcmodel=large. I believe I understand the reasons.
>> >
>> > Sadly the error persists. Any advice?
>> >
>>
>> It looks like I may have to recompile everything with -mcmodel=large
>> (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=46125) which is rather
>> inconvenient in this case.
>>
>> If anyone has more information it may help.
>
> Your question is off-topic on the gcc list, I've CC'd the gcc-help
> list where it belongs. Please remove gcc@ from any further replies.
>
> -fPIC should be enough, you shouldn't need to change the code model.
Hello everyone, I'm adding a message to the gcc-devel list because I'd
appreciate some help figuring out if this is a bug. The issue was that
I was missing a linking directive to a library (-lwinpr). The message
does not seem to be reasonable in this context. I've also encountered
it when supplying potentially nonsensical arguments (e.g. link in this
dynamic library statically).
Cheers,
R0b0t1