Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F148125610
D15341.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D15341.id.diff
View Options
Index: head/libexec/rtld-elf/Makefile
===================================================================
--- head/libexec/rtld-elf/Makefile
+++ head/libexec/rtld-elf/Makefile
@@ -51,7 +51,7 @@
CFLAGS.reloc.c+=-fno-jump-tables
.endif
LDFLAGS+= -shared -Wl,-Bsymbolic -Wl,-z,defs
-LIBADD= c_pic
+LIBADD= c_nossp_pic
.if ${MK_TOOLCHAIN} == "no"
LDFLAGS+= -L${LIBCDIR}
.endif
Index: head/libexec/rtld-elf/rtld.c
===================================================================
--- head/libexec/rtld-elf/rtld.c
+++ head/libexec/rtld-elf/rtld.c
@@ -238,8 +238,6 @@
int npagesizes, osreldate;
size_t *pagesizes;
-long __stack_chk_guard[8] = {0, 0, 0, 0, 0, 0, 0, 0};
-
static int stack_prot = PROT_READ | PROT_WRITE | RTLD_DEFAULT_STACK_EXEC;
static int max_stack_flags;
@@ -360,8 +358,7 @@
char **argv, *argv0, **env, **envp, *kexecpath, *library_path_rpath;
caddr_t imgentry;
char buf[MAXPATHLEN];
- int argc, fd, i, mib[2], phnum, rtld_argc;
- size_t len;
+ int argc, fd, i, phnum, rtld_argc;
bool dir_enable, explicit_fd, search_in_path;
/*
@@ -399,27 +396,6 @@
main_argc = argc;
main_argv = argv;
- if (aux_info[AT_CANARY] != NULL &&
- aux_info[AT_CANARY]->a_un.a_ptr != NULL) {
- i = aux_info[AT_CANARYLEN]->a_un.a_val;
- if (i > sizeof(__stack_chk_guard))
- i = sizeof(__stack_chk_guard);
- memcpy(__stack_chk_guard, aux_info[AT_CANARY]->a_un.a_ptr, i);
- } else {
- mib[0] = CTL_KERN;
- mib[1] = KERN_ARND;
-
- len = sizeof(__stack_chk_guard);
- if (sysctl(mib, 2, __stack_chk_guard, &len, NULL, 0) == -1 ||
- len != sizeof(__stack_chk_guard)) {
- /* If sysctl was unsuccessful, use the "terminator canary". */
- ((unsigned char *)(void *)__stack_chk_guard)[0] = 0;
- ((unsigned char *)(void *)__stack_chk_guard)[1] = 0;
- ((unsigned char *)(void *)__stack_chk_guard)[2] = '\n';
- ((unsigned char *)(void *)__stack_chk_guard)[3] = 255;
- }
- }
-
trust = !issetugid();
md_abi_variant_hook(aux_info);
@@ -5535,23 +5511,6 @@
void
__pthread_cxa_finalize(struct dl_phdr_info *a)
{
-}
-
-void
-__stack_chk_fail(void)
-{
-
- _rtld_error("stack overflow detected; terminated");
- rtld_die();
-}
-__weak_reference(__stack_chk_fail, __stack_chk_fail_local);
-
-void
-__chk_fail(void)
-{
-
- _rtld_error("buffer overflow detected; terminated");
- rtld_die();
}
const char *
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Mar 16, 11:27 PM (13 h, 57 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29752813
Default Alt Text
D15341.id.diff (2 KB)
Attached To
Mode
D15341: Updated rtld to use libc_nossp_pic.a
Attached
Detach File
Event Timeline
Log In to Comment