Beispiel #1
0
 def add_dt_symtab(self, op):
   """Add symtab dynamic structure."""
   d_tag = AssemblerVariable(("d_tag, DT_SYMTAB = 6", PlatformVar("addr"), 6))
   d_un = AssemblerVariable(("d_un", PlatformVar("addr"), op))
   self.__data[0:0] = [d_tag, d_un]
   self.refresh_name_label()
Beispiel #2
0
 def add_strtab(self, op):
   """Add a library name."""
   libname = AssemblerVariable(("symbol name string", 1, "\"%s\"" % op), labelify(op))
   terminator = AssemblerVariable(("string terminating zero", 1, 0))
   self.__data[1:1] = [libname, terminator]
   self.refresh_name_end_label()
Beispiel #3
0
 def add_dt_needed(self, op):
   """Add requirement to given library."""
   d_tag = AssemblerVariable(("d_tag, DT_NEEDED = 1", PlatformVar("addr"), 1))
   d_un = AssemblerVariable(("d_un, library name offset in strtab", PlatformVar("addr"), "strtab_%s - strtab" % labelify(op)))
   self.__data[0:0] = [d_tag, d_un]
   self.refresh_name_label()
Beispiel #4
0
 def add_dt_hash(self, op):
   """Add hash dynamic structure."""
   d_tag = AssemblerVariable(("d_tag, DT_HASH = 4", PlatformVar("addr"), 4))
   d_un = AssemblerVariable(("d_un", PlatformVar("addr"), op))
   self.__data[0:0] = [d_tag, d_un]
   self.refresh_name_label()
Beispiel #5
0
 def add_data(self, op):
   """Add data into this segment."""
   self.__data += [AssemblerVariable(op)]
   self.refresh_name_label()
   self.refresh_name_end_label()
Beispiel #6
0
 def add_dt_symtab(self, op):
     """Add symtab dynamic structure."""
     d_tag = AssemblerVariable(
         ("d_tag, DT_SYMTAB = 6", PlatformVar("addr"), 6))
     d_un = AssemblerVariable(("d_un", PlatformVar("addr"), op))
     self.add_dt_element(d_tag, d_un)
Beispiel #7
0
 def add_dt_hash(self, op):
     """Add hash dynamic structure."""
     d_tag = AssemblerVariable(
         ("d_tag, DT_HASH = 4", PlatformVar("addr"), 4))
     d_un = AssemblerVariable(("d_un", PlatformVar("addr"), op))
     self.add_dt_element(d_tag, d_un)