From: Giuliano Procida <gprocida@google.com>
To: libabigail@sourceware.org
Cc: dodji@seketeli.org, kernel-team@android.com, gprocida@google.com,
maennich@google.com, mark@klomp.org
Subject: [PATCH] DWARF reader: Comment ARM32 ELF address interpretation
Date: Wed, 10 Mar 2021 12:22:54 +0000 [thread overview]
Message-ID: <20210310122254.2860952-1-gprocida@google.com> (raw)
Bug 27552 - libabigail needs to interpret ARM32 symbol addresses specially
The previous commit omitted any code commentary. This adds a link to
the relevant reference. The code is shortened slightly as well.
* src/abg-dwarf-reader.cc
(read_context::load_symbol_maps_from_symtab_section): Add
descriptive comment to ARM32 address handling; shorten
the assignment using &=.
Signed-off-by: Giuliano Procida <gprocida@google.com>
---
src/abg-dwarf-reader.cc | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/abg-dwarf-reader.cc b/src/abg-dwarf-reader.cc
index 9a8e7b34..b6b10116 100644
--- a/src/abg-dwarf-reader.cc
+++ b/src/abg-dwarf-reader.cc
@@ -6238,7 +6238,10 @@ public:
sym);
if (is_arm32)
- symbol_value = symbol_value & ~1;
+ // Clear bit zero of ARM32 addresses as per "ELF for the Arm
+ // Architecture" section 5.5.3.
+ // https://static.docs.arm.com/ihi0044/g/aaelf32.pdf
+ symbol_value &= ~1;
addr_elf_symbol_sptr_map_type::const_iterator it =
fun_addr_sym_map_->find(symbol_value);
if (it == fun_addr_sym_map_->end())
--
2.30.1.766.gb4fecdf3b7-goog
next reply other threads:[~2021-03-10 12:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-10 12:22 Giuliano Procida [this message]
2021-03-11 9:11 ` Dodji Seketeli
2021-03-11 17:16 ` Mark Wielaard
2021-03-12 9:39 ` Giuliano Procida
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=20210310122254.2860952-1-gprocida@google.com \
--to=gprocida@google.com \
--cc=dodji@seketeli.org \
--cc=kernel-team@android.com \
--cc=libabigail@sourceware.org \
--cc=maennich@google.com \
--cc=mark@klomp.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).