loader: Protect preloader against ELF file without loadable segments (clang).
This commit is contained in:
parent
6a60266575
commit
7b544af170
|
@ -788,6 +788,8 @@ static void map_so_lib( const char *name, struct wld_link_map *l)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Now process the load commands and map segments into memory. */
|
/* Now process the load commands and map segments into memory. */
|
||||||
|
if (!nloadcmds)
|
||||||
|
fatal_error( "%s: no segments to load\n", name );
|
||||||
c = loadcmds;
|
c = loadcmds;
|
||||||
|
|
||||||
/* Length of the sections to be loaded. */
|
/* Length of the sections to be loaded. */
|
||||||
|
|
Loading…
Reference in New Issue