diff mbox series

[2/3] nptl: Rename nptl_version to __nptl_version

Message ID e9139bb399b2d1450a4b4930d6dc89f012cc9eb3.1624871226.git.fweimer@redhat.com
State Committed
Commit b369cc4e9c2436b9b4f56128059313b69b0c300d
Headers show
Series ntpl: Export libthread_db-used symbols (v2) | expand

Checks

Context Check Description
dj/TryBot-apply_patch success Patch applied to master at the time it was sent

Commit Message

Florian Weimer June 28, 2021, 9:09 a.m. UTC
This prepares it for exporting as a dynamic symbol.
---
 nptl_db/structs.def | 2 +-
 nptl_db/td_ta_new.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Carlos O'Donell June 28, 2021, 12:31 p.m. UTC | #1
On 6/28/21 5:09 AM, Florian Weimer via Libc-alpha wrote:
> This prepares it for exporting as a dynamic symbol.

This is OK. Avoid namespace conflict.

Tested on x86_64 without regression.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>

> ---
>  nptl_db/structs.def | 2 +-
>  nptl_db/td_ta_new.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/nptl_db/structs.def b/nptl_db/structs.def
> index fb7bb9367d..248ecf4335 100644
> --- a/nptl_db/structs.def
> +++ b/nptl_db/structs.def
> @@ -73,7 +73,7 @@ DB_STRUCT (td_eventbuf_t)
>  DB_STRUCT_FIELD (td_eventbuf_t, eventnum)
>  DB_STRUCT_FIELD (td_eventbuf_t, eventdata)
>  
> -DB_SYMBOL (nptl_version)
> +DB_SYMBOL (__nptl_version)

OK. Rename.

>  DB_SYMBOL (__nptl_create_event)
>  DB_SYMBOL (__nptl_death_event)
>  DB_SYMBOL (__nptl_threads_events)
> diff --git a/nptl_db/td_ta_new.c b/nptl_db/td_ta_new.c
> index 501d922ea2..eeca29d5a0 100644
> --- a/nptl_db/td_ta_new.c
> +++ b/nptl_db/td_ta_new.c
> @@ -39,7 +39,7 @@ td_ta_new (struct ps_prochandle *ps, td_thragent_t **ta)
>    LOG ("td_ta_new");
>  
>    /* Check whether the versions match.  */
> -  if (td_lookup (ps, SYM_nptl_version, &versaddr) != PS_OK)
> +  if (td_lookup (ps, SYM___nptl_version, &versaddr) != PS_OK)

OK. Rename.

>      return TD_NOLIBTHREAD;
>    if (ps_pdread (ps, versaddr, versbuf, sizeof (versbuf)) != PS_OK)
>      return TD_ERR;
>
diff mbox series

Patch

diff --git a/nptl_db/structs.def b/nptl_db/structs.def
index fb7bb9367d..248ecf4335 100644
--- a/nptl_db/structs.def
+++ b/nptl_db/structs.def
@@ -73,7 +73,7 @@  DB_STRUCT (td_eventbuf_t)
 DB_STRUCT_FIELD (td_eventbuf_t, eventnum)
 DB_STRUCT_FIELD (td_eventbuf_t, eventdata)
 
-DB_SYMBOL (nptl_version)
+DB_SYMBOL (__nptl_version)
 DB_SYMBOL (__nptl_create_event)
 DB_SYMBOL (__nptl_death_event)
 DB_SYMBOL (__nptl_threads_events)
diff --git a/nptl_db/td_ta_new.c b/nptl_db/td_ta_new.c
index 501d922ea2..eeca29d5a0 100644
--- a/nptl_db/td_ta_new.c
+++ b/nptl_db/td_ta_new.c
@@ -39,7 +39,7 @@  td_ta_new (struct ps_prochandle *ps, td_thragent_t **ta)
   LOG ("td_ta_new");
 
   /* Check whether the versions match.  */
-  if (td_lookup (ps, SYM_nptl_version, &versaddr) != PS_OK)
+  if (td_lookup (ps, SYM___nptl_version, &versaddr) != PS_OK)
     return TD_NOLIBTHREAD;
   if (ps_pdread (ps, versaddr, versbuf, sizeof (versbuf)) != PS_OK)
     return TD_ERR;