On 4/1/19 8:53 PM, Sudakshina Das wrote:
>> This could stand to use a comment, a moment's thinking about the sizes, and 
>> to
>> use the existing asm output functions.
>>
>>      /* PT_NOTE header: namesz, descsz, type.
>>         namesz = 4 ("GNU\0")
>>         descsz = 12 (see below)
> I was trying out these changes but the descsz of 12 gets rejected by 
> readelf. It hits the following
> 
>    unsigned int    size = is_32bit_elf ? 4 : 8;
> 
>    printf (_("      Properties: "));
> 
>    if (pnote->descsz < 8 || (pnote->descsz % size) != 0)
>      {
>        printf (_("<corrupt GNU_PROPERTY_TYPE, size = %#lx>\n"), 
> pnote->descsz);
>        return;
>      }

Hmm, interesting.  The docs say that padding is not to be included in descsz
(gabi4.1, page 82).  To my eye this is a bug in binutils, but perhaps we will
have to live with it.

Nick, thoughts?


r~

Reply via email to