Brandon Bergren 44c9aa49ea rtld: do not try to mmap a zero-sized PT_LOAD
When a PT_LOAD segment has a zero p_filesz, skip the data mmap, as mmapping
zero bytes from a file is an error.

A PT_LOAD with zero p_filesz is legal (but somewhat uncommon due to segment
merging in modern linkers, as it is more efficient to merge .data and .bss
by just extending p_memsz in the previous segment, assuming compatible
page protection.)

This was seen on ports/graphics/glew on a powerpc64 ELFv2 experimental
build.

Submitted by:	Alfredo Dal'Ava Junior <alfredo.junior@eldorado.org.br>
Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D22634
2019-12-12 17:40:32 +00:00
..
2019-12-11 17:37:53 +00:00
2019-12-11 17:37:53 +00:00
2019-12-01 08:04:22 +00:00
2018-03-05 16:11:07 +00:00
2019-11-12 22:31:59 +00:00
2017-10-31 00:07:04 +00:00
2019-12-04 16:56:11 +00:00
2017-10-31 00:07:04 +00:00
2019-12-11 17:37:53 +00:00
2019-12-11 17:37:53 +00:00