From: Mark Wielaard <mark@klomp.org>
To: elfutils-devel@sourceware.org
Subject: Re: [PATCH] libdwfl: Fix relocation overlap sanity check.
Date: Mon, 26 Nov 2018 10:37:00 -0000 [thread overview]
Message-ID: <b9f53c2f46b3598fd391ffa2390e006985e43bf1.camel@klomp.org> (raw)
In-Reply-To: <1543004401-15437-1-git-send-email-mark@klomp.org>
On Fri, 2018-11-23 at 21:20 +0100, Mark Wielaard wrote:
> We would not relocate when the relocation section data or the target
> section date would overlap with one of the ELF headers. This is only
> really necessary if the data comes directly from the mmapped file.
> Otherwise there is no real overlap and the relocations can be safely
> applied.
>
> One particular thing we got wrong with the original sanity check was
> when the relocation data or target data section was compressed. In
> that case it could happen we overestimated the size (because the Shdr
> would have been updated to show the uncompressed data size). But
> uncompressed data is always malloced and so cannot overlap with the
> mmapped Elf header structures.
>
> When building with CFLAGS="-g -Og" this showed up as a failure in
> run-strip-reloc.sh for strip-compressed.o. Where the .debug_loc
> section decompressed would "overlap" with the shdrs at the end of
> the file and so wouldn't get relocations applied.
Pushed to master.
prev parent reply other threads:[~2018-11-26 10:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-23 20:20 Mark Wielaard
2018-11-26 10:37 ` Mark Wielaard [this message]
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=b9f53c2f46b3598fd391ffa2390e006985e43bf1.camel@klomp.org \
--to=mark@klomp.org \
--cc=elfutils-devel@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).