Skip to content

Commit 77cf494

Browse files
committed
Added patch files for disabling glibc security checks and net-next-nuse linker script py 2 to 3
Signed-off-by: Parth Pratim Chatterjee <[email protected]>
1 parent 57c8c60 commit 77cf494

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
diff --git a/elf/dl-load.c b/elf/dl-load.c
2+
index a6b80f9395..e7dca92238 100644
3+
--- a/elf/dl-load.c
4+
+++ b/elf/dl-load.c
5+
@@ -1205,9 +1205,7 @@ _dl_map_object_from_fd (const char *name, const char *origname, int fd,
6+
/* Make sure we are not dlopen'ing an object that has the
7+
DF_1_NOOPEN flag set, or a PIE object. */
8+
if ((__glibc_unlikely (l->l_flags_1 & DF_1_NOOPEN)
9+
- && (mode & __RTLD_DLOPEN))
10+
- || (__glibc_unlikely (l->l_flags_1 & DF_1_PIE)
11+
- && __glibc_unlikely ((mode & __RTLD_OPENEXEC) == 0)))
12+
+ && (mode & __RTLD_DLOPEN)))
13+
{
14+
/* We are not supposed to load this object. Free all resources. */
15+
_dl_unmap_segments (l);
16+
diff --git a/libio/vtables.c b/libio/vtables.c
17+
index 17f2e8e587..73e6906768 100644
18+
--- a/libio/vtables.c
19+
+++ b/libio/vtables.c
20+
@@ -69,7 +69,7 @@ _IO_vtable_check (void)
21+
return;
22+
#endif
23+
24+
- __libc_fatal ("Fatal error: glibc detected an invalid stdio handle\n");
25+
+ //__libc_fatal ("Fatal error: glibc detected an invalid stdio handle\n");
26+
}
27+
28+
/* Some variants of libstdc++ interpose _IO_2_1_stdin_ etc. and
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
diff --git a/arch/lib/generate-linker-script.py b/arch/lib/generate-linker-script.py
2+
index db3d7f8dab16..93971ee4871d 100755
3+
--- a/arch/lib/generate-linker-script.py
4+
+++ b/arch/lib/generate-linker-script.py
5+
@@ -1,4 +1,4 @@
6+
-#!/usr/bin/env python
7+
+#!/usr/bin/env python3
8+
9+
import re
10+

0 commit comments

Comments
 (0)