Browse Source

* Section-offsets have 64 bits in the Dwarf-64 format

Joost van der Sluis 3 years ago
parent
commit
e547284588
1 changed files with 4 additions and 1 deletions
  1. 4 1
      compiler/dbgdwarf.pas

+ 4 - 1
compiler/dbgdwarf.pas

@@ -1354,7 +1354,10 @@ implementation
           append_labelentry_addr_ref(sym)
           append_labelentry_addr_ref(sym)
         else
         else
           begin
           begin
-            AddConstToAbbrev(ord(DW_FORM_ref4));
+            if use_64bit_headers then
+              AddConstToAbbrev(ord(DW_FORM_ref8))
+            else
+              AddConstToAbbrev(ord(DW_FORM_ref4));
             current_asmdata.asmlists[al_dwarf_info].concat(tai_const.create_rel_sym(offsetreltype,current_asmdata.DefineAsmSymbol(target_asm.labelprefix+'debug_info0',AB_LOCAL,AT_METADATA,voidpointertype),sym));
             current_asmdata.asmlists[al_dwarf_info].concat(tai_const.create_rel_sym(offsetreltype,current_asmdata.DefineAsmSymbol(target_asm.labelprefix+'debug_info0',AB_LOCAL,AT_METADATA,voidpointertype),sym));
           end;
           end;
       end;
       end;