Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
smira committed Jan 8, 2025
1 parent 1621f41 commit d287b3f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/pkg/secureboot/uki/internal/pe/pe.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,8 @@ func AssembleNative(srcPath, dstPath, arch string, sections []Section) error {
newHeader := *header
newHeader.SizeOfCode = (newHeader.SizeOfCode + uint32(fileAlignment)) &^ uint32(fileAlignment)
newHeader.SizeOfInitializedData = (newHeader.SizeOfInitializedData + uint32(fileAlignment)) &^ uint32(fileAlignment)
newHeader.MajorLinkerVersion = 2
newHeader.MinorLinkerVersion = 43

newSections := slices.Clone(peFile.Sections)

Expand Down
3 changes: 3 additions & 0 deletions internal/pkg/secureboot/uki/internal/pe/pe_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,5 +73,8 @@ func TestAssembleNative(t *testing.T) {

assert.Equal(t, string(outputObjcopy), string(outputNative))

outputDiffoscope, err := exec.Command("diffoscope", outObjcopy, outNative).CombinedOutput()
require.NoError(t, err, string(outputDiffoscope))

t.Fail()
}

0 comments on commit d287b3f

Please sign in to comment.