Bug 17775 - Unused code in sysdeps/i386/dl-machine.h
Summary: Unused code in sysdeps/i386/dl-machine.h
Status: RESOLVED FIXED
Alias: None
Product: glibc
Classification: Unclassified
Component: dynamic-link (show other bugs)
Version: 2.21
: P2 normal
Target Milestone: 2.21
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-30 19:11 UTC by H.J. Lu
Modified: 2015-01-29 13:14 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:
fweimer: security-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description H.J. Lu 2014-12-30 19:11:52 UTC
sysdeps/i386/dl-machine.h has

#ifdef PI_STATIC_AND_HIDDEN
...
#else  /* Without .hidden support, we can't compile the code above.  */
...
#endif

and sysdeps/i386/configure.ac has

dnl It is always possible to access static and hidden symbols in an
dnl position independent way.
AC_DEFINE(PI_STATIC_AND_HIDDEN)

PI_STATIC_AND_HIDDEN is always defined for i386.  There is no need
to check PI_STATIC_AND_HIDDEN in sysdeps/i386/dl-machine.h.
Comment 1 Andreas Schwab 2014-12-30 21:05:07 UTC
It's a leftover from the non-elf support.
Comment 2 Sourceware Commits 2014-12-30 22:33:02 UTC
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  7062bd4230a9b94adff4101af9ae6c6a0d53c6e6 (commit)
      from  07256e183efe00ed833d1f744f7eef1e103afd74 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=7062bd4230a9b94adff4101af9ae6c6a0d53c6e6

commit 7062bd4230a9b94adff4101af9ae6c6a0d53c6e6
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Tue Dec 30 14:30:37 2014 -0800

    Don't check PI_STATIC_AND_HIDDEN in i386 dl-machine.h
    
    PI_STATIC_AND_HIDDEN is always defined for i386.  There is no need to
    check PI_STATIC_AND_HIDDEN in sysdeps/i386/dl-machine.h.
    
    	[BZ #17775]
    	* sysdeps/i386/dl-machine.h (PI_STATIC_AND_HIDDEN): Removed.
    	(elf_machine_dynamic) [!PI_STATIC_AND_HIDDEN]: Likewise.
    	(elf_machine_load_address) [!PI_STATIC_AND_HIDDEN]: Likewise.

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                 |    7 +++++++
 NEWS                      |    3 ++-
 sysdeps/i386/dl-machine.h |   33 ---------------------------------
 3 files changed, 9 insertions(+), 34 deletions(-)
Comment 3 H.J. Lu 2014-12-30 22:34:24 UTC
Fixed for 2.21.