Skip to content

SRVL alignment? #2

@spotlightishere

Description

@spotlightishere

The SilverDB file internal to firmware 1.0.2 of the iPod nano 5th generation has odd alignment for the SRVL section: for it, and it alone, an extra 4 bytes of nulls pad it. It does not appear this matters per analysis of firmware, but nonetheless is somewhat confusing. Perhaps the wrong things are being padded?

As of writing, this is manually handled, but it'd be nice to understand why - even if it chalks down to being a generation quirk.

silverutil/src/format.rs

Lines 251 to 258 in 2a2ca15

// TODO(spotlightishere): It appears some sections require more than 4 bytes of alignment. Why?
// As observed by the internal "SRVL" section in firmware 1.0.2 of the iPod nano 5th generation,
// it has an extra four bytes of padding.
//
// We'll manually handle this.
if current_section.magic == [0x4C, 0x56, 0x52, 0x53] {
raw_data_writer.write_u32_le(0)?;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions