From 4f8baf29c6bcef18486d6a9eeb1bb33f5b107950 Mon Sep 17 00:00:00 2001 From: nickysn Date: Wed, 13 Jan 2016 15:07:41 +0000 Subject: [PATCH] + handle RELOC_FARPTR48 relocations as well in TOmfObjData.writeReloc; this is not used yet, but is added for completeness (and might be useful, if we add an i386 target, that uses the OMF object format) git-svn-id: trunk@32935 - --- compiler/ogomf.pas | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/compiler/ogomf.pas b/compiler/ogomf.pas index 267ab5c8a3..a548cceeb4 100644 --- a/compiler/ogomf.pas +++ b/compiler/ogomf.pas @@ -569,12 +569,21 @@ implementation objreloc: TOmfRelocation; symaddr: AWord; begin - { RELOC_FARPTR = RELOC_ABSOLUTE+RELOC_SEG } + { RELOC_FARPTR = RELOC_ABSOLUTE16+RELOC_SEG } if Reloctype=RELOC_FARPTR then begin if len<>4 then internalerror(2015041502); - writeReloc(Data,2,p,RELOC_ABSOLUTE); + writeReloc(Data,2,p,RELOC_ABSOLUTE16); + writeReloc(0,2,p,RELOC_SEG); + exit; + end + { RELOC_FARPTR48 = RELOC_ABSOLUTE16+RELOC_SEG } + else if Reloctype=RELOC_FARPTR48 then + begin + if len<>6 then + internalerror(2015041502); + writeReloc(Data,4,p,RELOC_ABSOLUTE32); writeReloc(0,2,p,RELOC_SEG); exit; end;