From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: elfutils-devel@lists.fedorahosted.org
Cc: binutils@sourceware.org, gdb-patches@sourceware.org
Subject: [2/3, ppc64, elfutils patch] eu-strip vs. func addresses for GDB inferior calls
Date: Wed, 23 Mar 2011 15:49:00 -0000 [thread overview]
Message-ID: <20110323152942.GA13640@host1.jankratochvil.net> (raw)
Hi,
the elfutils part.
before the fix:
binary:
[11] .text PROGBITS 00000000100003e0 0003e0 000410 00 AX 0 0 16
[22] .opd PROGBITS 0000000010010ad8 000ad8 0000b8 00 WA 0 0 8
[28] .gnu_debuglink PROGBITS 0000000000000000 000c2c 00001c 00 0 0 4
.debug:
[11] .text NOBITS 00000000100003e0 000250 000410 00 AX 0 0 16
[22] .opd NOBITS 0000000010010ad8 000250 0000b8 00 WA 0 0 8
^^^^^^^^
[30] .debug_info PROGBITS 0000000000000000 0002b1 0000b1 00 0 0 1
after the fix:
binary:
[11] .text PROGBITS 00000000100003e0 0003e0 000410 00 AX 0 0 16
[22] .opd PROGBITS 0000000010010ad8 000ad8 0000b8 00 WA 0 0 8
[28] .gnu_debuglink PROGBITS 0000000000000000 000c2c 00001c 00 0 0 4
.debug:
[11] .text NOBITS 00000000100003e0 000250 000410 00 AX 0 0 16
[22] .opd PROGBITS 0000000010010ad8 000250 0000b8 00 WA 0 0 8
^^^^^^^^
[30] .debug_info PROGBITS 0000000000000000 000369 0000b1 00 0 0 1
The patch has been regression tested on x86_64-fedora14-linux-gnu,
ppc64-rhel61-linux-gnu.
Thanks,
Jan
src/
2011-03-23 Jan Kratochvil <jan.kratochvil@redhat.com>
* strip.c (handle_elf): Provide `.opd' copy for the .debug file.
--- a/src/strip.c
+++ b/src/strip.c
@@ -883,7 +883,8 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname,
bool discard_section = (shdr_info[cnt].idx > 0
&& shdr_info[cnt].debug_data == NULL
&& shdr_info[cnt].shdr.sh_type != SHT_NOTE
- && cnt != ehdr->e_shstrndx);
+ && cnt != ehdr->e_shstrndx
+ && strcmp (shdr_info[cnt].name, ".opd") != 0);
/* Set the section header in the new file. */
GElf_Shdr debugshdr = shdr_info[cnt].shdr;
next reply other threads:[~2011-03-23 15:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-23 15:49 Jan Kratochvil [this message]
2011-03-23 17:16 ` Roland McGrath
2011-03-23 18:05 ` Jan Kratochvil
2011-03-24 3:09 ` Alan Modra
2011-04-04 11:19 ` obsolete: " Jan Kratochvil
2011-03-24 10:44 ` Roland McGrath
2011-03-23 22:18 ` Ulrich Drepper
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=20110323152942.GA13640@host1.jankratochvil.net \
--to=jan.kratochvil@redhat.com \
--cc=binutils@sourceware.org \
--cc=elfutils-devel@lists.fedorahosted.org \
--cc=gdb-patches@sourceware.org \
/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