diff options
author | jonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2015-01-21 23:28:34 +0000 |
---|---|---|
committer | jonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2015-01-21 23:28:34 +0000 |
commit | 1903b037de2fb3e75826406b46f055acb70963fa (patch) | |
tree | 604cd8b790fe14e5fbe441d4cd647c80d2a36a9a /compiler/x86/agx86att.pas | |
parent | ad1141d52f8353457053b925cd674fe1d5c4eafc (diff) | |
parent | 953d907e4d6c3a5c2f8aaee6e5e4f73c55ce5985 (diff) | |
download | fpc-blocks.tar.gz |
* synchronised with trunk till r29513blocks
git-svn-id: http://svn.freepascal.org/svn/fpc/branches/blocks@29516 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'compiler/x86/agx86att.pas')
-rw-r--r-- | compiler/x86/agx86att.pas | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/compiler/x86/agx86att.pas b/compiler/x86/agx86att.pas index 3c58323d9c..ab2970b762 100644 --- a/compiler/x86/agx86att.pas +++ b/compiler/x86/agx86att.pas @@ -163,18 +163,19 @@ interface if assigned(relsymbol) then owner.AsmWrite('-'+relsymbol.name); if ref.refaddr=addr_pic then -{$ifdef x86_64} begin - { local symbols don't have to (and in case of Mac OS X: cannot) - be accessed via the GOT - } - if not assigned(ref.symbol) or - (ref.symbol.bind<>AB_LOCAL) then - owner.AsmWrite('@GOTPCREL'); - end; + { @GOT and @GOTPCREL references are only allowed for symbol alone, + indexing, relsymbol or offset cannot be present. } + if assigned(relsymbol) or (offset<>0) or (index<>NR_NO) then + InternalError(2015011801); +{$ifdef x86_64} + if (base<>NR_RIP) then + InternalError(2015011802); + owner.AsmWrite('@GOTPCREL'); {$else x86_64} - owner.AsmWrite('@GOT'); + owner.AsmWrite('@GOT'); {$endif x86_64} + end; if offset<0 then owner.AsmWrite(tostr(offset)) else @@ -469,7 +470,8 @@ interface asmcmd : '--64 -o $OBJ $EXTRAOPT $ASM'; supported_targets : [system_x86_64_linux,system_x86_64_freebsd, system_x86_64_win64,system_x86_64_embedded, - system_x86_64_openbsd,system_x86_64_netbsd]; + system_x86_64_openbsd,system_x86_64_netbsd, + system_x86_64_dragonfly]; flags : [af_needar,af_smartlink_sections,af_supports_dwarf]; labelprefix : '.L'; comment : '# '; @@ -527,7 +529,7 @@ interface supported_targets : [system_i386_GO32V2,system_i386_linux,system_i386_Win32,system_i386_freebsd,system_i386_solaris,system_i386_beos, system_i386_netbsd,system_i386_Netware,system_i386_qnx,system_i386_wdosx,system_i386_openbsd, system_i386_netwlibc,system_i386_wince,system_i386_embedded,system_i386_symbian,system_i386_haiku,system_x86_6432_linux, - system_i386_nativent,system_i386_android]; + system_i386_nativent,system_i386_android,system_i386_aros]; flags : [af_needar,af_smartlink_sections,af_supports_dwarf]; labelprefix : '.L'; comment : '# '; |