public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH v3] <shlib-compat.h>: Support compat_symbol_reference for _ISOMAC
@ 2021-03-03 17:36 Florian Weimer
  2021-03-03 17:50 ` Andreas Schwab
  0 siblings, 1 reply; 3+ messages in thread
From: Florian Weimer @ 2021-03-03 17:36 UTC (permalink / raw)
  To: libc-alpha

This is helpful for testing compat symbols in cases where _ISOMAC
is activated implicitly due to -DMODULE_NAME=testsuite and cannot
be disabled easily.

---
v2: Now actually tested in the situation where I need it.
v3: Dropped the __ mangling.  conform tests (and everything else)
    still pass, so it's apparently not necessary even for _ISOMAC.    

include/libc-symbols.h | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/include/libc-symbols.h b/include/libc-symbols.h
index ea126ae70c..0d9b2795e7 100644
--- a/include/libc-symbols.h
+++ b/include/libc-symbols.h
@@ -59,6 +59,19 @@
 # define IN_MODULE (-1)
 #endif
 
+/* Use __symbol_version_reference to specify the version a symbol
+   reference should link to.  Use symbol_version or
+   default_symbol_version for the definition of a versioned symbol.
+   The difference is that the latter is a no-op in non-shared
+   builds.  */
+#ifdef __ASSEMBLER__
+# define symbol_version_reference(real, name, version) \
+     .symver real, name##@##version
+#else  /* !__ASSEMBLER__ */
+# define symbol_version_reference(real, name, version) \
+  __asm__ (".symver " #real "," #name "@" #version)
+#endif
+
 #ifndef _ISOMAC
 
 /* This is defined for the compilation of all C library code.  features.h
@@ -396,19 +409,6 @@ for linking")
    past the last element in SET.  */
 #define symbol_set_end_p(set, ptr) ((ptr) >= (void *const *) &__stop_##set)
 
-/* Use symbol_version_reference to specify the version a symbol
-   reference should link to.  Use symbol_version or
-   default_symbol_version for the definition of a versioned symbol.
-   The difference is that the latter is a no-op in non-shared
-   builds.  */
-#ifdef __ASSEMBLER__
-# define symbol_version_reference(real, name, version) \
-     .symver real, name##@##version
-#else  /* !__ASSEMBLER__ */
-# define symbol_version_reference(real, name, version) \
-  __asm__ (".symver " #real "," #name "@" #version)
-#endif
-
 #ifdef SHARED
 # define symbol_version(real, name, version) \
   symbol_version_reference(real, name, version)


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v3] <shlib-compat.h>: Support compat_symbol_reference for _ISOMAC
  2021-03-03 17:36 [PATCH v3] <shlib-compat.h>: Support compat_symbol_reference for _ISOMAC Florian Weimer
@ 2021-03-03 17:50 ` Andreas Schwab
  2021-03-03 17:52   ` Florian Weimer
  0 siblings, 1 reply; 3+ messages in thread
From: Andreas Schwab @ 2021-03-03 17:50 UTC (permalink / raw)
  To: Florian Weimer via Libc-alpha; +Cc: Florian Weimer

On Mär 03 2021, Florian Weimer via Libc-alpha wrote:

> +/* Use __symbol_version_reference to specify the version a symbol

s/__//

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v3] <shlib-compat.h>: Support compat_symbol_reference for _ISOMAC
  2021-03-03 17:50 ` Andreas Schwab
@ 2021-03-03 17:52   ` Florian Weimer
  0 siblings, 0 replies; 3+ messages in thread
From: Florian Weimer @ 2021-03-03 17:52 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: Florian Weimer via Libc-alpha

* Andreas Schwab:

> On Mär 03 2021, Florian Weimer via Libc-alpha wrote:
>
>> +/* Use __symbol_version_reference to specify the version a symbol
>
> s/__//

Thanks.  Okay with this change?

Florian


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-03-03 17:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-03 17:36 [PATCH v3] <shlib-compat.h>: Support compat_symbol_reference for _ISOMAC Florian Weimer
2021-03-03 17:50 ` Andreas Schwab
2021-03-03 17:52   ` Florian Weimer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).