Compile/Link problem x86

OpenVMS x86 native compilers, cross compilers news and questions.
Post Reply

Topic author
psk
Newbie
Posts: 4
Joined: Thu Nov 21, 2019 4:48 am
Reputation: 0
Location: Sweden
Status: Offline

Compile/Link problem x86

Post by psk » Fri Dec 30, 2022 11:58 am

Hi,
I have started to build some code, a c++ library, on VMSx86 and the compilations went ok, more o less, but I get this error when linking the test program:

%ILINK-E-PCRELNOT32BITS, 32-bit PC-relative relocation overflowed
relocation section: .rela.text (section header entry: 3)
relocation type: RELA$K_R_X86_64_PC32
relocation entry: 3996
module: VSTRING
file: VLIBPLF_ROOT:[lib]libvlib.olb;1
%ILINK-E-NOIMGFIL, image file not created

I compile with pointer size 32 but also tried 64.
The vstring.cpp module is quite large, are there any limitations on x86?
Hopefully somebody can give me a hint what it can be.

I'm using cxx (clang) version 10.0.1 on OpenVMS V9.2 update 2.

Thanks in advance
Peter


sergey_vorfolomeev
VSI Expert
Valued Contributor
Posts: 75
Joined: Thu Aug 22, 2019 12:17 am
Reputation: 0
Status: Offline

Re: Compile/Link problem x86

Post by sergey_vorfolomeev » Sat Dec 31, 2022 9:31 am

$ LINK /SECT=CODE=P0


Topic author
psk
Newbie
Posts: 4
Joined: Thu Nov 21, 2019 4:48 am
Reputation: 0
Location: Sweden
Status: Offline

Re: Compile/Link problem x86

Post by psk » Mon Jan 02, 2023 3:36 am

sergey_vorfolomeev wrote:
Sat Dec 31, 2022 9:31 am
$ LINK /SECT=CODE=P0
Thanks Sergey, but I i think you mean /segm=code=p0 and that helped!
I read the new linker manual but this was not obvious for me. Do you know where I can find more info?
Are there any disadvantages placing the code in p0?

Thanks Peter

Post Reply