diff options
author | andrew <andrew@FreeBSD.org> | 2013-02-04 06:59:33 +0000 |
---|---|---|
committer | andrew <andrew@FreeBSD.org> | 2013-02-04 06:59:33 +0000 |
commit | a191badca4be9f93dc348a040fa425d66aef3a25 (patch) | |
tree | 60ccaff387c494efe154206146c456941abd1870 /contrib/gdb | |
parent | a41f9579b9492ffe02266020c79c6ec9b54abdc3 (diff) | |
download | FreeBSD-src-a191badca4be9f93dc348a040fa425d66aef3a25.zip FreeBSD-src-a191badca4be9f93dc348a040fa425d66aef3a25.tar.gz |
Extend GDB to check the value in the .note.tag section along with the
.note.ABI-tag section.
This helps on ARM EABI where the OS/ABI field is zero. It would be better
to use the NOTES program header however this would require a more invasive
change.
Diffstat (limited to 'contrib/gdb')
-rw-r--r-- | contrib/gdb/gdb/osabi.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/contrib/gdb/gdb/osabi.c b/contrib/gdb/gdb/osabi.c index 3acfc70..4e43df5 100644 --- a/contrib/gdb/gdb/osabi.c +++ b/contrib/gdb/gdb/osabi.c @@ -463,6 +463,20 @@ generic_elf_osabi_sniff_abi_tag_sections: unknown OS number %d", return; } + + /* .note.tag notes, used by FreeBSD. */ + if (strcmp (name, ".note.tag") == 0) + { + /* FreeBSD. */ + if (check_note (abfd, sect, note, "FreeBSD", 4, NT_FREEBSD_TAG)) + { + /* There is no need to check the version yet. */ + *osabi = GDB_OSABI_FREEBSD_ELF; + return; + } + + return; + } /* .note.netbsd.ident notes, used by NetBSD. */ if (strcmp (name, ".note.netbsd.ident") == 0 |