Explorar o código

+ AT_METADATA symbol type for data that is unrelated to the program
exectuion (such as debug information). It's handled the same as
AT_DATA by assemblers/assembler writers.

git-svn-id: trunk@34149 -

Jonas Maebe %!s(int64=9) %!d(string=hai) anos
pai
achega
5ac99f62e9
Modificáronse 4 ficheiros con 6 adicións e 3 borrados
  1. 2 0
      compiler/aasmbase.pas
  2. 1 1
      compiler/aggas.pas
  3. 2 1
      compiler/ogelf.pas
  4. 1 1
      compiler/ogmacho.pas

+ 2 - 0
compiler/aasmbase.pas

@@ -54,6 +54,8 @@ interface
            so it must be taken care of it when creating pic
          }
          AT_ADDR,
+         { Label for debug or other non-program information }
+         AT_METADATA,
          { Thread-local symbol (ELF targets) }
          AT_TLS,
          { GNU indirect function (ELF targets) }

+ 1 - 1
compiler/aggas.pas

@@ -563,7 +563,7 @@ implementation
                 assigned(hp.next) and
                  (tai(hp.next).typ in [ait_const,ait_datablock,ait_realconst])
               ) or
-              (hp.sym.typ=AT_DATA);
+              (hp.sym.typ in [AT_DATA,AT_METADATA]);
 
         end;
 

+ 2 - 1
compiler/ogelf.pas

@@ -1011,7 +1011,8 @@ implementation
             case objsym.typ of
               AT_FUNCTION :
                 elfsym.st_info:=elfsym.st_info or STT_FUNC;
-              AT_DATA :
+              AT_DATA,
+              AT_METADATA:
                 elfsym.st_info:=elfsym.st_info or STT_OBJECT;
               AT_TLS:
                 elfsym.st_info:=elfsym.st_info or STT_TLS;

+ 1 - 1
compiler/ogmacho.pas

@@ -558,7 +558,7 @@ uses
               end
             else if Assigned(ro.symbol.objsection) and
                     (ro.symbol.bind=AB_LOCAL) and
-                    (ro.symbol.typ=AT_DATA) then
+                    (ro.symbol.typ in [AT_DATA,AT_METADATA]) then
               begin
                 relextern:=false;
                 symnum:=TMachoObjSection(ro.symbol.objsection).inSegIdx;