mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-19 17:18:24 +08:00
Fix implementation of readelf's -wE and -wN options,
* dwarf.c (dwarf_select_sections_by_name): If the entry's value is zero then clear the corresponding variable. (dwarf_select_sections_by_letters): Likewise. * testsuite/binutils-all/debuginfo.exp: Expect -WE and -wE debuginfod tests to fail.
This commit is contained in:
@ -12169,7 +12169,10 @@ dwarf_select_sections_by_names (const char *names)
|
||||
if (strncmp (p, entry->option, len) == 0
|
||||
&& (p[len] == ',' || p[len] == '\0'))
|
||||
{
|
||||
* entry->variable = entry->val;
|
||||
if (entry->val == 0)
|
||||
* entry->variable = 0;
|
||||
else
|
||||
* entry->variable = entry->val;
|
||||
result |= entry->val;
|
||||
|
||||
p += len;
|
||||
@ -12213,7 +12216,10 @@ dwarf_select_sections_by_letters (const char *letters)
|
||||
{
|
||||
if (entry->letter == * letters)
|
||||
{
|
||||
* entry->variable |= entry->val;
|
||||
if (entry->val == 0)
|
||||
* entry->variable = 0;
|
||||
else
|
||||
* entry->variable |= entry->val;
|
||||
result |= entry->val;
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user