Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F178136978
D22634.1796078204.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
890 B
Referenced Files
None
Subscribers
None
D22634.1796078204.diff
View Options
Index: head/libexec/rtld-elf/map_object.c
===================================================================
--- head/libexec/rtld-elf/map_object.c
+++ head/libexec/rtld-elf/map_object.c
@@ -228,11 +228,12 @@
data_addr = mapbase + (data_vaddr - base_vaddr);
data_prot = convert_prot(segs[i]->p_flags);
data_flags = convert_flags(segs[i]->p_flags) | MAP_FIXED;
- if (mmap(data_addr, data_vlimit - data_vaddr, data_prot,
- data_flags | MAP_PREFAULT_READ, fd, data_offset) == (caddr_t) -1) {
- _rtld_error("%s: mmap of data failed: %s", path,
- rtld_strerror(errno));
- goto error1;
+ if (data_vlimit != data_vaddr &&
+ mmap(data_addr, data_vlimit - data_vaddr, data_prot,
+ data_flags | MAP_PREFAULT_READ, fd, data_offset) == MAP_FAILED) {
+ _rtld_error("%s: mmap of data failed: %s", path,
+ rtld_strerror(errno));
+ goto error1;
}
/* Do BSS setup */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 30, 10:36 PM (18 h, 39 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
42114243
Default Alt Text
D22634.1796078204.diff (890 B)
Attached To
Mode
D22634: rtld: do not try to mmap a zero-sized PT_LOAD
Attached
Detach File
Event Timeline