diff options
author | Mark Kettenis <kettenis@gnu.org> | 2002-07-04 15:36:51 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@gnu.org> | 2002-07-04 15:36:51 +0000 |
commit | bb21884d5428ecf7b3c09192fc4ed46b2f504382 (patch) | |
tree | 3be4872de3ff8949745ca2df4c7ceb36e5955af4 /gdb/osabi.c | |
parent | 228c6d410e72e6edc3ca7aa22e93969ab1d3d31d (diff) | |
download | gdb-bb21884d5428ecf7b3c09192fc4ed46b2f504382.zip gdb-bb21884d5428ecf7b3c09192fc4ed46b2f504382.tar.gz gdb-bb21884d5428ecf7b3c09192fc4ed46b2f504382.tar.bz2 |
* osabi.c (generic_elf_osabi_sniffer): Add check for FreeBSD 3.x's
traditonal string branding within the ELF header.
Diffstat (limited to 'gdb/osabi.c')
-rw-r--r-- | gdb/osabi.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gdb/osabi.c b/gdb/osabi.c index 1e122b8..c152cb4 100644 --- a/gdb/osabi.c +++ b/gdb/osabi.c @@ -408,6 +408,15 @@ generic_elf_osabi_sniffer (bfd *abfd) break; } + if (osabi == GDB_OSABI_UNKNOWN) + { + /* The FreeBSD folks have been naughty; they stored the string + "FreeBSD" in the padding of the e_ident field of the ELF + header to "brand" their ELF binaries in FreeBSD 3.x. */ + if (strcmp (&elf_elfheader (abfd)->e_ident[8], "FreeBSD") == 0) + osabi = GDB_OSABI_FREEBSD_ELF; + } + return osabi; } |