From cd5c2f7718e4c53954ed8afe91e455b60c5b35b9 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sat, 7 Oct 2006 06:36:32 +0000 Subject: Bernd Schmidt writes: This introduces a new SEND_EARLY_STDERR macro that is to be used in dl-startup.c before ld.so is relocated. It is needed on Blackfin (and frv) FDPIC since we have to use special tricks to get the address of a string constant. EARLY_STDERR_SPECIAL gets defined on such a machine and prevents printing of debug strings inside the loop that relocates ld.so, since we can't decide which of the two variants to use. --- ldso/include/dl-string.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'ldso/include') diff --git a/ldso/include/dl-string.h b/ldso/include/dl-string.h index a50cfd6b3..32c5bf83a 100644 --- a/ldso/include/dl-string.h +++ b/ldso/include/dl-string.h @@ -338,12 +338,25 @@ static __always_inline char * _dl_simple_ltoahex(char * local, unsigned long i) } #endif +/* Some targets may have to override this to something that doesn't + * reference constant strings through the GOT. This macro should be + * preferred over SEND_STDERR for constant strings before we complete + * bootstrap. + */ +#ifndef SEND_EARLY_STDERR +# define SEND_EARLY_STDERR(S) SEND_STDERR(S) +#else +# define EARLY_STDERR_SPECIAL +#endif + #ifdef __SUPPORT_LD_DEBUG_EARLY__ # define SEND_STDERR_DEBUG(X) SEND_STDERR(X) +# define SEND_EARLY_STDERR_DEBUG(X) SEND_EARLY_STDERR(X) # define SEND_NUMBER_STDERR_DEBUG(X, add_a_newline) SEND_NUMBER_STDERR(X, add_a_newline) # define SEND_ADDRESS_STDERR_DEBUG(X, add_a_newline) SEND_ADDRESS_STDERR(X, add_a_newline) #else # define SEND_STDERR_DEBUG(X) +# define SEND_EARLY_STDERR_DEBUG(X) # define SEND_NUMBER_STDERR_DEBUG(X, add_a_newline) # define SEND_ADDRESS_STDERR_DEBUG(X, add_a_newline) #endif -- cgit v1.2.3