public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
* [Bug default/28191] New: DWARF5 .debug_addr support
@ 2021-08-04 16:41 gprocida at google dot com
  2021-08-05 12:21 ` [Bug default/28191] " gprocida at google dot com
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: gprocida at google dot com @ 2021-08-04 16:41 UTC (permalink / raw)
  To: libabigail

https://sourceware.org/bugzilla/show_bug.cgi?id=28191

            Bug ID: 28191
           Summary: DWARF5 .debug_addr support
           Product: libabigail
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: default
          Assignee: dodji at redhat dot com
          Reporter: gprocida at google dot com
                CC: libabigail at sourceware dot org
  Target Milestone: ---

libabigail doesn't know about .debug_addr and DW_OP_addrx.

The result is that symbols (silently) end up with no type information.

This is a blocker for migrating the Android kernel to DWARF 5 and is already
affecting ABI monitoring of Android userspace libraries.

Test case:

$ cat foo.c
int x = 1;
$ clang-11 -gdwarf-4 -c foo.c 
$ abidw foo.o
<abi-corpus version='2.0' path='foo.o' architecture='elf-amd-x86_64'>
  <elf-variable-symbols>
    <elf-symbol name='x' size='4' type='object-type' binding='global-binding'
visibility='default-visibility' is-defined='yes'/>
  </elf-variable-symbols>
  <abi-instr address-size='64' path='foo.c'
comp-dir-path='/usr/local/google/home/gprocida/dev/libabigail/b195152239'
language='LANG_C99'>
    <type-decl name='int' size-in-bits='32' id='type-id-1'/>
    <var-decl name='x' type-id='type-id-1' mangled-name='x'
visibility='default'
filepath='/usr/local/google/home/gprocida/dev/libabigail/b1
95152239/foo.c' line='1' column='1' elf-symbol-id='x'/>
  </abi-instr>
</abi-corpus>
$ clang-11 -gdwarf-5 -c foo.c 
$ abidw foo.o
<abi-corpus version='2.0' path='foo.o' architecture='elf-amd-x86_64'>
  <elf-variable-symbols>
    <elf-symbol name='x' size='4' type='object-type' binding='global-binding'
visibility='default-visibility' is-defined='yes'/>
  </elf-variable-symbols>
</abi-corpus>

dwarfdump snippets:

< 1><0x0000001e>    DW_TAG_variable
                      DW_AT_name                  x
                      DW_AT_type                  <0x00000033>
                      DW_AT_external              yes(1)
                      DW_AT_decl_file             0x00000001
/usr/local/google/home/gprocida/dev/libabigail/b195152239/foo.c
                      DW_AT_decl_line             0x00000001
                      DW_AT_location              len 0x0009:
0x030000000000000000: 
                          DW_OP_addr 0x00000000

< 1><0x0000001e>    DW_TAG_variable
                      DW_AT_name                  (indexed string: 0x00000003)x
                      DW_AT_type                  <0x00000029>
                      DW_AT_external              yes(1)
                      DW_AT_decl_file             0x00000000
/usr/local/google/home/gprocida/dev/libabigail/b195152239/foo.c
                      DW_AT_decl_line             0x00000001
                      DW_AT_location              len 0x0002: 0xa100: 
                          DW_OP_addrx 0

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-01-17 13:16 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-04 16:41 [Bug default/28191] New: DWARF5 .debug_addr support gprocida at google dot com
2021-08-05 12:21 ` [Bug default/28191] " gprocida at google dot com
2021-08-11 12:06 ` gprocida at google dot com
2021-09-12 19:45 ` mark at klomp dot org
2021-11-19 14:37 ` gprocida at google dot com
2021-11-22 13:51 ` maennich at android dot com
2022-01-13  8:52 ` gprocida at google dot com
2022-01-17 13:08 ` dodji at redhat dot com
2022-01-17 13:16 ` gprocida at google 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).