Add automatic branding of FreeBSD ELF files.

This commit is contained in:
John Polstra 1998-03-01 23:15:09 +00:00
parent 6a248bab85
commit 4f24af7764
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=33969

View File

@ -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;