Document ELF PT_LOAD difference from Linux

PiperOrigin-RevId: 284191345
This commit is contained in:
Michael Pratt 2019-12-06 08:35:18 -08:00 committed by gVisor bot
parent 40035d7d9c
commit f8bb3f7904
1 changed files with 2 additions and 0 deletions

View File

@ -408,6 +408,8 @@ func loadParsedELF(ctx context.Context, m *mm.MemoryManager, f *fs.File, info el
start = vaddr
}
if vaddr < end {
// NOTE(b/37474556): Linux allows out-of-order
// segments, in violation of the spec.
ctx.Infof("PT_LOAD headers out-of-order. %#x < %#x", vaddr, end)
return loadedELF{}, syserror.ENOEXEC
}