Patchwork Remove _dl_out_of_memory from elf/Versions

login
register
mail settings
Submitter H.J. Lu
Date June 16, 2017, 4:25 p.m.
Message ID <20170616162531.GA21934@gmail.com>
Download mbox | patch
Permalink /patch/21052/
State New
Headers show

Comments

H.J. Lu - June 16, 2017, 4:25 p.m.
Since _dl_out_of_memory is static in elf/dl-error-skeleton.c:

static const char _dl_out_of_memory[] = "out of memory";

remove _dl_out_of_memory from elf/Versions.

I am checking it in today.

H.J.
---
	* elf/Versions (ld): Remove _dl_out_of_memory.
---
 ChangeLog    | 4 ++++
 elf/Versions | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)
Florian Weimer - June 16, 2017, 4:27 p.m.
On 06/16/2017 06:25 PM, H.J. Lu wrote:
> Since _dl_out_of_memory is static in elf/dl-error-skeleton.c:
> 
> static const char _dl_out_of_memory[] = "out of memory";
> 
> remove _dl_out_of_memory from elf/Versions.

Do you happen to have a binutils patch that warns about this?

Thanks,
Florian
H.J. Lu - June 16, 2017, 4:28 p.m.
On Fri, Jun 16, 2017 at 9:27 AM, Florian Weimer <fweimer@redhat.com> wrote:
> On 06/16/2017 06:25 PM, H.J. Lu wrote:
>> Since _dl_out_of_memory is static in elf/dl-error-skeleton.c:
>>
>> static const char _dl_out_of_memory[] = "out of memory";
>>
>> remove _dl_out_of_memory from elf/Versions.
>
> Do you happen to have a binutils patch that warns about this?
>

No, I don't.
Joseph Myers - June 16, 2017, 4:29 p.m.
On Fri, 16 Jun 2017, Florian Weimer wrote:

> On 06/16/2017 06:25 PM, H.J. Lu wrote:
> > Since _dl_out_of_memory is static in elf/dl-error-skeleton.c:
> > 
> > static const char _dl_out_of_memory[] = "out of memory";
> > 
> > remove _dl_out_of_memory from elf/Versions.
> 
> Do you happen to have a binutils patch that warns about this?

I'd expect there are lots of symbols in glibc's Versions files that are 
actually only exported on some architectures and so would trigger such 
warnings.  (E.g. obsoleted symbols, listed in Versions files but not 
actually built for new-enough architectures because of SHLIB_COMPAT 
conditionals.)
Florian Weimer - June 16, 2017, 9:20 p.m.
On 06/16/2017 06:29 PM, Joseph Myers wrote:
> On Fri, 16 Jun 2017, Florian Weimer wrote:
> 
>> On 06/16/2017 06:25 PM, H.J. Lu wrote:
>>> Since _dl_out_of_memory is static in elf/dl-error-skeleton.c:
>>>
>>> static const char _dl_out_of_memory[] = "out of memory";
>>>
>>> remove _dl_out_of_memory from elf/Versions.
>>
>> Do you happen to have a binutils patch that warns about this?
> 
> I'd expect there are lots of symbols in glibc's Versions files that are 
> actually only exported on some architectures and so would trigger such 
> warnings.  (E.g. obsoleted symbols, listed in Versions files but not 
> actually built for new-enough architectures because of SHLIB_COMPAT 
> conditionals.)

Right, but it would still be interesting to see what current
architectures are missing.

Thanks,
Florian

Patch

diff --git a/ChangeLog b/ChangeLog
index 3581804..f4ac921 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@ 
+2017-06-16  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* elf/Versions (ld): Remove _dl_out_of_memory.
+
 2017-06-16  Joseph Myers  <joseph@codesourcery.com>
 
 	* timezone/private.h: Update from tzcode 2017b.
diff --git a/elf/Versions b/elf/Versions
index c59facd..e65f2fa 100644
--- a/elf/Versions
+++ b/elf/Versions
@@ -58,7 +58,7 @@  ld {
     __libc_enable_secure;
     _dl_allocate_tls; _dl_allocate_tls_init;
     _dl_argv; _dl_find_dso_for_object; _dl_get_tls_static_info;
-    _dl_deallocate_tls; _dl_make_stack_executable; _dl_out_of_memory;
+    _dl_deallocate_tls; _dl_make_stack_executable;
     _dl_rtld_di_serinfo; _dl_starting_up;
     _rtld_global; _rtld_global_ro;