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

--- Comment #1 from Lynda Rowe <lynda.rowe at ericsson dot com> ---
If I was to build the same mixed dwarf4/5 source example with gcc v. 14.2.0 and
ld 2.43 as I used to build readelf like this:

rm -f dwarf4.o dwarf5.o && gcc -c -g -O1 -gdwarf-4 -o dwarf4.o dwarf4.c && gcc
-c -g -O1 -gdwarf-5 -o dwarf5.o dwarf5.c && gcc dwarf4.o dwarf5.o -o a.out

I get sligthly different output for .debug_loc but the same behaviour for the
.debug_loclists section and similarly odd looking header information:

$ ../build2/x86/binutils/readelf -W -wo a.out 
Contents of the .debug_loc section:

    Offset   Begin            End              Expression

    00000000 v000000000000000 v000000000000000 location view pair
    00000002 v000000000000000 v000000000000000 location view pair

    00000004 v000000000000000 v000000000000000 views at 00000000 for:
             0000000000401106 0000000000401113 (DW_OP_reg5 (rdi))
    00000017 v000000000000000 v000000000000000 views at 00000002 for:
             0000000000401113 0000000000401123 (DW_OP_GNU_entry_value:
(DW_OP_reg5 (rdi)); DW_OP_stack_value)
    0000002d <End of list>

    0000003d v000000000000001 v000000000000000 location view pair
    0000003f v000000000000000 v000000000000001 location view pair
    00000041 v000000000000001 v000000000000001 location view pair
    00000043 v000000000000001 v000000000000000 location view pair

    00000045 v000000000000001 v000000000000000 views at 0000003d for:
             000000000040110a 0000000000401113 (DW_OP_reg5 (rdi))
    00000058 v000000000000000 v000000000000001 views at 0000003f for:
             0000000000401113 0000000000401114 (DW_OP_GNU_entry_value:
(DW_OP_reg5 (rdi)); DW_OP_stack_value)
    0000006e v000000000000001 v000000000000001 views at 00000041 for:
             0000000000401114 000000000040111e (DW_OP_const1u: 123;
DW_OP_stack_value)
    00000083 v000000000000001 v000000000000000 views at 00000043 for:
             000000000040111e 0000000000401123 (DW_OP_const2u: 456;
DW_OP_stack_value)
    00000099 <End of list>
Table at Offset 0
  Length:          0
  DWARF version:   0
  Address size:    0
  Segment size:    0
  Offset entries:  0

Table at Offset 0x4
  Length:          0
  DWARF version:   0
  Address size:    0
  Segment size:    0
  Offset entries:  13

   Offset Entries starting at 0x10:
    [     0] 0
    [     1] 0xd550001
    [     2] 0
    [     3] 0x1d000000

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

Reply via email to