mirror of
https://git.FreeBSD.org/src.git
synced 2024-11-23 07:31:31 +00:00
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.
This commit is contained in:
parent
e8cbe54bc4
commit
42fe3ad9b1
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=246312
@ -435,6 +435,10 @@
|
||||
|
||||
#define NT_FREEBSD_ABI_TAG 1
|
||||
|
||||
/* Values for FreeBSD .note.tag notes. Note name is "FreeBSD". */
|
||||
|
||||
#define NT_FREEBSD_TAG 2
|
||||
|
||||
/* These three macros disassemble and assemble a symbol table st_info field,
|
||||
which contains the symbol binding and symbol type. The STB_ and STT_
|
||||
defines identify the binding and type. */
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user