Deleted Added
full compact
brandelf.c (289071) brandelf.c (295577)
1/*-
2 * Copyright (c) 2008 Hyogeol Lee
3 * Copyright (c) 2000, 2001 David O'Brien
4 * Copyright (c) 1996 S��ren Schmidt
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

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

39#include <libelftc.h>
40#include <stdio.h>
41#include <stdlib.h>
42#include <string.h>
43#include <unistd.h>
44
45#include "_elftc.h"
46
1/*-
2 * Copyright (c) 2008 Hyogeol Lee
3 * Copyright (c) 2000, 2001 David O'Brien
4 * Copyright (c) 1996 S��ren Schmidt
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

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

39#include <libelftc.h>
40#include <stdio.h>
41#include <stdlib.h>
42#include <string.h>
43#include <unistd.h>
44
45#include "_elftc.h"
46
47ELFTC_VCSID("$Id: brandelf.c 3234 2015-07-31 12:35:09Z emaste $");
47ELFTC_VCSID("$Id: brandelf.c 3354 2016-01-18 21:50:15Z jkoshy $");
48
49static int elftype(const char *);
50static const char *iselftype(int);
51static void printelftypes(void);
52static void printversion(void);
53static void usage(void);
54
55struct ELFtypes {

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

207 elf_errmsg(-1));
208 retval = 1;
209 goto fail;
210 }
211
212 /*
213 * Update the ABI type.
214 */
48
49static int elftype(const char *);
50static const char *iselftype(int);
51static void printelftypes(void);
52static void printversion(void);
53static void usage(void);
54
55struct ELFtypes {

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

207 elf_errmsg(-1));
208 retval = 1;
209 goto fail;
210 }
211
212 /*
213 * Update the ABI type.
214 */
215 ehdr.e_ident[EI_OSABI] = type;
215 ehdr.e_ident[EI_OSABI] = (unsigned char) type;
216 if (gelf_update_ehdr(elf, &ehdr) == 0) {
217 warnx("gelf_update_ehdr error: %s",
218 elf_errmsg(-1));
219 retval = 1;
220 goto fail;
221 }
222
223 /*

--- 88 unchanged lines hidden ---
216 if (gelf_update_ehdr(elf, &ehdr) == 0) {
217 warnx("gelf_update_ehdr error: %s",
218 elf_errmsg(-1));
219 retval = 1;
220 goto fail;
221 }
222
223 /*

--- 88 unchanged lines hidden ---