diff options
author | Alan Modra <amodra@gmail.com> | 2017-08-12 16:27:29 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2017-08-12 17:45:39 +0930 |
commit | 483767a333faed7ac25783459c0c9b0be4800932 (patch) | |
tree | 328481dcbfa2753cf99da73c889eecc2b21d0b75 | |
parent | 1a682d061c5afe8ffdf3a594730693fb7d447848 (diff) | |
download | gdb-483767a333faed7ac25783459c0c9b0be4800932.zip gdb-483767a333faed7ac25783459c0c9b0be4800932.tar.gz gdb-483767a333faed7ac25783459c0c9b0be4800932.tar.bz2 |
Collision between NT_GNU_BUILD_ATTRIBUTE_OPEN and NT_PPC_VMX
* readelf.c (process_note): Qualify NT_GNU_BUILD_ATTRIBUTE notes
by name data.
-rw-r--r-- | binutils/ChangeLog | 5 | ||||
-rw-r--r-- | binutils/readelf.c | 14 |
2 files changed, 15 insertions, 4 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog index fa2b367..1208754 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,8 @@ +2017-08-12 Alan Modra <amodra@gmail.com> + + * readelf.c (process_note): Qualify NT_GNU_BUILD_ATTRIBUTE notes + by name data. + 2017-08-08 Nick Clifton <nickc@redhat.com> PR 21909 diff --git a/binutils/readelf.c b/binutils/readelf.c index 2b15f0f..0fc6562 100644 --- a/binutils/readelf.c +++ b/binutils/readelf.c @@ -17477,8 +17477,11 @@ process_note (Elf_Internal_Note * pnote, printf (" "); - if (pnote->type == NT_GNU_BUILD_ATTRIBUTE_OPEN - || pnote->type == NT_GNU_BUILD_ATTRIBUTE_FUNC) + if (((const_strneq (pnote->namedata, "GA") + && strchr ("*$!+", pnote->namedata[2]) != NULL) + || strchr ("*$!+", pnote->namedata[0]) != NULL) + && (pnote->type == NT_GNU_BUILD_ATTRIBUTE_OPEN + || pnote->type == NT_GNU_BUILD_ATTRIBUTE_FUNC)) print_gnu_build_attribute_name (pnote); else print_symbol (-20, name); @@ -17496,8 +17499,11 @@ process_note (Elf_Internal_Note * pnote, return print_stapsdt_note (pnote); else if (const_strneq (pnote->namedata, "CORE")) return print_core_note (pnote); - else if (pnote->type == NT_GNU_BUILD_ATTRIBUTE_OPEN - || pnote->type == NT_GNU_BUILD_ATTRIBUTE_FUNC) + else if (((const_strneq (pnote->namedata, "GA") + && strchr ("*$!+", pnote->namedata[2]) != NULL) + || strchr ("*$!+", pnote->namedata[0]) != NULL) + && (pnote->type == NT_GNU_BUILD_ATTRIBUTE_OPEN + || pnote->type == NT_GNU_BUILD_ATTRIBUTE_FUNC)) return print_gnu_build_attribute_description (pnote, file); if (pnote->descsz) |