Hi,
It is possible to add -no-pie gcc flag while generating the linux binary executable? or something
to avoid this error:
Symbol `exit' causes overflow in R_X86_64_PC32 relocation
Thanks,
PureBasic 5.31 linux GCC flags when generating executable
Re: PureBasic 5.31 linux GCC flags when generating executable
No sure, but you need only
in first lines
Code: Select all
Import "-no-pie"
endimport
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
Re: PureBasic 5.31 linux GCC flags when generating executable
Solved
Thank you





Thank you
Re: PureBasic 5.31 linux GCC flags when generating executable
I have similar issue and solution with allows to compile the code without error (mentioned below).
However created executable is not running and gives error.
I am running Ubuntu Linux 22.04 LTS, PureBasic 5.31.
Any idea how to solve that ?
Original issue when the Import is not used:
******************************************
PureBasic 5.31 (Linux - x64)
******************************************
Loading external modules...
Starting compilation...
27394 lines processed.
Creating the executable.
Error: Linker
/usr/bin/ld: purebasic.o: warning: relocation in read-only section `.text'
/usr/bin/ld: purebasic.o: relocation R_X86_64_PC32 against symbol `exit@@GLIBC_2.2.5' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
Code: Select all
Import "no-pie"
EndImport
However created executable is not running and gives error
Code: Select all
Illegal instruction (core dumped)
I am running Ubuntu Linux 22.04 LTS, PureBasic 5.31.
Any idea how to solve that ?
Original issue when the Import is not used:
******************************************
PureBasic 5.31 (Linux - x64)
******************************************
Loading external modules...
Starting compilation...
27394 lines processed.
Creating the executable.
Error: Linker
/usr/bin/ld: purebasic.o: warning: relocation in read-only section `.text'
/usr/bin/ld: purebasic.o: relocation R_X86_64_PC32 against symbol `exit@@GLIBC_2.2.5' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status