On 4/30/17 11:21 AM, David Miller wrote:
built with: clang -O2 -target bpfel -g -c x.c -o x.o readelf can see it just fine: [davem@localhost binutils]$ ./readelf --debug-dump=loc ./xel.o Contents of the .debug_loc section: Offset Begin End Expression 00000000 0000000000000000 0000000000000010 (DW_OP_reg1 (r1)) 00000013 <End of list> 00000023 0000000000000010 0000000000000020 (DW_OP_constu: 590618314553; DW_OP_stack_value) 0000003d 0000000000000020 0000000000000030 (DW_OP_reg1 (r1)) 00000050 <End of list> But with big-endian: [davem@localhost binutils]$ ./readelf --debug-dump=loc ./xeb.o readelf: Warning: Invalid pointer size (0) in compunit header, using 4 instead readelf: Warning: Bogus end-of-siblings marker detected at offset 27 in .debug_info section readelf: Warning: Bogus end-of-siblings marker detected at offset 28 in .debug_info section readelf: Warning: DIE at offset 0x29 refers to abbreviation number 48 which does not exist readelf: Warning: Unable to load/parse the .debug_info section, so cannot interpret the .debug_loc section.
yeah. clang emitted dwarf for big-endian is broken. This dwarf stuff is too complicated for normal human beings. The tight packing making debugging it quite painful.