mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-19 13:47:56 +00:00
parent
e199acca05
commit
52ec4526e1
@ -1 +1 @@
|
||||
60a83fda51da9b110e8b857e557f737a8310d00c
|
||||
9252999ee23cfb811e707887ef05bf1283a41597
|
||||
|
63
repos/libports/src/lib/libc/patches/cdefs_no_hidden.patch
Normal file
63
repos/libports/src/lib/libc/patches/cdefs_no_hidden.patch
Normal file
@ -0,0 +1,63 @@
|
||||
Prevent the use of the hidden attribute for symbols. In particular,
|
||||
the attribute must not be applied to '__libc'-prefixed symbols to allow
|
||||
overwriting the dummies defined in dummies.cc by other non-weak
|
||||
implementations such as those in 'libc_noux.lib.so'.
|
||||
|
||||
This attribute is applied inconsistently in
|
||||
libc/lib/libc/include/libc_private.h anyway.
|
||||
|
||||
Also, force i386 to call __libc_sigprocmask via PLT to prevent
|
||||
R_386_PC32 relocations, which had to change the text segment. Other
|
||||
architectures do this automatically.
|
||||
|
||||
--- src/lib/libc/sys/sys/cdefs.h
|
||||
+++ src/lib/libc/sys/sys/cdefs.h
|
||||
@@ -447,7 +447,7 @@
|
||||
#if __GNUC_PREREQ__(4, 0)
|
||||
#define __null_sentinel __attribute__((__sentinel__))
|
||||
#define __exported __attribute__((__visibility__("default")))
|
||||
-#define __hidden __attribute__((__visibility__("hidden")))
|
||||
+#define __hidden
|
||||
#else
|
||||
#define __null_sentinel
|
||||
#define __exported
|
||||
--- src/lib/libc/lib/libc/i386/gen/setjmp.S
|
||||
+++ src/lib/libc/lib/libc/i386/gen/setjmp.S
|
||||
@@ -54,7 +54,7 @@
|
||||
pushl %eax /* (sigset_t*)oset */
|
||||
pushl $0 /* (sigset_t*)set */
|
||||
pushl $1 /* SIG_BLOCK */
|
||||
- call __libc_sigprocmask
|
||||
+ call __i386_libc_sigprocmask
|
||||
addl $12,%esp
|
||||
movl 4(%esp),%ecx
|
||||
movl 0(%esp),%edx
|
||||
@@ -76,7 +76,7 @@
|
||||
leal 28(%edx), %eax
|
||||
pushl %eax /* (sigset_t*)set */
|
||||
pushl $3 /* SIG_SETMASK */
|
||||
- call __libc_sigprocmask
|
||||
+ call __i386_libc_sigprocmask
|
||||
addl $12,%esp
|
||||
movl 4(%esp),%edx
|
||||
movl 8(%esp),%eax
|
||||
--- src/lib/libc/lib/libc/i386/gen/sigsetjmp.S
|
||||
+++ src/lib/libc/lib/libc/i386/gen/sigsetjmp.S
|
||||
@@ -63,7 +63,7 @@
|
||||
pushl %eax /* (sigset_t*)oset */
|
||||
pushl $0 /* (sigset_t*)set */
|
||||
pushl $1 /* SIG_BLOCK */
|
||||
- call __libc_sigprocmask
|
||||
+ call __i386_libc_sigprocmask
|
||||
addl $12,%esp
|
||||
movl 4(%esp),%ecx
|
||||
2: movl 0(%esp),%edx
|
||||
@@ -87,7 +87,7 @@
|
||||
leal 28(%edx), %eax
|
||||
pushl %eax /* (sigset_t*)set */
|
||||
pushl $3 /* SIG_SETMASK */
|
||||
- call __libc_sigprocmask
|
||||
+ call __i386_libc_sigprocmask
|
||||
addl $12,%esp
|
||||
movl 4(%esp),%edx
|
||||
2: movl 8(%esp),%eax
|
@ -55,6 +55,14 @@ int __libc_sigprocmask(int how, const sigset_t *set, sigset_t *old) {
|
||||
return sigprocmask(how, set, old); }
|
||||
|
||||
|
||||
/* wrapper from text-relocated i386-assembler call to PLT call */
|
||||
extern "C" int __i386_libc_sigprocmask(int how, const sigset_t *set, sigset_t *old) __attribute__((visibility("hidden")));
|
||||
extern "C" int __i386_libc_sigprocmask(int how, const sigset_t *set, sigset_t *old)
|
||||
{
|
||||
return __libc_sigprocmask(how, set, old);
|
||||
}
|
||||
|
||||
|
||||
extern "C" __attribute__((weak))
|
||||
pid_t wait4(pid_t, int *, int, struct rusage *)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user