Don't issue errors on GDB Python files
commiteea3dc5bf2813b77ee9819d1b9ec893140db1491
authorH.J. Lu <hjl.tools@gmail.com>
Wed, 24 Jun 2015 10:21:29 +0000 (24 03:21 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Wed, 24 Jun 2015 17:27:39 +0000 (24 10:27 -0700)
tree8880a115fc860029f96c48a49e8ccc82b32711ba
parent6f874bd4d4063cacd9edd7f7607fb929f0db218f
Don't issue errors on GDB Python files

Many packages, including GCC, install Python files for GDB in library
diretory. ldconfig reads them and issue errors since they aren't ELF
files:

ldconfig: /usr/gcc-5.1.1/lib/libstdc++.so.6.0.21-gdb.py is not an ELF file - it has the wrong magic bytes at the start.

ldconfig: /usr/gcc-5.1.1/libx32/libstdc++.so.6.0.21-gdb.py is not an ELF file - it has the wrong magic bytes at the start.

ldconfig: /usr/gcc-5.1.1/lib64/libstdc++.so.6.0.21-gdb.py is not an ELF file - it has the wrong magic bytes at the start.

This patch silences ldconfig on GDB Python files by checking filenames
with -gdb.py suffix.

[BZ #18585]
* elf/readlib.c (is_gdb_python_file): New.
(process_file): Don't issue errors on filenames with -gdb.py
suffix.
ChangeLog
NEWS
elf/readlib.c