* [Bug default/27552] New: libandroid.so missing symbol type information
@ 2021-03-09 16:20 gprocida+abigail at google dot com
2021-03-09 20:21 ` [Bug default/27552] " gprocida+abigail at google dot com
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: gprocida+abigail at google dot com @ 2021-03-09 16:20 UTC (permalink / raw)
To: libabigail
https://sourceware.org/bugzilla/show_bug.cgi?id=27552
Bug ID: 27552
Summary: libandroid.so missing symbol type information
Product: libabigail
Version: unspecified
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: default
Assignee: dodji at redhat dot com
Reporter: gprocida+abigail at google dot com
CC: libabigail at sourceware dot org
Target Milestone: ---
The libandroid.so library is now part of the libabigail test suite, as is an
ABI extracted from this.
I noticed that the names used of the ELF symbols and the names of declared
variables and functions, as found in the ABI, are disjoint.
I verified that:
1. if a symbol is added or removed, this is reported
2. if any type information changes, this is not reported
An examination of libandroid.so with nm -o and dwarfdump confirms that symbol
names are properly present in the DWARF.
For example, from the dwarfdump:
< 1><0x00024873> DW_TAG_subprogram
DW_AT_low_pc 0x0000ce62
DW_AT_high_pc <offset-from-lowpc>38
DW_AT_frame_base len 0x0001: 0x5d:
DW_OP_reg13
DW_AT_GNU_all_call_sites yes(1)
DW_AT_name AAssetDir_close
DW_AT_decl_file 0x00000034
frameworks/base/native/android/asset_manager.cpp
DW_AT_decl_line 0x0000008c
DW_AT_external yes(1)
< 2><0x00024885> DW_TAG_formal_parameter
DW_AT_location 0x00001332
.debug_loc offset : 0x00001332
<loclist at offset 0x00001332 with 4 entries follows>
[ 0]<base address 0x0000ce62>
[ 1]<low,hi addrs 0x0000ce62 , 0x0000ce68>
DW_OP_reg0
[ 2]<low,hi addrs 0x0000ce68 , 0x0000ce82>
DW_OP_reg4
[ 3]<low,hi addrs 0x0000ce86 , 0x0000ce88>
DW_OP_reg0
DW_AT_name assetDir
DW_AT_decl_file 0x00000034
frameworks/base/native/android/asset_manager.cpp
DW_AT_decl_line 0x0000008c
DW_AT_type <0x00024e40>
< 2><0x00024894> DW_TAG_inlined_subroutine
...
If I discover anything further, I'll follow up here.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug default/27552] libandroid.so missing symbol type information
2021-03-09 16:20 [Bug default/27552] New: libandroid.so missing symbol type information gprocida+abigail at google dot com
@ 2021-03-09 20:21 ` gprocida+abigail at google dot com
2021-03-09 21:49 ` mark at klomp dot org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: gprocida+abigail at google dot com @ 2021-03-09 20:21 UTC (permalink / raw)
To: libabigail
https://sourceware.org/bugzilla/show_bug.cgi?id=27552
--- Comment #1 from Giuliano Procida <gprocida+abigail at google dot com> ---
This looks like an ELF library bug and not a libabigail bug.
The addresses in DWARF are off-by-one with respect to the ELF symbol table
addresses. LLVM and GNU nm disagree about the addresses as well.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug default/27552] libandroid.so missing symbol type information
2021-03-09 16:20 [Bug default/27552] New: libandroid.so missing symbol type information gprocida+abigail at google dot com
2021-03-09 20:21 ` [Bug default/27552] " gprocida+abigail at google dot com
@ 2021-03-09 21:49 ` mark at klomp dot org
2021-03-09 22:29 ` [Bug default/27552] libabigail needs to interpret ARM32 symbol addresses specially gprocida+abigail at google dot com
2021-03-22 17:42 ` dodji at redhat dot com
3 siblings, 0 replies; 5+ messages in thread
From: mark at klomp dot org @ 2021-03-09 21:49 UTC (permalink / raw)
To: libabigail
https://sourceware.org/bugzilla/show_bug.cgi?id=27552
Mark Wielaard <mark at klomp dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mark at klomp dot org
--- Comment #2 from Mark Wielaard <mark at klomp dot org> ---
So this is ./tests/data/test-read-dwarf/test-libandroid.so
Which is a 32bit ARM binary.
Those are "special" :)
https://static.docs.arm.com/ihi0044/g/aaelf32.pdf
Section 5.5.3 Symbol Values
• If the symbol addresses a Thumb instruction, its value is the address of the
instruction with bit zero set (in a relocatable object, the section offset with
bit zero set).
This allows a linker to distinguish Arm and Thumb code symbols without having
to refer to the map. An Arm symbol will always have an even value, while a
Thumb symbol will always have an odd value.
So it depends on when which tool strips off the zero-bit of the value.
It looks like AAssetDir_close is a Thumb function, so its address is 0000ce62,
but the value in the symbol table is 0000ce63.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug default/27552] libabigail needs to interpret ARM32 symbol addresses specially
2021-03-09 16:20 [Bug default/27552] New: libandroid.so missing symbol type information gprocida+abigail at google dot com
2021-03-09 20:21 ` [Bug default/27552] " gprocida+abigail at google dot com
2021-03-09 21:49 ` mark at klomp dot org
@ 2021-03-09 22:29 ` gprocida+abigail at google dot com
2021-03-22 17:42 ` dodji at redhat dot com
3 siblings, 0 replies; 5+ messages in thread
From: gprocida+abigail at google dot com @ 2021-03-09 22:29 UTC (permalink / raw)
To: libabigail
https://sourceware.org/bugzilla/show_bug.cgi?id=27552
Giuliano Procida <gprocida+abigail at google dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|libandroid.so missing |libabigail needs to
|symbol type information |interpret ARM32 symbol
| |addresses specially
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug default/27552] libabigail needs to interpret ARM32 symbol addresses specially
2021-03-09 16:20 [Bug default/27552] New: libandroid.so missing symbol type information gprocida+abigail at google dot com
` (2 preceding siblings ...)
2021-03-09 22:29 ` [Bug default/27552] libabigail needs to interpret ARM32 symbol addresses specially gprocida+abigail at google dot com
@ 2021-03-22 17:42 ` dodji at redhat dot com
3 siblings, 0 replies; 5+ messages in thread
From: dodji at redhat dot com @ 2021-03-22 17:42 UTC (permalink / raw)
To: libabigail
https://sourceware.org/bugzilla/show_bug.cgi?id=27552
dodji at redhat dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |FIXED
--- Comment #3 from dodji at redhat dot com ---
This should now be fixed by commit
https://sourceware.org/git/?p=libabigail.git;a=commit;h=32c7829e4156666e1975329fb1b3201c43b5f84f
and should be available in libabigail 2.0.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-03-22 17:42 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-09 16:20 [Bug default/27552] New: libandroid.so missing symbol type information gprocida+abigail at google dot com
2021-03-09 20:21 ` [Bug default/27552] " gprocida+abigail at google dot com
2021-03-09 21:49 ` mark at klomp dot org
2021-03-09 22:29 ` [Bug default/27552] libabigail needs to interpret ARM32 symbol addresses specially gprocida+abigail at google dot com
2021-03-22 17:42 ` dodji at redhat dot com
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).