lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1004b0e6-eecf-75bd-d215-aac903ba8da6@fb.com>
Date:   Mon, 1 May 2017 20:14:57 -0700
From:   Alexei Starovoitov <ast@...com>
To:     David Miller <davem@...emloft.net>
CC:     <daniel@...earbox.net>, <aconole@...heb.org>,
        <netdev@...r.kernel.org>, <xdp-newbies@...r.kernel.org>
Subject: Re: [PATCH v3 binutils] Add BPF support to binutils...

On 5/1/17 8:03 PM, David Miller wrote:
> From: Alexei Starovoitov <ast@...com>
> Date: Mon, 1 May 2017 19:49:21 -0700
>
>> 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@...alhost 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@...alhost 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.
>
> But doesn't the CLANG DWARF2 emission code look at the target
> endianness?

it certainly does and on bpf backend side I'm not doing
anything special comparing to what other bi-endian architectures
like ppc and mips are doing. Obviously I missed something.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ