summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorjdp <jdp@FreeBSD.org>1998-03-01 23:15:09 +0000
committerjdp <jdp@FreeBSD.org>1998-03-01 23:15:09 +0000
commitd26a0cda0384c0c770ff035ff812c969cc2d79e3 (patch)
tree055b42a3a9f2bab4fe969a6fc689b5985b973863 /contrib
parent5fa431f4cfe3acd0526691d358a7b647a9da074e (diff)
downloadFreeBSD-src-d26a0cda0384c0c770ff035ff812c969cc2d79e3.zip
FreeBSD-src-d26a0cda0384c0c770ff035ff812c969cc2d79e3.tar.gz
Add automatic branding of FreeBSD ELF files.
Diffstat (limited to 'contrib')
-rw-r--r--contrib/binutils/bfd/elf.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/contrib/binutils/bfd/elf.c b/contrib/binutils/bfd/elf.c
index a07c4b8..ee60483 100644
--- a/contrib/binutils/bfd/elf.c
+++ b/contrib/binutils/bfd/elf.c
@@ -2869,6 +2869,11 @@ prep_headers (abfd)
i_ehdrp->e_version = bed->s->ev_current;
i_ehdrp->e_ehsize = bed->s->sizeof_ehdr;
+#ifdef __FreeBSD__
+ /* Quick and dirty hack to brand the file as a FreeBSD ELF file. */
+ strncpy((char *) &i_ehdrp->e_ident[8], "FreeBSD", EI_NIDENT-8);
+#endif
+
/* no program header, for now. */
i_ehdrp->e_phoff = 0;
i_ehdrp->e_phentsize = 0;
OpenPOWER on IntegriCloud