Răsfoiți Sursa

disable early debug code if the arch relies on certain values (like load_addr) which are computer later

Mike Frysinger 20 ani în urmă
părinte
comite
135c85905c
2 a modificat fișierele cu 3 adăugiri și 0 ștergeri
  1. 1 0
      ldso/include/dl-string.h
  2. 2 0
      ldso/ldso/dl-startup.c

+ 1 - 0
ldso/include/dl-string.h

@@ -274,6 +274,7 @@ static __always_inline char * _dl_simple_ltoahex(char * local, unsigned long i)
                      || defined(__sh__) ||  defined(__powerpc__)
 # define CONSTANT_STRING_GOT_FIXUP(X) \
 	if ((X) < (const char *) load_addr) (X) += load_addr
+# define NO_EARLY_SEND_STDERR
 #else
 # define CONSTANT_STRING_GOT_FIXUP(X)
 #endif

+ 2 - 0
ldso/ldso/dl-startup.c

@@ -136,12 +136,14 @@ static void * __attribute_used__ _dl_start(unsigned long args)
 	aux_dat += argc;			/* Skip over the argv pointers */
 	aux_dat++;					/* Skip over NULL at end of argv */
 	envp = (char **) aux_dat;
+#ifndef NO_EARLY_SEND_STDERR
 	SEND_STDERR_DEBUG("argc=");
 	SEND_NUMBER_STDERR_DEBUG(argc, 0);
 	SEND_STDERR_DEBUG(" argv=");
 	SEND_ADDRESS_STDERR_DEBUG(argv, 0);
 	SEND_STDERR_DEBUG(" envp=");
 	SEND_ADDRESS_STDERR_DEBUG(envp, 1);
+#endif
 	while (*aux_dat)
 		aux_dat++;				/* Skip over the envp pointers */
 	aux_dat++;					/* Skip over NULL at end of envp */