diff options
author | Freya Murphy <freya@freyacat.org> | 2024-10-04 22:09:01 -0400 |
---|---|---|
committer | Freya Murphy <freya@freyacat.org> | 2024-10-04 22:09:01 -0400 |
commit | 9ae3442c85196d7c25d9916520b0c19202a1dd40 (patch) | |
tree | c874aab2bf280872276d45f5decf5b7217f9998c /mld/link.c | |
parent | update mld,msim with new headers (diff) | |
download | mips-9ae3442c85196d7c25d9916520b0c19202a1dd40.tar.gz mips-9ae3442c85196d7c25d9916520b0c19202a1dd40.tar.bz2 mips-9ae3442c85196d7c25d9916520b0c19202a1dd40.zip |
fixed forced section padding in mld
Diffstat (limited to 'mld/link.c')
-rw-r--r-- | mld/link.c | 21 |
1 files changed, 0 insertions, 21 deletions
@@ -565,20 +565,6 @@ static void update_offsets(struct linker *linker) // sections for (uint32_t i = 0; i < linker->segments.len; i++) { struct segment_table_entry *ent = &linker->segments.entries[i]; - - // section padding - { - uint32_t m = ptr % SEC_ALIGN; - if (m) { - uint32_t add = SEC_ALIGN - m; - ptr += add; - ent->off = ptr; - ent->padding = add; - } else { - ent->padding = 0; - } - } - uint32_t idx = i + 1; uint32_t size = segtab_ent_size(ent); linker->phdr[i].p_offset = B32(ptr); @@ -634,13 +620,6 @@ static int write_file(struct linker *linker) // sections for (uint32_t i = 0; i < linker->segments.len; i++) { struct segment_table_entry *ent = &linker->segments.entries[i]; - // section padding - { - for (uint32_t i = 0; i < ent->padding; i++) { - uint8_t zero = 0; - res |= fwrite(&zero, 1, 1, out); - } - } for (uint32_t j = 0; j < ent->len; j++) { struct segment *seg = ent->parts[j]; res |= fwrite(seg->bytes, 1, seg->size, out); |