Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F150950119
D8625.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D8625.id.diff
View Options
Index: head/libexec/rtld-elf/mips/reloc.c
===================================================================
--- head/libexec/rtld-elf/mips/reloc.c
+++ head/libexec/rtld-elf/mips/reloc.c
@@ -240,10 +240,17 @@
Elf_Addr *got = obj->pltgot;
const Elf_Sym *def;
const Obj_Entry *defobj;
+ Elf_Addr *where;
Elf_Addr target;
+ RtldLockState lockstate;
+ rlock_acquire(rtld_bind_lock, &lockstate);
+ if (sigsetjmp(lockstate.env, 0) != 0)
+ lock_upgrade(rtld_bind_lock, &lockstate);
+
+ where = &got[obj->local_gotno + reloff - obj->gotsym];
def = find_symdef(reloff, obj, &defobj, SYMLOOK_IN_PLT, NULL,
- NULL);
+ &lockstate);
if (def == NULL)
rtld_die();
@@ -251,9 +258,9 @@
dbg("bind now/fixup at %s sym # %jd in %s --> was=%p new=%p",
obj->path,
(intmax_t)reloff, defobj->strtab + def->st_name,
- (void *)got[obj->local_gotno + reloff - obj->gotsym],
- (void *)target);
- got[obj->local_gotno + reloff - obj->gotsym] = target;
+ (void *)*where, (void *)target);
+ *where = target;
+ lock_release(rtld_bind_lock, &lockstate);
return (Elf_Addr)target;
}
Index: head/libexec/rtld-elf/rtld.c
===================================================================
--- head/libexec/rtld-elf/rtld.c
+++ head/libexec/rtld-elf/rtld.c
@@ -695,6 +695,10 @@
return ((void *)target);
}
+/*
+ * NB: MIPS uses a private version of this function (_mips_rtld_bind).
+ * Changes to this function should be applied there as well.
+ */
Elf_Addr
_rtld_bind(Obj_Entry *obj, Elf_Size reloff)
{
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Apr 6, 3:47 AM (5 h, 41 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30934826
Default Alt Text
D8625.id.diff (1 KB)
Attached To
Mode
D8625: Fix _mips_rtld_bind() to handle ELF filters.
Attached
Detach File
Event Timeline
Log In to Comment