From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: tromey@redhat.com (Tom Tromey)
Cc: palves@redhat.com (Pedro Alves), dje@google.com (Doug Evans),
gdb-patches@sourceware.org
Subject: Re: RFA: handle "MiniDebuginfo" section
Date: Fri, 30 Nov 2012 14:05:00 -0000 [thread overview]
Message-ID: <201211301405.qAUE5AZC014535@d06av02.portsmouth.uk.ibm.com> (raw)
In-Reply-To: <87ip8o3zfz.fsf@fleche.redhat.com> from "Tom Tromey" at Nov 29, 2012 01:51:28 PM
Tom Tromey wrote:
> >>>>> "Ulrich" == Ulrich Weigand <uweigand@de.ibm.com> writes:
> Ulrich> Yes, that works for me! Thanks for the quick fix!
>
> I'm going to check it in with this ChangeLog:
Thanks!
> Ulrich> FAIL: gdb.base/gnu-debugdata.exp: objcopy 1
> Ulrich> Apparently this happens because:
> Ulrich> objcopy -S --remove-section .gdb_index --remove-section .comment
> Ulrich> --keep-symbols=/home/uweigand/fsf/gdb-head-build/gdb/testsuite/gdb.base/gnu-debugdata.keep_symbols
> Ulrich> /home/uweigand/fsf/gdb-head-build/gdb/testsuite/gdb.base/gnu-debugdata
> Ulrich> /home/uweigand/fsf/gdb-head-build/gdb/testsuite/gdb.base/gnu-debugdata.mini_debuginfo
>
> Ulrich> returns a non-zero exit code since the original binary has no .gdb_index
> Ulrich> section (probably because the system compiler is old) ...
>
> My system doesn't make a .gdb_index by default.
> So it must be something else.
Right, it turns out the problem isn't the --remove-section; the problem
rather seems to be that the file passed for --keep-symbols is empty.
This in turn is because of the filter for "T" type symbols:
if {[pipeline "nm" \
[list [transform nm] "${binfile} --format=posix --defined-only"] \
[list awk "\\{if(\\\$2==\"T\"||\\\$2==\"t\")print\\ \\\$1\\}"] \
[list sort "" "" "${binfile}.funcsyms"]]} {
The problem on PowerPC64 is that the main function entry points refer to
function descriptors in the data section, and are thus labeled "D"
instead of "T":
_DYNAMIC d 0000000010010948
_IO_stdin_used R 0000000010000820 0000000000000004
__CTOR_END__ d 0000000010010908
__CTOR_LIST__ d 0000000010010900
__DTOR_END__ D 0000000010010918
__DTOR_LIST__ d 0000000010010910
__FRAME_END__ r 00000000100008f8
__JCR_END__ d 0000000010010920
__JCR_LIST__ d 0000000010010920
__bss_start A 0000000010010be0
__data_start D 0000000010010ac8
__do_global_ctors_aux d 0000000010010b68
__do_global_dtors_aux d 0000000010010b08
__dso_handle R 0000000010000828
__fini_array_end d 00000000100108fc
__fini_array_start d 00000000100108fc
__init_array_end d 00000000100108fc
__init_array_start d 00000000100108fc
__libc_csu_fini D 0000000010010b48 0000000000000010
__libc_csu_init D 0000000010010b58 00000000000000d0
__preinit_array_end d 00000000100108fc
__preinit_array_start d 00000000100108fc
_edata A 0000000010010be0
_end A 0000000010010c50
_fini D 0000000010010af8
_init D 0000000010010ae8
_start D 0000000010010ac8 000000000000003c
call_gmon_start d 0000000010010ad8
completed.6441 b 0000000010010c48 0000000000000001
data_start W 0000000010010ac8
debugdata_function d 0000000010010b28 0000000000000054
dtor_idx.6443 b 0000000010010c40 0000000000000008
frame_dummy d 0000000010010b18
main D 0000000010010b38 000000000000004c
If I change the above filter to also accept "D", the test case goes further.
(It still ends up UNSUPPORTED, since it looks like I don't have LZMA on the
system ...). I'm not sure why the filter for "T" is done; would it change
something critical to the test if "D" were added?
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com
next prev parent reply other threads:[~2012-11-30 14:05 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-09 17:33 Tom Tromey
2012-11-09 18:07 ` Eli Zaretskii
2012-11-09 18:13 ` Pedro Alves
2012-11-09 21:28 ` Tom Tromey
2012-11-13 12:56 ` Pedro Alves
2012-11-13 15:26 ` Pedro Alves
2012-11-13 18:32 ` Tom Tromey
2012-11-09 18:23 ` Joel Brobecker
2012-11-09 18:53 ` Pedro Alves
2012-11-09 19:13 ` Tom Tromey
2012-11-12 16:04 ` Tom Tromey
2012-11-12 17:04 ` Joel Brobecker
2012-11-12 18:24 ` Tom Tromey
2012-11-12 16:28 ` Tom Tromey
2012-11-13 18:36 ` Tom Tromey
2012-11-13 18:42 ` Eli Zaretskii
2012-11-13 19:12 ` Pedro Alves
2012-11-13 20:57 ` Tom Tromey
2012-11-14 16:13 ` Tom Tromey
2012-11-14 16:19 ` Pedro Alves
2012-11-14 16:59 ` Tom Tromey
2012-11-14 19:37 ` Doug Evans
2012-11-14 22:12 ` Joel Brobecker
2012-11-15 11:18 ` Pedro Alves
2012-11-16 19:51 ` Tom Tromey
2012-11-19 14:41 ` Pedro Alves
2012-11-26 19:21 ` Tom Tromey
2012-11-26 22:24 ` Andrew Pinski
2012-11-27 2:23 ` Tom Tromey
2012-11-29 19:19 ` Ulrich Weigand
2012-11-29 19:23 ` Tom Tromey
2012-11-29 19:33 ` Ulrich Weigand
2012-11-29 20:51 ` Tom Tromey
2012-11-30 14:05 ` Ulrich Weigand [this message]
2012-11-30 20:59 ` Tom Tromey
2012-12-05 17:09 ` Ulrich Weigand
2012-12-11 16:42 ` Yufeng Zhang
2012-11-16 20:04 ` Tom Tromey
2012-11-12 21:26 ` Doug Evans
2012-11-13 17:43 ` Tom Tromey
2012-11-13 15:44 ` Jan Kratochvil
2012-11-13 18:34 ` Tom Tromey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201211301405.qAUE5AZC014535@d06av02.portsmouth.uk.ibm.com \
--to=uweigand@de.ibm.com \
--cc=dje@google.com \
--cc=gdb-patches@sourceware.org \
--cc=palves@redhat.com \
--cc=tromey@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox