[PATCH] abilist.awk: Treat .tdata like .tbss and reject unknown combinations.

Carlos O'Donell carlos@redhat.com
Tue Nov 27 02:25:00 GMT 2018


On 11/21/18 4:19 AM, Andreas Schwab wrote:
> On Nov 20 2018, Carlos O'Donell <carlos@redhat.com> wrote:
> 
>> +2018-11-20  Carlos O'Donell  <carlos@redhat.com>
>> +
>> +	* scripts/abilist.awk: Handle .tdata. Error for unknown combinations.
>> +
>>  2018-11-20  DJ Delorie  <dj@redhat.com>
>>  
>>  	* malloc/malloc.c (tcache_entry): Add key field.
>> diff --git a/scripts/abilist.awk b/scripts/abilist.awk
>> index bad7c3807e..e914df57f0 100644
>> --- a/scripts/abilist.awk
>> +++ b/scripts/abilist.awk
>> @@ -39,7 +39,6 @@ $2 == "l" { next }
>>  
>>  # If the target uses ST_OTHER, it will be output before the symbol name.
>>  $2 == "g" || $2 == "w" && (NF == 7 || NF == 8) {
>> -  weak = $2;
>>    type = $3;
>>    size = $5;
>>    sub(/^0*/, "", size);
>> @@ -55,7 +54,7 @@ $2 == "g" || $2 == "w" && (NF == 7 || NF == 8) {
>>    if (version == "GLIBC_PRIVATE") next;
>>  
>>    desc = "";
>> -  if (type == "D" && $4 == ".tbss") {
>> +  if (type == "D" && ($4 == ".tbss" || $4 == ".tdata")) {
>>      type = "T";
>>    }
>>    else if (type == "D" && $4 == ".opd") {
>> @@ -90,14 +89,10 @@ $2 == "g" || $2 == "w" && (NF == 7 || NF == 8) {
>>      size = "";
>>    }
>>    else {
>> -    desc = symbol " " version " " weak " ? " type " " $4 " " $5;
>> -  }
>> -  if (size == " 0x") {
>> -    desc = symbol " " version " " weak " ? " type " " $4 " " $5;
>> +    print "Unable to handle this type of symbol."
>> +    exit 1
> 
> Perhaps also exit here when seeing an unrecognized line?
> 
> {
>   print "Don't grok this line:", $0
> }

Good suggestion. We should absolutely do that. Done.

I've committed the results after re-testing on x86_64.

-- 
Cheers,
Carlos.



More information about the Libc-alpha mailing list