From ce3f850a684966479d9417aa5750db36c683949f Mon Sep 17 00:00:00 2001 From: sergei Date: Wed, 9 Nov 2011 05:12:59 +0000 Subject: [PATCH] * x86_64, use rip-relative references when taking address of local code labels, fixes test/library/tlib1a.pp for Linux and FreeBSD and passing exception address to FPC_RAISEEXCEPTION on Darwin. git-svn-id: trunk@19616 - --- compiler/x86/cgx86.pas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/x86/cgx86.pas b/compiler/x86/cgx86.pas index d27221f9df..7253c3da03 100644 --- a/compiler/x86/cgx86.pas +++ b/compiler/x86/cgx86.pas @@ -935,7 +935,7 @@ unit cgx86; else if (cs_create_pic in current_settings.moduleswitches) {$ifdef x86_64} and not((ref.symbol.bind=AB_LOCAL) and - (ref.symbol.typ=AT_DATA)) + (ref.symbol.typ in [AT_DATA,AT_LABEL,AT_ADDR])) {$endif x86_64} then begin