Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(530)

Side by Side Diff: modules/objfmts/elf/elf.c

Issue 10914069: Merge https://github.com/yasm/yasm/commit/9728322335cba96500861ef766b1546d096e5600 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/yasm/patched-yasm/
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « modules/arch/x86/x86id.c ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * ELF object format helpers 2 * ELF object format helpers
3 * 3 *
4 * Copyright (C) 2003-2007 Michael Urman 4 * Copyright (C) 2003-2007 Michael Urman
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 /* Allocate "special" syms */ 92 /* Allocate "special" syms */
93 elf_ssyms = 93 elf_ssyms =
94 yasm_xmalloc(elf_march->num_ssyms * sizeof(yasm_symrec *)); 94 yasm_xmalloc(elf_march->num_ssyms * sizeof(yasm_symrec *));
95 for (i=0; (unsigned int)i<elf_march->num_ssyms; i++) 95 for (i=0; (unsigned int)i<elf_march->num_ssyms; i++)
96 { 96 {
97 /* FIXME: misuse of NULL bytecode */ 97 /* FIXME: misuse of NULL bytecode */
98 elf_ssyms[i] = yasm_symtab_define_label(symtab, 98 elf_ssyms[i] = yasm_symtab_define_label(symtab,
99 elf_march->ssyms[i].name, 99 elf_march->ssyms[i].name,
100 NULL, 0, 0); 100 NULL, 0, 0);
101 yasm_symrec_add_data(elf_ssyms[i], &elf_ssym_symrec_data, 101 yasm_symrec_add_data(elf_ssyms[i], &elf_ssym_symrec_data,
102 &elf_march->ssyms[i]); 102 (void*)&elf_march->ssyms[i]);
103 } 103 }
104 } 104 }
105 105
106 return elf_march; 106 return elf_march;
107 } 107 }
108 108
109 yasm_symrec * 109 yasm_symrec *
110 elf_get_special_sym(const char *name, const char *parser) 110 elf_get_special_sym(const char *name, const char *parser)
111 { 111 {
112 int i; 112 int i;
(...skipping 837 matching lines...) Expand 10 before | Expand all | Expand 10 after
950 950
951 if (((unsigned)(bufp - buf)) != elf_march->proghead_size) 951 if (((unsigned)(bufp - buf)) != elf_march->proghead_size)
952 yasm_internal_error(N_("ELF program header is not proper length")); 952 yasm_internal_error(N_("ELF program header is not proper length"));
953 953
954 if (fwrite(buf, elf_march->proghead_size, 1, f)) 954 if (fwrite(buf, elf_march->proghead_size, 1, f))
955 return elf_march->proghead_size; 955 return elf_march->proghead_size;
956 956
957 yasm_internal_error(N_("Failed to write ELF program header")); 957 yasm_internal_error(N_("Failed to write ELF program header"));
958 return 0; 958 return 0;
959 } 959 }
OLDNEW
« no previous file with comments | « modules/arch/x86/x86id.c ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698