|
|
991247c |
http://sourceware.org/ml/gdb-patches/2010-02/msg00713.html
|
|
|
991247c |
Subject: Re: [patch] Fix false warning: section .gnu.liblist not found in ... [rediffed]
|
|
|
991247c |
|
|
|
991247c |
Hi,
|
|
|
991247c |
|
|
|
991247c |
only a technical rediff.
|
|
|
991247c |
|
|
|
991247c |
------------------------------------------------------------------------------
|
|
|
991247c |
|
|
|
991247c |
On Sat, 13 Feb 2010 23:49:29 +0100, Jan Kratochvil wrote:
|
|
|
991247c |
Hi,
|
|
|
991247c |
|
|
|
991247c |
post-7.0 GDB started to print many false warnings on prelink-ed system:
|
|
|
991247c |
|
|
|
991247c |
$ ./gdb -nx -ex r echo
|
|
|
991247c |
...
|
|
|
991247c |
Reading symbols from /bin/echo...Reading symbols from /usr/lib/debug/bin/echo.debug...
|
|
|
991247c |
warning: section .gnu.liblist not found in /usr/lib/debug/bin/echo.debug
|
|
|
991247c |
warning: section .gnu.conflict not found in /usr/lib/debug/bin/echo.debug
|
|
|
991247c |
done.
|
|
|
991247c |
done.
|
|
|
991247c |
Starting program: /bin/echo
|
|
|
991247c |
warning: section .gnu.liblist not found in /usr/lib/debug/bin/echo.debug
|
|
|
991247c |
warning: section .gnu.conflict not found in /usr/lib/debug/bin/echo.debug
|
|
|
991247c |
warning: section .gnu.liblist not found in /usr/lib/debug/bin/echo.debug
|
|
|
991247c |
warning: section .gnu.conflict not found in /usr/lib/debug/bin/echo.debug
|
|
|
991247c |
warning: section .gnu.liblist not found in /usr/lib/debug/bin/echo.debug
|
|
|
991247c |
warning: section .gnu.conflict not found in /usr/lib/debug/bin/echo.debug
|
|
|
991247c |
|
|
|
991247c |
These sections are from prelink and they are not present in the *.debug files.
|
|
|
991247c |
|
|
|
991247c |
It is formally a regression by:
|
|
|
991247c |
|
|
|
991247c |
commit 3bfec189bb0fa1a2a44f1645dd68a9572e7a841c
|
|
|
991247c |
|
|
|
991247c |
2010-01-07 Tristan Gingold <gingold@adacore.com>
|
|
|
991247c |
|
|
|
991247c |
* symfile.c (build_section_addr_info_from_objfile): New function.
|
|
|
991247c |
(symbol_file_add_separate): Don't use offsets from objfile but
|
|
|
991247c |
built an addr info.
|
|
|
991247c |
|
|
|
991247c |
|
|
|
991247c |
But I think would be unavoidable even for the unification of PIC+PIE handling.
|
|
|
991247c |
|
|
|
991247c |
Found no usable section flag differences for .gnu.liblist vs. for example
|
|
|
991247c |
.text so used just the section name for the exception.
|
|
|
991247c |
|
|
|
991247c |
.gnu.liblist/.gnu.conflict related dumps:
|
|
|
991247c |
|
|
|
991247c |
executable:
|
|
|
991247c |
Section Headers:
|
|
|
991247c |
[Nr] Name Type Address Off Size ES Flg Lk Inf Al
|
|
|
991247c |
[ 6] .gnu.liblist GNU_LIBLIST 00000000004006b8 0006b8 000028 14 A 28 0 4
|
|
|
991247c |
[ 7] .gnu.conflict RELA 00000000004006e0 0006e0 0001c8 18 A 5 0 8
|
|
|
991247c |
Program Headers:
|
|
|
991247c |
Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
|
|
|
991247c |
LOAD 0x000000 0x0000000000400000 0x0000000000400000 0x005254 0x005254 R E 0x200000
|
|
|
991247c |
Dynamic section at offset 0x52c8 contains 24 entries:
|
|
|
991247c |
Tag Type Name/Value
|
|
|
991247c |
0x000000006ffffef9 (GNU_LIBLIST) 0x4006b8
|
|
|
991247c |
0x000000006ffffdf7 (GNU_LIBLISTSZ) 40 (bytes)
|
|
|
991247c |
0x000000006ffffef8 (GNU_CONFLICT) 0x4006e0
|
|
|
991247c |
0x000000006ffffdf6 (GNU_CONFLICTSZ) 456 (bytes)
|
|
|
991247c |
|
|
|
991247c |
library:
|
|
|
991247c |
Section Headers:
|
|
|
991247c |
[Nr] Name Type Address Off Size ES Flg Lk Inf Al
|
|
|
991247c |
[74] .gnu.liblist GNU_LIBLIST 0000000000000000 249940 000014 14 75 0 4
|
|
|
991247c |
|
|
|
991247c |
|
|
|
991247c |
No regressions on {x86_64,x86_64-m32,i686}-fedora12-linux-gnu.
|
|
|
991247c |
|
|
|
991247c |
|
|
|
991247c |
Thanks,
|
|
|
991247c |
Jan
|
|
|
991247c |
|
|
|
991247c |
|
|
|
991247c |
2010-03-01 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
|
991247c |
|
|
|
991247c |
* symfile.c (addr_info_make_relative): New variable sect_name, use it.
|
|
|
991247c |
Do not warn on ".gnu.liblist" and ".gnu.conflict".
|
|
|
991247c |
|
|
|
991247c |
--- a/gdb/symfile.c
|
|
|
991247c |
+++ b/gdb/symfile.c
|
|
|
991247c |
@@ -597,7 +597,8 @@ addr_info_make_relative (struct section_addr_info *addrs, bfd *abfd)
|
|
|
991247c |
|
|
|
991247c |
for (i = 0; i < addrs->num_sections && addrs->other[i].name; i++)
|
|
|
991247c |
{
|
|
|
991247c |
- asection *sect = bfd_get_section_by_name (abfd, addrs->other[i].name);
|
|
|
991247c |
+ const char *sect_name = addrs->other[i].name;
|
|
|
991247c |
+ asection *sect = bfd_get_section_by_name (abfd, sect_name);
|
|
|
991247c |
|
|
|
991247c |
if (sect)
|
|
|
991247c |
{
|
|
|
991247c |
@@ -614,8 +615,16 @@ addr_info_make_relative (struct section_addr_info *addrs, bfd *abfd)
|
|
|
991247c |
}
|
|
|
991247c |
else
|
|
|
991247c |
{
|
|
|
991247c |
- warning (_("section %s not found in %s"), addrs->other[i].name,
|
|
|
991247c |
- bfd_get_filename (abfd));
|
|
|
991247c |
+ /* These two sections are intentionally loaded into memory from
|
|
|
991247c |
+ the DYNAMIC segment and so they have both SEC_ALLOC and SEC_LOAD
|
|
|
991247c |
+ set in the main executable (not in the library files). They
|
|
|
991247c |
+ are not present in the separate debug info file, though. */
|
|
|
991247c |
+
|
|
|
991247c |
+ if (!(strcmp (sect_name, ".gnu.liblist") == 0
|
|
|
991247c |
+ || strcmp (sect_name, ".gnu.conflict") == 0))
|
|
|
991247c |
+ warning (_("section %s not found in %s"), sect_name,
|
|
|
991247c |
+ bfd_get_filename (abfd));
|
|
|
991247c |
+
|
|
|
991247c |
addrs->other[i].addr = 0;
|
|
|
991247c |
|
|
|
991247c |
/* SECTINDEX is invalid if ADDR is zero. */
|
|
|
991247c |
|