summaryrefslogtreecommitdiffhomepage
path: root/crt/nt64
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2019-02-02 03:26:50 -0500
committermidipix <writeonce@midipix.org>2019-02-19 14:48:49 -0500
commitbf03fc48770a82832570488812c8beedc70c36e4 (patch)
tree8e5f58aff76e948d92cb8bceb91d945b10303230 /crt/nt64
parent89292f385435ef4e4fdd8f472367035503c3634e (diff)
downloadmmglue-bf03fc48770a82832570488812c8beedc70c36e4.tar.bz2
mmglue-bf03fc48770a82832570488812c8beedc70c36e4.tar.xz
process init: apply hidden visibility to all [S]crt*.o files.
Diffstat (limited to 'crt/nt64')
-rw-r--r--crt/nt64/Scrt1.c10
-rw-r--r--crt/nt64/Scrtldso.c5
-rw-r--r--crt/nt64/Scrtvrfs.c5
-rw-r--r--crt/nt64/crt1.c16
-rw-r--r--crt/nt64/crtdinga.c3
-rw-r--r--crt/nt64/crtinit.h2
-rw-r--r--crt/nt64/crtldso.c5
-rw-r--r--crt/nt64/crtposix.c3
-rw-r--r--crt/nt64/crtvrfs.c5
9 files changed, 33 insertions, 21 deletions
diff --git a/crt/nt64/Scrt1.c b/crt/nt64/Scrt1.c
index d8ccb17..6a0c031 100644
--- a/crt/nt64/Scrt1.c
+++ b/crt/nt64/Scrt1.c
@@ -3,13 +3,15 @@
/* see also: crtidata.c */
/****************************************/
+#include "crtinit.h"
+
static const unsigned short * __inherit = 0;
-extern const unsigned short * __ctty __attribute((weak,alias("__inherit")));
+extern const unsigned short * __ctty __hidden __attribute((weak,alias("__inherit")));
-int __attribute__((__visibility__("hidden"))) __psx_init(int *,char ***,char ***,void *);
-void __attribute__((__visibility__("hidden"))) __libc_entry_routine(void *,void *,const unsigned short *,int);
+int __hidden __psx_init(int *,char ***,char ***,void *);
+void __hidden __libc_entry_routine(void *,void *,const unsigned short *,int);
-void __libc_loader_init(void * __main, int flags)
+void __hidden __libc_loader_init(void * __main, int flags)
{
__libc_entry_routine(__main,__psx_init,__ctty,flags);
}
diff --git a/crt/nt64/Scrtldso.c b/crt/nt64/Scrtldso.c
index 11e8915..e486a93 100644
--- a/crt/nt64/Scrtldso.c
+++ b/crt/nt64/Scrtldso.c
@@ -1,10 +1,11 @@
#include <unistd.h>
#include <stdint.h>
+#include "crtinit.h"
#include "psxglue.h"
-const int __crtopt_ldso = __PSXOPT_LDSO;
+const int __hidden __crtopt_ldso = __PSXOPT_LDSO;
/* pty server root-relative name */
-const unsigned short __ctty[] = {'b','i','n','\\',
+const unsigned short __hidden __ctty[] = {'b','i','n','\\',
'n','t','c','t','t','y',
'.','e','x','e',0};
diff --git a/crt/nt64/Scrtvrfs.c b/crt/nt64/Scrtvrfs.c
index 82cf826..c5e483a 100644
--- a/crt/nt64/Scrtvrfs.c
+++ b/crt/nt64/Scrtvrfs.c
@@ -1,9 +1,10 @@
#include <unistd.h>
#include <stdint.h>
+#include "crtinit.h"
#include "psxglue.h"
-const int __crtopt_vrfs = __PSXOPT_VRFS;
+const int __hidden __crtopt_vrfs = __PSXOPT_VRFS;
/* pty server root-relative name */
-const unsigned short __ctty[] = {'n','t','c','t','t','y',
+const unsigned short __hidden __ctty[] = {'n','t','c','t','t','y',
'.','e','x','e',0};
diff --git a/crt/nt64/crt1.c b/crt/nt64/crt1.c
index 8c93c32..3834d32 100644
--- a/crt/nt64/crt1.c
+++ b/crt/nt64/crt1.c
@@ -1,13 +1,15 @@
+#include "crtinit.h"
+
static const int __disabled = 0;
-extern const int __crtopt_posix __attribute((weak,alias("__disabled")));
-extern const int __crtopt_dinga __attribute((weak,alias("__disabled")));
-extern const int __crtopt_ldso __attribute((weak,alias("__disabled")));
-extern const int __crtopt_vrfs __attribute((weak,alias("__disabled")));
+extern const int __hidden __crtopt_posix __attribute((weak,alias("__disabled")));
+extern const int __hidden __crtopt_dinga __attribute((weak,alias("__disabled")));
+extern const int __hidden __crtopt_ldso __attribute((weak,alias("__disabled")));
+extern const int __hidden __crtopt_vrfs __attribute((weak,alias("__disabled")));
-int __attribute__((visibility("hidden"))) main();
-void __libc_loader_init(void * __main, int flags);
+int __hidden main();
+void __hidden __libc_loader_init(void * __main, int flags);
-void _start(void)
+void __hidden _start(void)
{
__libc_loader_init(
main,
diff --git a/crt/nt64/crtdinga.c b/crt/nt64/crtdinga.c
index 216fed8..6a2b737 100644
--- a/crt/nt64/crtdinga.c
+++ b/crt/nt64/crtdinga.c
@@ -1,5 +1,6 @@
#include <unistd.h>
#include <stdint.h>
+#include "crtinit.h"
#include "psxglue.h"
-const int __crtopt_dinga = __PSXOPT_DINGA;
+const int __hidden __crtopt_dinga = __PSXOPT_DINGA;
diff --git a/crt/nt64/crtinit.h b/crt/nt64/crtinit.h
new file mode 100644
index 0000000..d5f6e54
--- /dev/null
+++ b/crt/nt64/crtinit.h
@@ -0,0 +1,2 @@
+#define __hidden __attribute((visibility("hidden")))
+
diff --git a/crt/nt64/crtldso.c b/crt/nt64/crtldso.c
index 81dec5f..84b8207 100644
--- a/crt/nt64/crtldso.c
+++ b/crt/nt64/crtldso.c
@@ -1,9 +1,10 @@
#include <unistd.h>
#include <stdint.h>
+#include "crtinit.h"
#include "psxglue.h"
#include "peldso.h"
-const int __crtopt_ldso = __PSXOPT_LDSO;
+const int __hidden __crtopt_ldso = __PSXOPT_LDSO;
/* framework (rtdata) abi */
static const struct __guid __ldsoabi = NT_PROCESS_GUID_RTDATA;
@@ -27,7 +28,7 @@ static const unsigned short __rrctty[] = {'b','i','n','\\',
static unsigned long __attribute__((section(".dsodata")))
__dsodata[65536/sizeof(unsigned long)];
-void __libc_loader_init(void * __main, int flags)
+void __hidden __libc_loader_init(void * __main, int flags)
{
int status;
void * hroot;
diff --git a/crt/nt64/crtposix.c b/crt/nt64/crtposix.c
index f8e7664..498d301 100644
--- a/crt/nt64/crtposix.c
+++ b/crt/nt64/crtposix.c
@@ -1,5 +1,6 @@
#include <unistd.h>
#include <stdint.h>
+#include "crtinit.h"
#include "psxglue.h"
-const int __crtopt_posix = __PSXOPT_POSIX;
+const int __hidden __crtopt_posix = __PSXOPT_POSIX;
diff --git a/crt/nt64/crtvrfs.c b/crt/nt64/crtvrfs.c
index ac8cccb..7a529f3 100644
--- a/crt/nt64/crtvrfs.c
+++ b/crt/nt64/crtvrfs.c
@@ -1,9 +1,10 @@
#include <unistd.h>
#include <stdint.h>
+#include "crtinit.h"
#include "psxglue.h"
#include "peldso.h"
-const int __crtopt_vrfs = __PSXOPT_VRFS;
+const int __hidden __crtopt_vrfs = __PSXOPT_VRFS;
/* framework (rtdata) abi */
static const struct __guid __ldsoabi = NT_PROCESS_GUID_RTDATA;
@@ -24,7 +25,7 @@ static const unsigned short __sdctty[] = {'n','t','c','t','t','y',
static unsigned long __attribute__((section(".dsodata")))
__dsodata[65536/sizeof(unsigned long)];
-void __libc_loader_init(void * __main, int flags)
+void __hidden __libc_loader_init(void * __main, int flags)
{
int status;
void * hroot;