rtld: do not refuse to relocate objects without dynamic symtabs.

Such objects can still have valid relocations not requiring symbolic
references.

PR:	249121
Reported by:	wsh@riski.sh
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
This commit is contained in:
Konstantin Belousov 2020-09-05 22:44:38 +00:00
parent 2b49b95cfa
commit 500433057e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=365369

View File

@ -3013,11 +3013,8 @@ relocate_object(Obj_Entry *obj, bool bind_now, Obj_Entry *rtldobj,
dbg("relocating \"%s\"", obj->path);
if (obj->symtab == NULL || obj->strtab == NULL ||
!(obj->valid_hash_sysv || obj->valid_hash_gnu)) {
_rtld_error("%s: Shared object has no run-time symbol table",
obj->path);
return (-1);
}
!(obj->valid_hash_sysv || obj->valid_hash_gnu))
dbg("object %s has no run-time symbol table", obj->path);
/* There are relocations to the write-protected text segment. */
if (obj->textrel && reloc_textrel_prot(obj, true) != 0)