Added exe package to manage sections

This commit is contained in:
2025-03-08 22:14:24 +01:00
parent 919d94e0f4
commit b67f3b0977
16 changed files with 207 additions and 134 deletions

View File

@ -1,7 +0,0 @@
package fs
// Align calculates the next aligned address and the padding needed.
func Align[T int | uint | int64 | uint64 | int32 | uint32](n T, alignment T) (T, T) {
aligned := (n + (alignment - 1)) & ^(alignment - 1)
return aligned, aligned - n
}