FreeBSD Bugzilla – Attachment 199379 Details for
Bug 233333
Building libc WITH_BIND_NOW results in segfault at process start
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Process plt irelocs together with other relocs early if LD_BIND_NOW is set.
1.patch (text/plain), 1.13 KB, created by
Konstantin Belousov
on 2018-11-20 12:21:20 UTC
(
hide
)
Description:
Process plt irelocs together with other relocs early if LD_BIND_NOW is set.
Filename:
MIME Type:
Creator:
Konstantin Belousov
Created:
2018-11-20 12:21:20 UTC
Size:
1.13 KB
patch
obsolete
>diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c >index 393afff2d66..b78dc84fe31 100644 >--- a/libexec/rtld-elf/rtld.c >+++ b/libexec/rtld-elf/rtld.c >@@ -142,6 +142,7 @@ static int relocate_object(Obj_Entry *obj, bool bind_now, Obj_Entry *rtldobj, > int flags, RtldLockState *lockstate); > static int relocate_objects(Obj_Entry *, bool, Obj_Entry *, int, > RtldLockState *); >+static int resolve_object_ifunc(Obj_Entry *, bool, int, RtldLockState *); > static int resolve_objects_ifunc(Obj_Entry *first, bool bind_now, > int flags, RtldLockState *lockstate); > static int rtld_dirname(const char *, char *); >@@ -2885,9 +2886,11 @@ relocate_object(Obj_Entry *obj, bool bind_now, Obj_Entry *rtldobj, > if (reloc_plt(obj) == -1) > return (-1); > /* Relocate the jump slots if we are doing immediate binding. */ >- if (obj->bind_now || bind_now) >- if (reloc_jmpslots(obj, flags, lockstate) == -1) >+ if (obj->bind_now || bind_now) { >+ if (reloc_jmpslots(obj, flags, lockstate) == -1 || >+ resolve_object_ifunc(obj, true, flags, lockstate) == -1) > return (-1); >+ } > > /* > * Process the non-PLT IFUNC relocations. The relocations are
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 233333
: 199379 |
199380