unofficial mirror of libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] posix/tst-rfc3484: Fix compile failure linking to local __stat64
@ 2021-01-22 22:43 Stafford Horne via Libc-alpha
  2021-01-22 22:51 ` Stafford Horne via Libc-alpha
  0 siblings, 1 reply; 2+ messages in thread
From: Stafford Horne via Libc-alpha @ 2021-01-22 22:43 UTC (permalink / raw)
  To: GLIBC patches

After 04986243d1 ("Remove internal usage of extensible stat functions")
linking the __stat64 symbol in getaddrinfo for this test fails with the
below error:

    /home/shorne/work/gnu-toolchain/local/lib/gcc/or1k-smh-linux-gnu/11.0.0/../../../../or1k-smh-linux-gnu/bin/ld: /home/shorne/work/gnu-toolchain/build-glibc/posix/tst-rfc3484.o: in function `gaiconf_reload':
    /home/shorne/work/gnu-toolchain/glibc/posix/../sysdeps/posix/getaddrinfo.c:2136: undefined reference to `__stat64'
    collect2: error: ld returned 1 exit status

This is because __stat64 is a local symbol, the test includes the
getaddrinfo directly and fails to link against the local symbol.  Fix
this by setting up an alias to the global stat64 symbol name list is
done for other local symbol usage.
---
 posix/tst-rfc3484.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/posix/tst-rfc3484.c b/posix/tst-rfc3484.c
index 97d065b6bf..3b2052eb54 100644
--- a/posix/tst-rfc3484.c
+++ b/posix/tst-rfc3484.c
@@ -11,6 +11,7 @@
 #define __gethostbyaddr_r gethostbyaddr_r
 #define __gethostbyname2_r gethostbyname2_r
 #define __qsort_r qsort_r
+#define __stat64 stat64
 
 void
 attribute_hidden
-- 
2.26.2


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

* Re: [PATCH] posix/tst-rfc3484: Fix compile failure linking to local __stat64
  2021-01-22 22:43 [PATCH] posix/tst-rfc3484: Fix compile failure linking to local __stat64 Stafford Horne via Libc-alpha
@ 2021-01-22 22:51 ` Stafford Horne via Libc-alpha
  0 siblings, 0 replies; 2+ messages in thread
From: Stafford Horne via Libc-alpha @ 2021-01-22 22:51 UTC (permalink / raw)
  To: GLIBC patches

On Sat, Jan 23, 2021 at 07:43:02AM +0900, Stafford Horne wrote:
> After 04986243d1 ("Remove internal usage of extensible stat functions")
> linking the __stat64 symbol in getaddrinfo for this test fails with the
> below error:
> 
>     /home/shorne/work/gnu-toolchain/local/lib/gcc/or1k-smh-linux-gnu/11.0.0/../../../../or1k-smh-linux-gnu/bin/ld: /home/shorne/work/gnu-toolchain/build-glibc/posix/tst-rfc3484.o: in function `gaiconf_reload':
>     /home/shorne/work/gnu-toolchain/glibc/posix/../sysdeps/posix/getaddrinfo.c:2136: undefined reference to `__stat64'
>     collect2: error: ld returned 1 exit status
> 
> This is because __stat64 is a local symbol, the test includes the
> getaddrinfo directly and fails to link against the local symbol.  Fix
> this by setting up an alias to the global stat64 symbol name list is

I will fix this type "... symbol *name* like is done ..."

> done for other local symbol usage.
> ---
>  posix/tst-rfc3484.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/posix/tst-rfc3484.c b/posix/tst-rfc3484.c
> index 97d065b6bf..3b2052eb54 100644
> --- a/posix/tst-rfc3484.c
> +++ b/posix/tst-rfc3484.c
> @@ -11,6 +11,7 @@
>  #define __gethostbyaddr_r gethostbyaddr_r
>  #define __gethostbyname2_r gethostbyname2_r
>  #define __qsort_r qsort_r
> +#define __stat64 stat64
>  
>  void
>  attribute_hidden
> -- 
> 2.26.2
> 

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

end of thread, other threads:[~2021-01-22 22:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-22 22:43 [PATCH] posix/tst-rfc3484: Fix compile failure linking to local __stat64 Stafford Horne via Libc-alpha
2021-01-22 22:51 ` Stafford Horne via Libc-alpha

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).