This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] abilist.awk: Treat .tdata like .tbss and reject unknown combinations.
- From: Carlos O'Donell <carlos at redhat dot com>
- To: Andreas Schwab <schwab at suse dot de>
- Cc: "Joseph S. Myers" <joseph at codesourcery dot com>, GNU C Library <libc-alpha at sourceware dot org>, Mathieu Desnoyers <mathieu dot desnoyers at efficios dot com>
- Date: Mon, 26 Nov 2018 21:25:21 -0500
- Subject: Re: [PATCH] abilist.awk: Treat .tdata like .tbss and reject unknown combinations.
- References: <78f75872-ccdb-4b5e-4e54-f19cb1becbb5@redhat.com> <mvmefbelrei.fsf@suse.de>
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.