Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SRVL alignment? #2

Open
spotlightishere opened this issue Aug 28, 2023 · 0 comments
Open

SRVL alignment? #2

spotlightishere opened this issue Aug 28, 2023 · 0 comments

Comments

@spotlightishere
Copy link
Owner

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)?;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant