elfcore.c (923502ff91327138aa9ef1d59ea7044d2936e0ef) elfcore.c (c815a20cb23f53317c4d23d1884cd5e486dee876)
1/*-
2 * Copyright (c) 1998 John D. Polstra
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 273 unchanged lines hidden (view full) ---

282 ehdr = (Elf_Ehdr *)((char *)dst + ehoff);
283 ehdr->e_ident[EI_MAG0] = ELFMAG0;
284 ehdr->e_ident[EI_MAG1] = ELFMAG1;
285 ehdr->e_ident[EI_MAG2] = ELFMAG2;
286 ehdr->e_ident[EI_MAG3] = ELFMAG3;
287 ehdr->e_ident[EI_CLASS] = ELF_CLASS;
288 ehdr->e_ident[EI_DATA] = ELF_DATA;
289 ehdr->e_ident[EI_VERSION] = EV_CURRENT;
1/*-
2 * Copyright (c) 1998 John D. Polstra
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 273 unchanged lines hidden (view full) ---

282 ehdr = (Elf_Ehdr *)((char *)dst + ehoff);
283 ehdr->e_ident[EI_MAG0] = ELFMAG0;
284 ehdr->e_ident[EI_MAG1] = ELFMAG1;
285 ehdr->e_ident[EI_MAG2] = ELFMAG2;
286 ehdr->e_ident[EI_MAG3] = ELFMAG3;
287 ehdr->e_ident[EI_CLASS] = ELF_CLASS;
288 ehdr->e_ident[EI_DATA] = ELF_DATA;
289 ehdr->e_ident[EI_VERSION] = EV_CURRENT;
290 ehdr->e_ident[EI_OSABI] = ELFOSABI_FREEBSD;
291 ehdr->e_ident[EI_ABIVERSION] = 0;
290 ehdr->e_ident[EI_PAD] = 0;
292 ehdr->e_ident[EI_PAD] = 0;
291 strncpy(ehdr->e_ident + EI_BRAND, "FreeBSD",
292 EI_NIDENT - EI_BRAND);
293 ehdr->e_type = ET_CORE;
294 ehdr->e_machine = ELF_ARCH;
295 ehdr->e_version = EV_CURRENT;
296 ehdr->e_entry = 0;
297 ehdr->e_phoff = phoff;
298 ehdr->e_flags = 0;
299 ehdr->e_ehsize = sizeof(Elf_Ehdr);
300 ehdr->e_phentsize = sizeof(Elf_Phdr);

--- 213 unchanged lines hidden ---
293 ehdr->e_type = ET_CORE;
294 ehdr->e_machine = ELF_ARCH;
295 ehdr->e_version = EV_CURRENT;
296 ehdr->e_entry = 0;
297 ehdr->e_phoff = phoff;
298 ehdr->e_flags = 0;
299 ehdr->e_ehsize = sizeof(Elf_Ehdr);
300 ehdr->e_phentsize = sizeof(Elf_Phdr);

--- 213 unchanged lines hidden ---