It is currently Thu Oct 18, 2018 10:20 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: [5.46 LTS x64] Linker error with DataSection and dylib
PostPosted: Thu Feb 08, 2018 11:58 am 
Offline
Addict
Addict
User avatar

Joined: Mon Jun 06, 2005 2:35 pm
Posts: 1182
Location: germany
Hi,

Being on Mac OS High Sierra (10.13) using PB 5.46 LTS x64. If I try to compile this source as library (.dylib), I get an error:

Code:
DataSection
  Data.a 0
EndDateSection

Error:
Quote:
ld: warning: -read_only_relocs cannot be used with x86_64
ld: illegal text-relocation to 'PB_DataSectionStart' in purebasic.o from '_PB_StartFunctions' in purebasic.o for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

It does not matter if I use Data.a or any other data type like .i or even String.

If I try to use IncludeBinary or such, it is no problem. It just don't likes Data in here.


Top
 Profile  
Reply with quote  
 Post subject: Re: [5.46 LTS x64] Linker error with DataSection and dylib
PostPosted: Mon Mar 05, 2018 11:44 am 
Offline
Addict
Addict
User avatar

Joined: Mon Jun 06, 2005 2:35 pm
Posts: 1182
Location: germany
Sorry for bringing this up again, but is the Data keyword in 64 bit dylib not allowed or is it a bug? Is at least someone able to reproduce the issue?


Top
 Profile  
Reply with quote  
 Post subject: Re: [5.46 LTS x64] Linker error with DataSection and dylib
PostPosted: Mon Mar 05, 2018 11:52 pm 
Offline
Addict
Addict
User avatar

Joined: Fri May 12, 2006 6:51 pm
Posts: 1413
Location: Germany
Same bug
Quote:
ld: warning: -read_only_relocs cannot be used with x86_64
ld: illegal text-relocation to 'PB_DataSectionStart' in purebasic.o from '_PB_StartFunctions' in purebasic.o for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)


Code:
ProcedureDLL foo()
  Protected r1
  Read.i r1
  ProcedureReturn r1 
EndProcedure

DataSection
  test:
  Data.i 0, 10, 20
EndDataSection


_________________
My Projects OOP-BaseClass / OOP-BaseClassDispatch / Event-Designer /
PB v3.30 / v5.60 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace


Top
 Profile  
Reply with quote  
 Post subject: Re: [5.46 LTS x64] Linker error with DataSection and dylib
PostPosted: Tue Mar 06, 2018 8:10 am 
Offline
Addict
Addict
User avatar

Joined: Mon Jun 06, 2005 2:35 pm
Posts: 1182
Location: germany
Thanks mk-soft,

what PB version did you use?


Top
 Profile  
Reply with quote  
 Post subject: Re: [5.46 LTS x64] Linker error with DataSection and dylib
PostPosted: Tue Mar 06, 2018 10:18 pm 
Offline
Addict
Addict
User avatar

Joined: Fri May 12, 2006 6:51 pm
Posts: 1413
Location: Germany
Version:
- PB v5.62
- macOS 10.13.3

_________________
My Projects OOP-BaseClass / OOP-BaseClassDispatch / Event-Designer /
PB v3.30 / v5.60 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye