| 441 | |
| 442 | |
| 443 | class LoadSection32(LoadSection): |
| 444 | |
| 445 | # size 0x44 |
| 446 | def __init__(self, data): |
| 447 | super().__init__(data) |
| 448 | self.address = unpack("<L", self.FR.read(4))[0] |
| 449 | self.size = unpack("<L", self.FR.read(4))[0] |
| 450 | self.offset = unpack("<L", self.FR.read(4))[0] |
| 451 | self.alignment = unpack("<L", self.FR.read(4))[0] |
| 452 | self.relocations_offset = unpack("<L", self.FR.read(4))[0] |
| 453 | self.number_of_relocations = unpack("<L", self.FR.read(4))[0] |
| 454 | self.flags = unpack("<L", self.FR.read(4))[0] |
| 455 | self.reserved1 = unpack("<L", self.FR.read(4))[0] |
| 456 | self.reserved2 = unpack("<L", self.FR.read(4))[0] |
| 457 | |
| 458 | # def __str__(self): |
| 459 | # return (" Section name %s, Seg name %s, addr 0x%X, size 0x%X, offset 0x%X, align 0x%X, rel offset 0x%X, rel num %d, flags 0x%X" % ( |
| 460 | # self.section_name, self.segment_name, self.address, self.size, self.offset, self.alignment, self.relocations_offset, |
| 461 | # self.number_of_relocations, self.flags |
| 462 | # )) |
| 463 | |
| 464 | |
| 465 | class LoadSection64(LoadSection): |